Optimism
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Optimism
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
trace_replayBlockTransactions replays every transaction in an OP Mainnet block and returns, per transaction, whichever combination of call-tree trace, opcode-level VM trace, and state diff you request via traceTypes. It is the block-wide version of trace_replayTransaction — one call gives you the full execution and storage impact of an entire block. OP Mainnet is the OP Stack rollup that settles to Ethereum L1 with ETH as its gas token; send the request to https://optimism.therpc.io/YOUR_API_KEY (chain ID 10, 0xa) with the block parameter and your chosen trace types.
stateDiff audit for every transaction in an OP Mainnet block to feed a chain analytics pipeline.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | blockParameter | string | نعم | Block whose transactions to replay. |
| 2 | traceTypes | array | نعم | One or more of `"trace"`, `"vmTrace"`, `"stateDiff"`. At least one value is required. |
| النوع | الوصف |
|---|---|
| array | Array of per-transaction replay results in block order. Each element has the same shape as trace_replayTransaction output, plus `transactionHash`. |
Try it live in the Optimism playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32601 | Method not found | trace namespace not enabled or not supported by this client. |
-32602 | Invalid params | blockParameter is malformed or traceTypes is empty or contains unknown values. |
-32000 | block not found | Block does not exist or archive trace data is unavailable for that block. |
traceTypes on a dense block can produce hundreds of MB of data — request only what your pipeline consumes.المعاملات
hex block number or "latest" | "earliest" | "pending"
["trace"] | ["trace","vmTrace","stateDiff"]