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_traceTransaction replays a historical OP Mainnet transaction at the opcode level, reproducing the exact EVM state of the block where it was included. Given a transaction hash, the node re-executes it step by step and emits a trace — by default a struct-log stream, or a structured result if you select a tracer like callTracer or prestateTracer. OP Mainnet is the OP Stack rollup that meters gas in ETH and settles to Ethereum L1; send the request to https://optimism.therpc.io/YOUR_API_KEY (chain ID 10, 0xa) to see precisely what happened inside any past transaction.
REVERT instruction.callTracer.prestateTracer for security post-mortems after an exploit.| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | transactionHash | string | Oui | Hash of the transaction to trace. |
| 2 | options | object | Non | Tracer configuration object. |
| Type | Description |
|---|---|
| object | With the default tracer: `{gas, failed, returnValue, structLogs[]}` where each structLog entry contains `{pc, op, gas, gasCost, depth, stack?, memory?, storage?}`. With callTracer: a nested call-tree object. With prestateTracer: a pre-execution account/storage map. |
Try it live in the Optimism playground.
| Code | Message | Cause |
|---|---|---|
-32601 | Method not found | debug namespace is not enabled on the node (requires --http.api=debug or equivalent). |
-32602 | Invalid params | Transaction hash is missing, malformed, or the options object contains unknown fields. |
-32000 | transaction not found | The transaction hash does not exist on the chain or the node lacks archive state for that block. |
callTracer or disable stack/storage via the options to shrink it.Paramètres
0x-prefixed 32-byte hash
omit for default struct-log tracer