Optimism
Ready to call this in production?
Free tier covers personal projects. Pay-as-you-go scales without a card.
Optimism
Free tier covers personal projects. Pay-as-you-go scales without a card.
debug_traceBlockByHash re-executes every transaction in an OP Mainnet block — looked up by its block hash — and returns an opcode-level execution trace for each one. OP Mainnet is an OP Stack rollup with roughly 2-second blocks and ETH as the gas token, so a single block can pack many transactions; this method replays them all against the parent state in canonical order. Send the call to https://optimism.therpc.io/YOUR_API_KEY (chain ID 10, 0xa) with the 32-byte block hash and an optional tracer config, and you get one trace result per transaction.
callTracer, capturing all nested calls in one request.| # | Name | Type | Required | Description |
|---|---|---|---|---|
| 1 | blockHash | string | Yes | Hash of the block to trace. |
| 2 | options | object | No | Same tracer configuration object as debug_traceTransaction. |
| Type | Description |
|---|---|
| array | Array of per-transaction trace results in block order. Each element has the same shape as debug_traceTransaction output for the active tracer. |
Try it live in the Optimism playground.
| Code | Message | Cause |
|---|---|---|
-32601 | Method not found | debug namespace not enabled on the node. |
-32602 | Invalid params | Block hash is missing or not a valid 32-byte hex value. |
-32000 | block not found | Block hash not found or archive state unavailable. |
debug_traceBlockByNumber — it replays every transaction in the block, so the hash variant is no cheaper.callTracer to keep responses manageable.Parameters
0x-prefixed 32-byte block hash
Same tracer configuration object as debug_traceTransaction.