Avalanche
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Avalanche
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
eth_getFilterChanges returns everything that matched a previously installed filter since your last call, so you poll for fresh activity on the Avalanche C-Chain without re-sending the filter criteria each time. What you get back depends on the filter type: log objects for a log filter, block hashes for a block filter, or transaction hashes for a pending-transaction filter. The C-Chain settles transactions (paid for in AVAX) under Snowman consensus with roughly 1–2 second finality, so the windows between polls are short. Call it against https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114, 0xa86a) using the filter ID you got at creation time.
eth_newBlockFilter, then poll eth_getFilterChanges repeatedly to react to each new Avalanche block as it finalizes.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | filterId | string | 是 | The filter ID to poll. |
| 类型 | 描述 |
|---|---|
| array | For log filters: array of log objects. For block filters: array of block hash strings. For pending-tx filters: array of transaction hash strings. Empty array if no new events. |
Try it live in the Avalanche playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32000 | filter not found | Filter ID is invalid, expired (>5 min inactivity), or was already uninstalled. |
filter not found error and recreate the filter rather than assuming the ID stays valid forever.removed field — a short reorg can mark previously delivered C-Chain logs as removed even with fast finality.参数
Hex filter ID from eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter