Optimism
Optimism
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Optimism
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
trace_transaction returns the OpenEthereum/Nethermind-style call tree for a historical OP Mainnet transaction, flattening every internal call, contract creation, and self-destruct into an array where traceAddress encodes each entry's path through the tree. Unlike debug_traceTransaction, it gives you the action-level call graph rather than raw opcodes, which is exactly what indexers and explorers need. OP Mainnet is the OP Stack rollup that meters gas in ETH, chain ID 10 (0xa); send the transaction hash to https://optimism.therpc.io/YOUR_API_KEY to retrieve its full internal-call structure.
| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 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 Optimism 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 the trace API, or Erigon/Nethermind with trace enabled); most public OP Mainnet light nodes do not expose it.debug_traceTransaction — no opcode-level data, only call/create/self-destruct actions.المعاملات
0x-prefixed 32-byte hash