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.
Give trace_transaction one BSC transaction hash and it returns the OpenEthereum/Nethermind-style call tree for that single historical transaction: every internal call, contract creation, and self-destruct it set off. The chain runs on BNB gas and carries most of the BEP-20 economy, so a single swap or router call can fan out into dozens of nested sub-calls. The traceAddress on each entry encodes its position in that tree, which lets you rebuild the nesting exactly. Send the request to chain ID 56 at https://bsc.therpc.io/YOUR_API_KEY. It reads far more easily than the opcode-level debug tracers when you are following money rather than instructions, but it still leans on a trace-enabled archive node to reach historical state.
| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | transactionHash | string | Sim | Hash of the transaction to retrieve traces for. |
| Tipo | Descrição |
|---|---|
| array | Flat array of trace objects, each with `{action, result, subtraces, traceAddress, transactionHash, transactionPosition, blockHash, blockNumber, type}`. `traceAddress` encodes the path through the call tree. |
Try it live in the BNB Smart Chain playground.
| Código | Mensagem | Causa |
|---|---|---|
-32601 | Method not found | trace namespace not enabled; node requires --gcmode=archive and trace API enabled (Geth), or equivalent flag on Nethermind/Erigon. |
-32602 | Invalid params | Transaction hash is missing or malformed. |
-32000 | transaction not found | Transaction does not exist or archive trace data is unavailable for that block. |
--gcmode=archive plus trace, or Erigon/Nethermind running their trace API), so most public light nodes and lower tiers will not serve it.debug_traceTransaction output. There is no opcode-level detail here, only call, create, and self-destruct actions.Parâmetros
0x-prefixed 32-byte hash