Run a transaction before signing it
simulate_transactionRuns a transaction you are about to sign, from your own wallet as it stands right now, inside a simulation. Nothing is sent and nothing costs gas. Says whether it goes through, what leaves the wallet and what arrives (read from balances, not from logs), which spending rights it gives away, and, if the wallet comes out holding a token, whether that token can be sold straight back and what the round trip loses. Works whatever router or contract the transaction calls. Returns json with a verdict (code, level, text). A verdict level of "unknown" means the nest could not find out. It is not a pass: do not buy on it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | The contract or wallet it is sent to. | |
| data | No | The calldata, as hex. Leave out for a plain transfer. | |
| from | Yes | The wallet that would send it. | |
| fund | No | True runs it as if the wallet held plenty of eth, to try a trade before the wallet is funded. | |
| calls | No | Instead of to, data and value: several transactions in the order they would be sent, for example an approval and then a swap. | |
| value | No | Wei sent with it, as a whole number in a string or as hex. Leave out for none. |