BNB Smart Chain
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
BNB Smart Chain
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
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.
| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | transactionHash | string | نعم | Hash of the transaction to retrieve traces for. |
| النوع | الوصف |
|---|---|
| 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.
| الكود | الرسالة | السبب |
|---|---|---|
-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.المعاملات
0x-prefixed 32-byte hash