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.
debug_traceTransaction takes one already-mined transaction and replays it instruction by instruction, rebuilding the exact EVM state of the block where it landed and emitting a step-by-step record of execution. That is visibility no plain read method can offer. BNB Smart Chain (BSC) is a PoSA network with roughly three-second blocks where BNB pays gas and BEP-20 tokens flow through venues like PancakeSwap and Venus, so most traces here mean unpicking a DeFi interaction. Point the call at the JSON-RPC endpoint https://bsc.therpc.io/YOUR_API_KEY on chain ID 56. Re-running against historical state is heavy, so it wants a debug-enabled archive node.
callTracer to study how the transaction moved value.prestateTracer for a security post-mortem after an exploit.| # | 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 BNB Smart Chain 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. |
callTracer, or just turn off the stack and storage dumps in the options object.Parámetros
0x-prefixed 32-byte hash
omit for default struct-log tracer