BNB Smart Chain
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
BNB Smart Chain
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
For forensic work on a single BSC transaction, trace_replayTransaction is the sharpest tool in the namespace. It re-runs one historical transaction against the block state it executed in and returns whatever you ask for through traceTypes: the trace call tree, the vmTrace opcode stream, the stateDiff, or any mix of the three. Direct it to chain ID 56 at https://bsc.therpc.io/YOUR_API_KEY. The stateDiff is where forensics happens. It tags every touched account with =, +, -, or *{from,to}, so you can read off exactly how each balance, nonce, code blob, and storage slot moved. That replay against original state is what makes it heavy, and what ties it to a trace-enabled archive node that still keeps the history.
| # | 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 BNB Smart Chain 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 transaction produces enormous output, so reach for trace or stateDiff when you do not need opcode detail.vmTrace shape is Parity-specific. Do not confuse it with the structLog format that Geth's debug_traceTransaction returns.Parameter
0x-prefixed 32-byte hash
["trace"] | ["trace","vmTrace","stateDiff"]