all files / contracts/ UniV3PairManagerFactory.sol

0% Statements 0/4
0% Branches 0/2
0% Functions 0/2
0% Lines 0/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39                                                                             
// SPDX-License-Identifier: MIT
 
/*
 
Coded for The Keep3r Network with ♥ by
 
██████╗░███████╗███████╗██╗  ░██╗░░░░░░░██╗░█████╗░███╗░░██╗██████╗░███████╗██████╗░██╗░░░░░░█████╗░███╗░░██╗██████╗░
██╔══██╗██╔════╝██╔════╝██║  ░██║░░██╗░░██║██╔══██╗████╗░██║██╔══██╗██╔════╝██╔══██╗██║░░░░░██╔══██╗████╗░██║██╔══██╗
██║░░██║█████╗░░█████╗░░██║  ░╚██╗████╗██╔╝██║░░██║██╔██╗██║██║░░██║█████╗░░██████╔╝██║░░░░░███████║██╔██╗██║██║░░██║
██║░░██║██╔══╝░░██╔══╝░░██║  ░░████╔═████║░██║░░██║██║╚████║██║░░██║██╔══╝░░██╔══██╗██║░░░░░██╔══██║██║╚████║██║░░██║
██████╔╝███████╗██║░░░░░██║  ░░╚██╔╝░╚██╔╝░╚█████╔╝██║░╚███║██████╔╝███████╗██║░░██║███████╗██║░░██║██║░╚███║██████╔╝
╚═════╝░╚══════╝╚═╝░░░░░╚═╝  ░░░╚═╝░░░╚═╝░░░╚════╝░╚═╝░░╚══╝╚═════╝░╚══════╝╚═╝░░╚═╝╚══════╝╚═╝░░╚═╝╚═╝░░╚══╝╚═════╝░
 
https://defi.sucks
 
*/
 
pragma solidity >=0.8.4 <0.9.0;
 
import '../interfaces/IPairManagerFactory.sol';
import './UniV3PairManager.sol';
import './peripherals/Governable.sol';
 
/// @title Factory of Pair Managers
/// @notice This contract creates new pair managers
contract UniV3PairManagerFactory is IPairManagerFactory, Governable {
  mapping(address => address) public override pairManagers;
 
  constructor() Governable(msg.sender) {}
 
  ///@inheritdoc IPairManagerFactory
  function createPairManager(address _pool) external override returns (address _pairManager) {
    if (pairManagers[_pool] != address(0)) revert AlreadyInitialized();
    _pairManager = address(new UniV3PairManager(_pool, governance));
    pairManagers[_pool] = _pairManager;
    emit PairCreated(_pool, _pairManager);
  }
}