Avalanche
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
Avalanche
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
trace_replayTransaction replays one confirmed Avalanche C-Chain transaction and returns a combination you choose of call-tree trace, opcode-level VM trace, and state diff. The C-Chain is Avalanche's EVM chain, where gas is paid in AVAX and Snowman consensus finalizes blocks in roughly one to two seconds. The stateDiff artifact is the key draw: it shows exactly how each touched account's balance, nonce, code, and storage changed, expressed with Parity's =/+/-/* notation. Send the request to https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114, hex 0xa86a) with the transaction hash and a traceTypes array selecting "trace", "vmTrace", and/or "stateDiff".
stateDiff to see which storage slot or balance triggered the failure.| # | Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
| 1 | transactionHash | string | Ja | Hash of the transaction to replay. |
| 2 | traceTypes | array | Ja | One or more of `"trace"`, `"vmTrace"`, `"stateDiff"`. At least one value is required. |
| Typ | Beschreibung |
|---|---|
| object | `{output, trace?, stateDiff?, vmTrace?}` — `trace` is the call tree, `stateDiff` maps each affected address to balance/nonce/code/storage diffs using `=` (unchanged), `+` (created), `-` (deleted), `*{from,to}` (modified), `vmTrace` is the Parity-format opcode trace. |
Try it live in the Avalanche playground.
| Code | Meldung | Ursache |
|---|---|---|
-32601 | Method not found | trace namespace not enabled or not supported by this client (primarily OpenEthereum/Nethermind/Erigon). |
-32602 | Invalid params | Transaction hash is missing/malformed or traceTypes is empty or contains unknown values. |
-32000 | transaction not found | Transaction does not exist or archive trace data is unavailable for that block. |
vmTrace on a complex C-Chain transaction produces enormous output; prefer "trace" or "stateDiff" when you do not need opcode-level detail.trace namespace.vmTrace format is Parity-specific — do not confuse it with Geth's debug_traceTransaction structLog format when wiring up tooling.Parameter
0x-prefixed 32-byte hash
["trace"] | ["trace","vmTrace","stateDiff"]