ERC4626DepositToken
Inherits: ERC4626, ERC20Base
Functions
constructor
constructor(ERC20BaseConfig memory config, address _asset) ERC4626(IERC20(_asset)) ERC20Base(config);
ownerMint
override AmmalgamERC20Base-ownerMint.
function ownerMint(address sender, address to, uint256 assets, uint256 shares) public virtual override onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
sender | address | The address that sent the underlying assets to the pair contract. |
to | address | The address that will receive the minted shares. |
assets | uint256 | The amount of underlying assets that were sent to the pair contract. |
shares | uint256 | The amount of shares that will be minted. |
ownerBurn
override AmmalgamERC20Base-ownerBurn.
function ownerBurn(address sender, address to, uint256 assets, uint256 shares) public virtual override onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
sender | address | The owner of the Ammalgam Deposit token. |
to | address | The address that will receive the underlying assets. |
assets | uint256 | The amount of underlying assets that will be received. |
shares | uint256 | The amount of shares that will be burned. |
_deposit
ERC4626 facade for IAmmalgamPair-deposit. both deposit and mint calls _deposit
function _deposit(address caller, address receiver, uint256 assets, uint256) internal virtual override;
_withdraw
ERC4626 facade for IAmmalgamPair-withdraw. both withdraw and redeem calls _withdraw
function _withdraw(address caller, address receiver, address, uint256, uint256 shares) internal virtual override;
_update
function _update(address from, address to, uint256 amount) internal virtual override(ERC20Base, ERC20);
balanceOf
function balanceOf(
address account
) public view override(ERC20Base, ERC20, IERC20) returns (uint256);
decimals
function decimals() public view override(ERC20Base, ERC4626) returns (uint8);
totalAssets
function totalAssets() public view override returns (uint256);
_convertToShares
function _convertToShares(uint256 assets, Math.Rounding rounding) internal view override returns (uint256);
_convertToAssets
function _convertToAssets(uint256 shares, Math.Rounding rounding) internal view override returns (uint256);