BNB Smart Chain
Prêt à utiliser cela en production ?
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
BNB Smart Chain
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
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.
| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | transactionHash | string | Oui | Hash of the transaction to retrieve traces for. |
| Type | Description |
|---|---|
| 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.
| Code | Message | Cause |
|---|---|---|
-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.Paramètres
0x-prefixed 32-byte hash