Ethereum
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Ethereum
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_newBlockFilter registers a server-side filter that watches for new blocks on Ethereum and hands you back a hex filter ID. There are no parameters: the filter simply accumulates the hash of every block the node sees, and you drain that buffer by polling eth_getFilterChanges with the ID. Each poll returns the block hashes that arrived since your last call, so on mainnet you can expect roughly one new hash per 12-second slot under PoS. Create the filter against https://ethereum.therpc.io/YOUR_API_KEY on chain ID 1. This is the lightest of the filter family, since it tracks block arrivals rather than logs or mempool entries, and it pairs with eth_uninstallFilter for cleanup.
هذا الأسلوب لا يأخذ أي معاملات. مرر مصفوفة فارغة [].
| النوع | الوصف |
|---|---|
| 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 Ethereum playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32000 | filter not found | Provider rejected filter creation or the filter limit was reached. |
eth_getBlockByHash with each hash.eth_getFilterChanges comes back with a filter-not-found error, recreate the filter and resume.safe or finalized tag (about 12.8 minutes for full finality) before treating a block as settled.