Factory Contract

Read functions

getPair

function getPair(
    address tokenA,
    address tokenB,
    uint24 fee
) external view returns (address pair);

allPairs

function allPairs(uint) external view returns (address pair);

Returns the address of the nth pair (0-indexed) created through the Factory contract.

Returns 0x0000000000000000000000000000000000000000 where pair has not yet been created.

Begins at 0 for first created pair.

allPairsLength

function allPairsLength() external view returns (uint);

Displays the current number of pairs created through the Factory contract as an integer.

feeTo

function feeTo() external view returns (address);

The address to where non-LP-holder fees are sent.

feeToSetter

function feeToSetter() external view returns (address);

The address with permission to set the feeTo address.

feeconstant

uint24 public constant FEE_0_5_PERCENT = 50;   // 0.5%
uint24 public constant FEE_1_PERCENT = 100;    // 1%
uint24 public constant FEE_2_PERCENT = 200;    // 2%
uint24 public constant FEE_3_PERCENT = 300;    // 3%

Write functions

createPair

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

setFeeTo

Sets address for feeTo.

setFeeToSetter

Sets address for permission to adjust feeTo.


Last updated