Polygon
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Polygon
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
trace_replayBlockTransactions re-runs every transaction in a Polygon PoS block and returns, for each one, whichever combination of trace types you ask for. It is the block-wide counterpart of trace_replayTransaction, well suited to building a complete state-diff record of an entire MATIC-fee block in a single call. Send the request to https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89), passing the block and the traceTypes you need. It replays all transactions in the block and returns a selectable combination of call-tree trace, VM trace, and state diff for each.
stateDiff audit for every transaction in a Polygon block, feeding 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 Polygon 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 minimal.stateDiff or trace alone unless you genuinely need the opcode-level vmTrace.المعاملات
hex block number or "latest" | "earliest" | "pending"
["trace"] | ["trace","vmTrace","stateDiff"]