Skip to main content

ERC4626DepositToken

Git Source

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

NameTypeDescription
senderaddressThe address that sent the underlying assets to the pair contract.
toaddressThe address that will receive the minted shares.
assetsuint256The amount of underlying assets that were sent to the pair contract.
sharesuint256The 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

NameTypeDescription
senderaddressThe owner of the Ammalgam Deposit token.
toaddressThe address that will receive the underlying assets.
assetsuint256The amount of underlying assets that will be received.
sharesuint256The 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);