Polygon
Polygon
Polygon
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
trace_filter scans a range of Polygon PoS blocks and returns only the traces that match your criteria — a sender or recipient address, a block range, plus offset/count pagination. It is the query tool of the trace namespace: where trace_block and trace_transaction give you everything for one block or one transaction, this lets you follow a single MATIC address or contract across many blocks at once. Send the request to https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89). It searches for traces matching criteria across a range of blocks.
| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | filter | object | 是 | Filter object with the following optional fields. |
| 类型 | 描述 |
|---|---|
| array | Flat array of matching trace objects, each with the same shape as trace_transaction results: `{action, result, subtraces, traceAddress, transactionHash, transactionPosition, blockHash, blockNumber, type}`. |
Try it live in the Polygon playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32601 | Method not found | trace namespace not enabled or client does not support trace_filter. |
-32602 | Invalid params | Filter object contains invalid fields, or block range is too wide for the node's configured limit. |
-32000 | query returned more than X results | Result set exceeded the node's per-request limit; narrow the block range or use pagination. |
fromBlock/toBlock and page with offset and count.eth_getLogs, traces are not indexed by topic — you can filter only by address and block number, so there is no event-signature shortcut.参数
Filter object with the following optional fields.