debug_traceTransaction
POST
A debugging method that replays an already-processed transaction at the node level and allows you to inspect detailed information for each step of the transaction execution. It returns various information such as the call stack, gas usage, state changes, and log events. This allows you to trace and debug contract function call flows, variable changes, and event emissions.
param[0]
transactionHashstringrequired
Transaction hash is the unique identifier of a transaction. Transaction hashes are expressed as 64-digit hexadecimal strings.param[1]
traceOptionObjectobjectrequired
Object for trace option configuration.tracerstring
A field that specifies the tracer type, set to either "callTracer" or "prestateTracer".1. callTracer: Used to inspect the execution path and results of executed transactions. Provides information such as the call stack, return values, gas consumption, and revert reasons, and can trace the process of function calls and interactions with smart contracts. Depending on the execution option (onlyTopCall), you can trace all nested calls of a specific call.2. prestateTracer: A tool that traces the pre-state before a specific transaction or block is executed. Records account state and contract code before transaction execution, allowing you to analyze state changes before and after execution. prestateTracer is used to trace smart contract state changes and interactions between accounts.tracerConfigobject
Object for tracer configuration. Uses the boolean "onlyTopCall" option; when set to true, traces only the main call. When set to false, traces down to the sub-call level.onlyTopCallboolean
timeoutstring
A duration string with decimal numbers that overrides the default 5-second timeout for JavaScript-based trace calls. Maximum timeout is "10s". Valid time units are "ns", "us", "ms", "s", and multiple time units can be combined, e.g. "300ms" or "2s45ms".Responses
fromstring
Caller addressgasstring
Gas limit set for the call (hex)gasUsedstring
Actual gas used (hex)tostring
Callee addressinputstring
Call input data (hex)outputstring
Call return data (hex)valuestring
Amount of ETH transferred (hex, in wei)typestring
Call type (CALL, CREATE, STATICCALL, etc.)callsarray
List of internal sub-callserrorstring
Error message if execution failedrevertReasonstring
Revert reason if the transaction was revertedcodestringrequired
Code identifying the cause of the failed request.messagestringrequired
Detailed message including the name and value of the invalid parameter.{"code": "ERROR_CODE","message": "Unauthorized"}
cURL
curl -X POST 'https://arbitrum-mainnet.nodit.io' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo' \-d '{"jsonrpc": "2.0","id": 1,"method": "debug_traceTransaction","params": ["0xda148d856aef6d77d0b76c90ef1091ffe77afe9ee9b1c6cc23f28f042f198bd8",{"tracer": "callTracer","tracerConfig": {"onlyTopCall": true},"timeout": "1s"}]}'