Simulate a transaction
simulateRun an eth_call from a wallet without sending it to estimate gas and return revert reasons; optionally fund the sender via state override for a dry run.
Instructions
Run a transaction with eth_call from a wallet and estimate its gas, without sending it. Returns ok, gasEstimate and the revert reason when it fails. fundEth gives the wallet enough ETH through a state override for a dry run.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"from": "<from>",
"to": "<to>",
"data": "<data>"
},
"name": "simulate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target contract. | |
| data | Yes | Calldata (0x-prefixed hex). | |
| from | Yes | Sender to simulate from. | |
| value | No | msg.value in wei. | |
| fundEth | No | Override the sender's ETH balance for a dry run. |