@vault:convertToAssets
Amount of underlying assets an ERC-4626 vault would return for a given amount of shares, in base units of the asset.
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)