tx simulate
tx_simulateDry-run a transaction before you send it: eth_call + gas estimate at the latest block. Returns success or the decoded revert reason, the return value (decoded when you give a signature), gas units and the fee in native coin and USD. Send raw data, or signature + args and we encode it. Costs $0.003 USDC per call (x402).
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": {
"to": "<to>"
},
"name": "tx_simulate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ||
| args | No | Arguments for signature | |
| data | No | 0x calldata | |
| from | No | Sender (recommended) | |
| chain | No | base (default), ethereum, arbitrum, optimism, polygon | |
| value | No | Native coin amount, e.g. 0.01 | |
| signature | No | Instead of data, e.g. balanceOf(address) returns (uint256) |