Optimism
Prêt à utiliser cela en production ?
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
Optimism
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
debug_traceBlockByNumber replays every transaction in an OP Mainnet block — addressed by hex block number or a tag like latest — and returns an opcode-level execution trace for each. On OP Mainnet, the OP Stack rollup where ETH pays for gas and blocks arrive about every 2 seconds, this is the go-to way to inspect a whole block's execution without knowing each transaction hash. Send the request to https://optimism.therpc.io/YOUR_API_KEY (chain ID 10, 0xa) with the block number and an optional tracer config, and the node returns one trace per transaction in canonical order.
callTracer, including every nested internal call.| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | blockNumber | string | Oui | Block to trace. |
| 2 | options | object | Non | 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 number is malformed or not a recognized tag. |
-32000 | block not found | Block does not exist or archive state is unavailable for that number. |
latest are valid but race with the chain — at ~2-second block times a new block may be produced mid-request, so pin a concrete number for reproducible results.Paramètres
hex block number or "latest" | "earliest" | "pending"
Same tracer configuration object as debug_traceTransaction.