Optimism
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Optimism
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_getFilterChanges returns only what is new on OP Mainnet since you last polled a given filter — log objects for a log filter, block hashes for a block filter, or pending transaction hashes for a pending-tx filter. It pairs with a filter you created earlier (eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter), so you never re-send the criteria. OP Mainnet is an OP Stack optimistic rollup that settles to Ethereum L1 and charges gas in ETH; with ~2s blocks you get fresh deltas quickly. Send polls to https://optimism.therpc.io/YOUR_API_KEY (chain ID 10, 0xa).
eth_newBlockFilter once, then poll eth_getFilterChanges repeatedly to receive each new block hash as the sequencer produces it.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 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 Optimism playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32000 | filter not found | Filter ID is invalid, expired (>5 min inactivity), or was already uninstalled. |
removed field on each entry — even on an L2 sequencer, unsafe (pre-finalized) blocks can be reorganized and a log may be revoked.المعاملات
Hex filter ID from eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter