Avalanche
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.
Avalanche
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
debug_traceTransaction replays a confirmed Avalanche C-Chain transaction opcode by opcode, reproducing the exact EVM state at the block in which it was included. The C-Chain is Avalanche's EVM chain, where AVAX pays for gas and Snowman consensus finalizes blocks in about one to two seconds, so a traced transaction is replayed against the precise state the network agreed on. Send the call to https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114, hex 0xa86a) with the transaction hash. The default tracer returns a full structLog of every executed instruction; alternative tracers such as callTracer and prestateTracer give you a call tree or a pre-execution state map instead.
callTracer.prestateTracer for a security post-mortem of an exploited C-Chain contract.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | transactionHash | string | Sim | Hash of the transaction to trace. |
| 2 | options | object | Não | Tracer configuration object. |
| Tipo | Descrição |
|---|---|
| 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 Avalanche playground.
| Código | Mensagem | 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. |
transaction not found for older state.callTracer or disable stack and storage capture via the options object.Parâmetros
0x-prefixed 32-byte hash
omit for default struct-log tracer