debug_traceCall
The debug_traceCall method executes a call without creating a transaction on the blockchain and returns the trace of the call execution on the Optimism network. This method simulates a transaction call and provides detailed execution traces, including opcode-level information, gas usage, and state changes. It's invaluable for debugging smart contract interactions, optimizing gas consumption, and understanding transaction behavior before actually sending a transaction to the network.
Parameters
parameter | type | description |
|---|---|---|
transaction | object (required) | The transaction call object containing from, to, gas, gasPrice, value, and data fields |
blockParameter | string (required) | Block number or tag (latest, earliest, pending) |
traceConfig | object (optional) | Configuration object for tracing (optional: tracer, timeout, disableStorage, disableStack, etc.) |
Return Object
The method returns detailed trace information about the call execution, including gas used, opcodes executed, and state changes.
Request Example
Request
Response Example
Response