Optimism
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Optimism
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
debug_traceTransaction replays a historical OP Mainnet transaction at the opcode level, reproducing the exact EVM state of the block where it was included. Given a transaction hash, the node re-executes it step by step and emits a trace — by default a struct-log stream, or a structured result if you select a tracer like callTracer or prestateTracer. OP Mainnet is the OP Stack rollup that meters gas in ETH and settles to Ethereum L1; send the request to https://optimism.therpc.io/YOUR_API_KEY (chain ID 10, 0xa) to see precisely what happened inside any past transaction.
REVERT instruction.callTracer.prestateTracer for security post-mortems after an exploit.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | transactionHash | string | نعم | Hash of the transaction to trace. |
| 2 | options | object | لا | Tracer configuration object. |
| النوع | الوصف |
|---|---|
| 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 Optimism playground.
| الكود | الرسالة | السبب |
|---|---|---|
-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 disable stack/storage via the options to shrink it.المعاملات
0x-prefixed 32-byte hash
omit for default struct-log tracer