debug_traceBlockByNumber
The debug_traceBlockByNumber method returns the traces of all transactions in a block identified by block number on the Optimism network. Similar to debug_traceBlockByHash but uses block number for identification, this method is particularly useful when working with sequential block analysis or when you know the block height but not its hash. It provides the same comprehensive transaction trace data for all transactions within the specified block.
Parameters
parameter | type | description |
|---|---|---|
blockNumber | string (required) | Block number in hex format or tag (latest, earliest, pending) |
traceConfig | object (optional) | Trace configuration options |
Return Object
The method returns trace data for all transactions in the block.
Request Example
Request
Response Example
Response