debug
debug_traceTransaction
Replays a transaction and returns a detailed execution trace. Supports multiple tracer types for different levels of detail.
Replays a transaction and returns a detailed execution trace. Supports multiple tracer types for different levels of detail.
Parameters
| # | Type | Description |
|---|---|---|
| 1 | string | Transaction hash to trace. |
| 2 | object | (optional) Tracer options. |
Tracer Options
| Field | Type | Description |
|---|---|---|
tracer | string | Tracer type: "callTracer" for call tree, "prestateTracer" for pre-execution state. Omit for default opcode-level trace. |
timeout | string | Maximum duration for the trace (e.g., "10s"). Default varies by client. |
Returns
The return format depends on the tracer used:
- Default (no tracer): Array of opcode-level execution steps with gas, stack, and memory.
callTracer: Nested call tree withfrom,to,value,gas,gasUsed,input,output, andcalls.prestateTracer: Map of addresses to their state before execution (balance, nonce, code, storage).
Example
Using callTracer:
curl -s -X POST https://rpc.pulsechain.box \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "debug_traceTransaction",
"params": [
"0x01c5a8461d06c2c195035c148af0f871c7679841d86ae5bb98676bb2d8e68dfa",
{"tracer": "callTracer"}
],
"id": 1
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"type": "CALL",
"from": "0x...",
"to": "0x...",
"value": "0x0",
"gas": "0x...",
"gasUsed": "0x...",
"input": "0x...",
"output": "0x...",
"calls": []
}
}
TRY IT
Notes
- The example uses a real PulseChain transaction from block
0x100000. - The
callTraceris the most commonly used tracer and provides a clear view of internal calls. - The
prestateTraceris useful for understanding what state a transaction reads. - The default opcode tracer produces very large responses and should be used with a
timeoutparameter. - Tracing requires archive data; this endpoint is served by a an archive node with full trace support.
txpool_inspect
Returns a summarized view of all transactions in the pool. Similar to txpool_content but with each transaction represented as a compact string instead of a full object.
debug_traceBlockByNumber
Traces all transactions in a block by block number. Returns an array of traces, one per transaction in the block.
