Base
Base
Base
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
eth_newBlockFilter creates a server-side filter that tracks new block arrivals on Base — Coinbase's OP Stack rollup that uses ETH for gas — and returns a hex filter ID. You then poll that ID with eth_getFilterChanges, and each poll hands back the hashes of blocks that have appeared since your last call. Because the Base sequencer seals a block roughly every 2 seconds, polling at a similar cadence keeps you close to the chain head. Create the filter against https://base.therpc.io/YOUR_API_KEY (Base mainnet, chain ID 8453 / 0x2105); the call takes no parameters.
此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| string | Hex filter ID. When polled with eth_getFilterChanges, yields an array of new block hashes since the last poll. |
Try it live in the Base playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32000 | filter not found | Provider rejected filter creation or the filter limit was reached. |
eth_getBlockByHash with each hash to pull the full block, including its transactions.eth_getFilterChanges raises a filter-not-found error, recreate the filter with eth_newBlockFilter and resume polling.finalized tag before treating block data as irreversible.