Optimism
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
Optimism
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
trace_transaction returns the OpenEthereum/Nethermind-style call tree for a historical OP Mainnet transaction, flattening every internal call, contract creation, and self-destruct into an array where traceAddress encodes each entry's path through the tree. Unlike debug_traceTransaction, it gives you the action-level call graph rather than raw opcodes, which is exactly what indexers and explorers need. OP Mainnet is the OP Stack rollup that meters gas in ETH, chain ID 10 (0xa); send the transaction hash to https://optimism.therpc.io/YOUR_API_KEY to retrieve its full internal-call structure.
| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | transactionHash | string | Sim | Hash of the transaction to retrieve traces for. |
| Tipo | Descrição |
|---|---|
| array | Flat array of trace objects, each with `{action, result, subtraces, traceAddress, transactionHash, transactionPosition, blockHash, blockNumber, type}`. `traceAddress` encodes the path through the call tree. |
Try it live in the Optimism playground.
| Código | Mensagem | Causa |
|---|---|---|
-32601 | Method not found | trace namespace not enabled; node requires --gcmode=archive and trace API enabled (Geth), or equivalent flag on Nethermind/Erigon. |
-32602 | Invalid params | Transaction hash is missing or malformed. |
-32000 | transaction not found | Transaction does not exist or archive trace data is unavailable for that block. |
--gcmode=archive plus the trace API, or Erigon/Nethermind with trace enabled); most public OP Mainnet light nodes do not expose it.debug_traceTransaction — no opcode-level data, only call/create/self-destruct actions.Parâmetros
0x-prefixed 32-byte hash