Optimism
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Optimism
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
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.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | transactionHash | string | Sí | Hash of the transaction to trace. |
| 2 | options | object | No | Tracer configuration object. |
| Tipo | Descripción |
|---|---|
| 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.
| Código | Mensaje | Causa |
|---|---|---|
-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.Parámetros
0x-prefixed 32-byte hash
omit for default struct-log tracer