Skip to main content

AmmalgamFactory

Git Source

Inherits: IAmmalgamFactory, IAmmalgamFactoryCallback

State Variables

tokenFactory

address public immutable tokenFactory;

feeTo

address public feeTo;

feeToSetter

address public feeToSetter;

pairBytes

bytes private pairBytes;

config

IAmmalgamFactoryCallback.TokenFactoryConfig private config;

getPair

mapping(address => mapping(address => address)) public getPair;

allPairs

address[] public allPairs;

Functions

onlyFeeToSetter

modifier onlyFeeToSetter();

constructor

constructor(address _feeToSetter, address _tokenFactory, bytes memory _pairBytes);

allPairsLength

function allPairsLength() external view returns (uint256);

createPair

function createPair(address tokenA, address tokenB) external returns (address pair);

getTokenFactoryConfig

function getTokenFactoryConfig() external view override returns (IAmmalgamFactoryCallback.TokenFactoryConfig memory);

setFeeTo

function setFeeTo(address newFeeTo) external onlyFeeToSetter;

setFeeToSetter

function setFeeToSetter(address newFeeToSetter) external onlyFeeToSetter;

Events

NewFeeTo

event NewFeeTo(address indexed feeTo);

NewFeeToSetter

event NewFeeToSetter(address indexed feeToSetter);

Errors

AmmalgamIdenticalAddresses

error AmmalgamIdenticalAddresses();

AmmalgamZeroAddress

error AmmalgamZeroAddress();

AmmalgamFeeToIsZeroAddress

error AmmalgamFeeToIsZeroAddress();

AmmalgamFeeToSetterIsZeroAddress

error AmmalgamFeeToSetterIsZeroAddress();

AmmalgamPairExists

error AmmalgamPairExists();

AmmalgamBytecodeLengthZero

error AmmalgamBytecodeLengthZero();

AmmalgamFailedOnDeploy

error AmmalgamFailedOnDeploy();

AmmalgamForbidden

error AmmalgamForbidden();