Skip to main content

IAmmalgamERC20Controller

Git Source

The interface of a ERC20 facade for multiple token types with functionality similar to ERC1155.

The AmmalgamERC20Contraller provides support to the AmmalgamPair contract for token management.

Functions

tokenX

Get the address of tokenX.

function tokenX() external view returns (address);

Returns

NameTypeDescription
<none>addressThe address of tokenX.

tokenY

Get the address of tokenY.

function tokenY() external view returns (address);

Returns

NameTypeDescription
<none>addressThe address of tokenY.

totalSupply

Get the total supply of a specific type of token.

function totalSupply(TokenType tokenType) external view returns (uint256);

Parameters

NameTypeDescription
tokenTypeTokenTypeThe type of the token.

Returns

NameTypeDescription
<none>uint256The total supply of the specified token.

balanceOf

Get the balance of a specific type of token for a specific account.

function balanceOf(address account, TokenType tokenType) external view returns (uint256);

Parameters

NameTypeDescription
accountaddressThe account for which the balance is required.
tokenTypeTokenTypeThe type of the token.

Returns

NameTypeDescription
<none>uint256The balance of the specified token for the specified account.

tokens

Get the contract instance for a specific type of token.

function tokens(TokenType tokenType) external view returns (IAmmalgamERC20);

Parameters

NameTypeDescription
tokenTypeTokenTypeThe type of the token.

Returns

NameTypeDescription
<none>IAmmalgamERC20The contract instance for the specified token.