Base
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
Base
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
trace_replayTransaction replays a single historical transaction on Base and returns a selectable combination of call-tree trace, opcode-level VM trace, and state diff. Base is the OP Stack optimistic rollup Coinbase runs, paying gas in ETH and settling to Ethereum L1, so the replay uses the same OpenEthereum-style trace format other EVM trace clients produce. Send the transaction hash and a traceTypes array (trace, vmTrace, stateDiff, or any mix) to https://base.therpc.io/YOUR_API_KEY (chain ID 8453, hex 0x2105). The stateDiff output is the standout feature: it maps each affected address to its balance, nonce, code, and storage changes using =, +, -, and *{from,to} markers, giving you a precise before/after picture of what the transaction altered.
stateDiff markers to see every slot it wrote, for forensic analysis.stateDiff and call tree together to pinpoint which storage slot or sub-call 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 Base 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 Base transaction produces enormous output; stick to trace or stateDiff when you do not need opcode-level detail.vmTrace format is Parity-specific — do not confuse it with Geth's debug_traceTransaction struct-log; tooling built for one will not parse the other.Parameter
0x-prefixed 32-byte hash
["trace"] | ["trace","vmTrace","stateDiff"]