BNB Smart Chain
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
BNB Smart Chain
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
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.
| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | transactionHash | string | Sí | Hash of the transaction to replay. |
| 2 | traceTypes | array | Sí | One or more of `"trace"`, `"vmTrace"`, `"stateDiff"`. At least one value is required. |
| Tipo | Descripción |
|---|---|
| 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.
| Código | Mensaje | Causa |
|---|---|---|
-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.Parámetros
0x-prefixed 32-byte hash
["trace"] | ["trace","vmTrace","stateDiff"]