Avalanche
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Avalanche
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
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.| # | 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 Avalanche 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. |
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