Skip to main content

IAmmalgamFactory

Git Source

Functions

feeTo

Returns the fee recipient address.

function feeTo() external view returns (address);

Returns

NameTypeDescription
<none>addressThe address of the fee recipient.

feeToSetter

Returns the address that can change the fee recipient.

function feeToSetter() external view returns (address);

Returns

NameTypeDescription
<none>addressThe address of the fee setter.

getPair

Returns the pair address for two tokens.

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

Parameters

NameTypeDescription
tokenAaddressThe first token.
tokenBaddressThe second token.

Returns

NameTypeDescription
pairaddressThe address of the pair for the two tokens.

allPairs

Returns the pair address at a specific index.

function allPairs(uint256 index) external view returns (address pair);

Parameters

NameTypeDescription
indexuint256The index of the pair.

Returns

NameTypeDescription
pairaddressThe address of the pair at the given index.

allPairsLength

Returns the total number of token pairs.

function allPairsLength() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The total number of token pairs.

createPair

Creates a new pair for two tokens.

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

Parameters

NameTypeDescription
tokenAaddressThe first token.
tokenBaddressThe second token.

Returns

NameTypeDescription
pairaddressThe address of the new pair.

setFeeTo

Changes the fee recipient address.

function setFeeTo(address newFeeTo) external;

Parameters

NameTypeDescription
newFeeToaddressThe new fee recipient address.

setFeeToSetter

Changes the address that can change the fee recipient.

function setFeeToSetter(address newFeeToSetter) external;

Parameters

NameTypeDescription
newFeeToSetteraddressThe new fee setter address.

Events

PairCreated

Emitted when a new pair is created.

event PairCreated(address indexed tokenX, address indexed tokenY, address pair, uint256 allPairsLength);

Parameters

NameTypeDescription
tokenXaddressThe first token in the pair.
tokenYaddressThe second token in the pair.
pairaddressThe address of the new pair.
allPairsLengthuint256The current total number of token pairs.