Prepare an Aave Vault deposit, mint, withdraw or redeem
prepare_vault_actionv3 only. Build an unsigned transaction to move value in or out of an Aave Vault. Non-custodial: the user's wallet signs and submits, so building one commits them to nothing - choose sensible values, build it, and say what you chose rather than stopping to ask. Which unit 'amount' is in depends on the action: 'deposit' and 'withdraw' take ASSETS, 'mint' and 'redeem' take SHARES. Set 'asAToken' true to move the reserve's aToken instead of its underlying token, which skips supplying first when the wallet already holds the aToken. 'recipient' is only for sending the result to a different address than the sender. A deposit or mint needs an allowance: when the result is ApprovalRequired, submit its 'approval' transaction, wait for it to be mined, then submit the 'originalTransaction' beside it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vault | Yes | Vault contract address, 0x-prefixed (40 hex chars). | |
| action | Yes | Which side to build: deposit/withdraw in assets, mint/redeem in shares. | |
| amount | Yes | Amount in main units, in the unit the action takes (assets or shares). | |
| sender | Yes | Wallet address, 0x-prefixed (40 hex chars). | |
| chainId | Yes | Chain the vault is on, e.g. 1 for Ethereum. | |
| version | No | Optional, and only 'v3': this tool exists on v3 only. | |
| asAToken | No | Move the reserve's aToken rather than its underlying token (default false). | |
| recipient | No | Optional address to receive the shares or the assets. Omit the argument entirely to use the sender. |