Simulate call
simulate_callDry-run a transaction with eth_call to estimate gas and detect reverts before sending. Provide raw data or ABI+function+args for automatic encoding and decoding.
Instructions
Dry-run a transaction with eth_call and estimate its gas, without sending anything. Provide either raw data, or abi + functionName + args to have the call data encoded and the result decoded. A transaction that would fail returns success: false with the revert reason; that is a result, not a tool error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient or contract address. 0x followed by 40 hex characters. | |
| abi | No | ABI containing the function to call. Either a JSON ABI (array of items, or a single item), or human-readable signatures such as ["function balanceOf(address owner) view returns (uint256)", "event Transfer(address indexed from, address indexed to, uint256 value)"]. | |
| args | No | Function arguments in order. Integers may be numbers or decimal/0x-hex strings (use strings above 2^53). Tuples may be arrays or objects keyed by component name. | |
| data | No | Raw call data (0x-hex). Use this or abi + functionName. | |
| from | No | Sender to simulate as. Defaults to the zero address. Set it when the call depends on msg.sender or balance. 0x followed by 40 hex characters. | |
| block | No | Block state to simulate against. Defaults to latest. An integer block number or a tag: latest, safe, finalized, earliest, pending. | |
| value | No | HYPE to send, in wei (1 HYPE = 10^18 wei), as a decimal or 0x-hex string. Defaults to 0. | |
| functionName | No | Function to call. Requires abi. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Node error message if the call failed for a reason other than a revert (e.g. insufficient funds). | |
| revert | No | Why the call would fail, if it reverted. | |
| success | Yes | ||
| gasPrice | Yes | ||
| signature | No | ||
| returnData | Yes | Raw return data from eth_call, if it succeeded. | |
| gasEstimate | Yes | Gas units from eth_estimateGas; includes the parent-chain data cost on Arbitrum chains. | |
| estimatedFee | Yes | gasEstimate × current gas price. An estimate, not a guarantee. | |
| decodedResult | No | Decoded return value, when abi + functionName were given. | |
| gasEstimateError | No |