@vault:convertToAssets
Amount of underlying assets an ERC-4626 vault would return for a given amount of shares, in base units of the asset.
⚗️ Experimental — available at next.evmcrispr.com.
Returns: number
Syntax
Section titled “Syntax”@vault:convertToAssets(vault shares)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
vault | address | ERC-4626 vault address |
shares | number | Share amount, in base units (wei) |
Examples
Section titled “Examples”# Print the WXDAI value of one sDAI shareprint "Share price:" @vault:convertToAssets(0xaf204776c7245bF4147c2612BF6e5972Ee483701 1e18)See Also
Section titled “See Also”On-chain face (@convertToAssets!)
Section titled “On-chain face (@convertToAssets!)”Read convertToAssets(shares) at assertion time. A literal amount
compiles to plain calldata; a live :: call folds into a core read
splice.