Preview an Aave Vault deposit, mint, withdraw or redeem
get_vault_previewv3 only. Convert between a vault's assets and its shares at the current index, without building anything. Which unit 'amount' is in depends on the action, and this is the thing to get right: 'deposit' takes ASSETS and returns the shares minted, 'mint' takes SHARES and returns the assets it would cost, 'withdraw' takes ASSETS and returns the shares burnt, 'redeem' takes SHARES and returns the assets returned. Use the assets pair to fix the token amount exactly and the shares pair to fix the share count exactly. Call this before prepare_vault_action rather than multiplying by a rate: the index moves.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vault | Yes | Vault contract address, 0x-prefixed (40 hex chars). | |
| action | Yes | Which conversion: deposit/withdraw speak assets, mint/redeem speak shares. | |
| amount | Yes | Amount in main units (e.g. '10.5'), in the unit the action takes. | |
| chainId | Yes | Chain the vault is on, e.g. 1 for Ethereum. | |
| version | No | Optional, and only 'v3': this tool exists on v3 only. |