Ethereum token standard
ERC-4626 calldata
ERC-4626 standardizes tokenized vaults that exchange an underlying ERC-20 asset for vault shares.
Vault methods distinguish assets from shares and exact-input operations from exact-output operations. All quantities are raw integers in the decimals used by the asset or share token.
Write functions
Generate transaction input for calls that can change contract state.
approve(address,uint256)0x095ea7b3Sets how many ERC-20 tokens a spender may transfer from the caller’s account.deposit(uint256,address)0x6e553f65Deposits an exact underlying asset amount and mints ERC-4626 vault shares.mint(uint256,address)0x94bf804dMints an exact number of ERC-4626 vault shares by depositing underlying assets.redeem(uint256,address,address)0xba087652Redeems an exact number of ERC-4626 vault shares for underlying assets.transfer(address,uint256)0xa9059cbbMoves an ERC-20 amount from the transaction caller to a recipient address.transferFrom(address,address,uint256)0x23b872ddMoves ERC-20 tokens from one account to another using the caller’s allowance.withdraw(uint256,address,address)0xb460af94Withdraws an exact underlying asset amount by burning ERC-4626 vault shares.
Read functions
Generate eth_call input for views that read contract state.
allowance(address,address)0xdd62ed3eReturns the remaining ERC-20 amount a spender may transfer for an owner.asset()0x38d52e0fReturns the ERC-20 token address used as the vault’s underlying asset.balanceOf(address)0x70a08231Returns the ERC-20 balance associated with one account address.convertToAssets(uint256)0x07a2d13aEstimates how many underlying assets correspond to a share amount in an ideal conversion.convertToShares(uint256)0xc6e6f592Estimates how many vault shares correspond to an asset amount in an ideal conversion.decimals()0x313ce567Returns the decimal precision commonly used to display an ERC-20 token amount.maxDeposit(address)0x402d267dReturns the maximum underlying asset amount currently accepted for a receiver.maxMint(address)0xc63d75b6Returns the maximum vault share amount currently mintable for a receiver.maxRedeem(address)0xd905777eReturns the maximum vault share amount currently redeemable for an owner.maxWithdraw(address)0xce96cb77Returns the maximum underlying asset amount currently withdrawable for an owner.name()0x06fdde03Returns the human-readable name reported by an ERC-20 token contract.previewDeposit(uint256)0xef8b30f7Previews the shares minted for an ERC-4626 deposit using current on-chain conditions.previewMint(uint256)0xb3d7f6b9Previews the assets required for an ERC-4626 mint using current on-chain conditions.previewRedeem(uint256)0x4cdad506Previews the assets received for an ERC-4626 redeem using current on-chain conditions.previewWithdraw(uint256)0x0a28a477Previews the shares burned for an ERC-4626 withdraw using current on-chain conditions.symbol()0x95d89b41Returns the short ticker symbol reported by an ERC-20 token contract.totalAssets()0x01e1d114Returns the total underlying assets currently managed by an ERC-4626 vault.totalSupply()0x18160dddReturns the ERC-20 token supply currently reported by the contract.