Simulate Transaction
simulate_transactionDry-run one transaction or an ordered bundle (e.g. approve then swap) from a wallet on Ethereum or Base without signing or broadcasting. Returns per-call success or decoded revert reason, gas used, the wallet's net ETH and ERC-20 balance changes, new token approvals (flagging unlimited ones), and a receipt hash committing to the inputs and results at the simulated block. Use the result to decide whether to proceed, adjust, or abort before acting on-chain.
Use when: Use before recommending or preparing any state-changing transaction to confirm it will not revert and to see actual token outflows, inflows, and approvals. Put dependent steps (approve then swap) in one call so later steps see earlier state. Use read_contract for view-only reads and decode_transaction for already-mined txs.
Limitations: Point-in-time result at the reported block; mempool ordering, MEV, and later state can change the real outcome. Gas affordability, nonce, and signatures are not checked. Max 8 calls; Ethereum and Base only. If bundle simulation is unavailable, calls run independently and balance/approval changes are omitted.
Alternatives: read_contract, decode_transaction, get_dex_quote, get_token_approvals
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| calls | Yes | Ordered bundle, e.g. [approve, swap]; later calls see earlier state. | |
| chain_id | No | 1=Ethereum, 8453=Base. | |
| from_address | Yes | Sender wallet (msg.sender). | |
| block_identifier | No | 'latest' or a decimal parent block number. | latest |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| calls | Yes | ||
| receipt | Yes | ||
| chain_id | Yes | ||
| warnings | Yes | ||
| approvals | Yes | ||
| from_address | Yes | ||
| all_succeeded | Yes | ||
| balance_changes | Yes | ||
| base_block_number | Yes |