BNB Smart Chain
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
BNB Smart Chain
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
BNB Smart Chain settles BNB-denominated transactions into blocks roughly every three seconds, so a stateless application needs an efficient way to ask "what is new?" eth_getFilterChanges does exactly that: hand it a filter ID and it returns only the events that arrived since your previous call, advancing an internal cursor each time. The payload type follows the filter — log objects for a log filter, block-hash strings for a block filter, or transaction-hash strings for a pending filter. Direct the poll at https://bsc.therpc.io/YOUR_API_KEY on chain ID 56 to keep an indexer current without re-sending the filter criteria.
eth_newBlockFilter once, then call this method on repeat to learn of each newly sealed block.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 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 BNB Smart Chain playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32000 | filter not found | Filter ID is invalid, expired (>5 min inactivity), or was already uninstalled. |
removed flag on each one to catch entries rolled back by a BSC reorg and undo them downstream.参数
Hex filter ID from eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter