Skip to main content

IAmmalgamERC20

Git Source

Inherits: IERC20, IERC20Metadata, IERC20Permit

This interface extends IERC20, IERC20Metadata, and IERC20Permit, and defines mint and burn functions.

Functions

ownerMint

Creates amount tokens and assigns them to to address, increasing the total supply.

Emits a IERC20.Transfer event with from set to the zero address.

function ownerMint(address sender, address to, uint256 assets, uint256 shares) external;

Parameters

NameTypeDescription
senderaddress
toaddressThe account to deliver the tokens to.
assetsuint256The quantity of assets represented by the shares.
sharesuint256The amount of shares to mint.

ownerBurn

Destroys amount tokens from from address, reducing the total supply.

Emits a IERC20.Transfer event with to set to the zero address.

function ownerBurn(address sender, address from, uint256 assets, uint256 shares) external;

Parameters

NameTypeDescription
senderaddress
fromaddressThe account to deduct the tokens from.
assetsuint256The quantity of assets represented by the shares.
sharesuint256The amount of shares to be burned.

Events

Mint

Emitted when tokens are minted

event Mint(address indexed sender, address indexed to, uint256 shares);

Parameters

NameTypeDescription
senderaddress
toaddressAddress where minted tokens are sent
sharesuint256The amount of tokens being minted

Burn

Emitted when tokens are burned

event Burn(address indexed sender, address indexed to, uint256 shares);

Parameters

NameTypeDescription
senderaddressSupplies Ammalgam Liquidity token into the pair contract and receives the minted assets in exchange
toaddressAddress where burned tokens are sent
sharesuint256The amount of tokens being burned

Borrow

Emitted on a borrow of tokens

event Borrow(address indexed sender, address indexed to, uint256 assets, uint256 shares);

Parameters

NameTypeDescription
senderaddressThe address initiating the borrowing action
toaddressThe address receiving the borrowed tokens
assetsuint256The address of the borrowed token
sharesuint256The amount of tokens being borrowed

Repay

Emitted on a repayment of tokens

event Repay(address indexed sender, address indexed onBehalfOf, uint256 assets, uint256 shares);

Parameters

NameTypeDescription
senderaddressThe address initiating the repayment action
onBehalfOfaddressThe address of the account on whose behalf tokens are repaid
assetsuint256The address of the repaid token
sharesuint256The amount of tokens being repaid

BorrowLiquidity

Emitted on a liquidity borrow

event BorrowLiquidity(address indexed sender, uint256 borrowAmountLShares, address indexed to);

Parameters

NameTypeDescription
senderaddressThe address initiating the borrowing action
borrowAmountLSharesuint256The amount of liquidity borrowed
toaddressAddress where the borrowed liquidity is sent

RepayLiquidity

Emitted on a liquidity repayment

event RepayLiquidity(address indexed sender, address indexed onBehalfOf, uint256 repayAmountLShares);

Parameters

NameTypeDescription
senderaddressSupplies borrowed liquidity into the pair contract and the corresponding Ammalgam Debt tokens will be destroyed
onBehalfOfaddressAddress for whom the repayment is made
repayAmountLSharesuint256The amount of liquidity being repaid