Factory
https://github.com/Into-the-Fathom/fathom-swap-smart-contracts/blob/master/contracts/core/UniswapV2Factory.sol
Last updated
https://github.com/Into-the-Fathom/fathom-swap-smart-contracts/blob/master/contracts/core/UniswapV2Factory.sol
The UniswapV2Factory contract is a core component of the Fathom DEX. It is responsible for creating and managing pairs (liquidity pools) for token exchanges.
Type: address
Description: Address to which protocol fees are sent.
Type: address
Description: Address with the permission to update the feeTo address.
Type: mapping(address => mapping(address => address))
Description: Mapping from two token addresses to the address of their liquidity pool.
Type: address[]
Description: Array of all created pair addresses.
Parameters:
address tokenA: The first token of the pair.
address tokenB: The second token of the pair.
Returns:
address pair: The address of the created pair.
Description: Creates a new liquidity pair for tokenA and tokenB. Emits the PairCreated event.
Parameters:
address _feeTo: The address to set as the fee recipient.
Description: Sets the address to which protocol fees are sent. Can only be called by the feeToSetter.
Parameters:
address _feeToSetter: The address to set as the new feeToSetter.
Description: Sets the address that can update the fee recipient. Can only be called by the current feeToSetter.
Parameters: None
Returns:
uint: The length of the allPairs array.
Description: Returns the number of all pairs created.
Parameters: None
Returns:
bytes32: The keccak256 hash of the UniswapV2Pair creation code.
Description: Returns the initialization hash of the UniswapV2Pair contract.
Parameters:
address indexed token0: The first token of the pair.
address indexed token1: The second token of the pair.
address pair: The address of the created pair.
uint: The total number of pairs.
Description: Emitted when a new pair is created.
Last updated