BNB Smart Chain
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
BNB Smart Chain
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
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.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | transactionHash | string | Sim | Hash of the transaction to trace. |
| 2 | options | object | Não | Tracer configuration object. |
| Tipo | Descrição |
|---|---|
| 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 | Mensagem | 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