Prepare an sGHO deposit or withdrawal
prepare_sgho_actionv3 only, Ethereum only. Build an unsigned transaction to deposit GHO into the sGHO vault or withdraw from it. 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. Send only the arguments that apply and leave every other one out. On 'deposit', 'amount' is GHO. On 'withdraw', 'amount' is a number of sGHO SHARES, not GHO - get_sgho_preview converts - or pass max:true to redeem the whole position and omit 'amount'. 'recipient' is only for sending the result to a different address than the sender. A deposit needs a GHO allowance: when the result is ApprovalRequired, submit its 'approval' transaction and then the 'originalTransaction' beside it, in that order.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max | No | withdraw only: redeem the entire share balance. | |
| action | Yes | Which side to build: deposit GHO, or withdraw by redeeming shares. | |
| amount | No | Amount in main units: GHO to deposit, or sGHO shares to redeem. Omit only when max=true. | |
| sender | Yes | Wallet address, 0x-prefixed (40 hex chars). | |
| version | No | Optional, and only 'v3': this tool exists on v3 only. | |
| recipient | No | Optional address to receive the shares (deposit) or the GHO (withdraw). Omit the argument entirely to use the sender. |