Preview an sGHO deposit or withdrawal
get_sgho_previewv3 only, Ethereum only. Convert between GHO and sGHO shares at the vault's current index, without building anything. Which unit 'amount' is in depends on the action: 'deposit' takes GHO and returns the shares it would mint; 'withdraw' takes sGHO SHARES and returns the GHO they would return. Call this with action 'withdraw' before prepare_sgho_action, because that withdrawal is denominated in shares and not in GHO - passing a GHO figure there withdraws the wrong amount. When quoting what a user-named amount converts to, use this preview rather than multiplying by the rate: the index moves.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | 'deposit' converts GHO to shares; 'withdraw' converts shares to GHO. | |
| amount | Yes | Amount in main units (e.g. '10.5'): GHO when action is 'deposit', sGHO shares when it is 'withdraw'. | |
| version | No | Optional, and only 'v3': this tool exists on v3 only. |