Arbitrum One
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Arbitrum One
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_newFilter creates a server-side log filter on Arbitrum One and returns a hex filter ID. You define which logs you care about — a block range, one or more contract addresses, and topic patterns — and then poll the ID with eth_getFilterChanges to fetch only the matching logs emitted since your last poll, without re-sending the filter each time. On Arbitrum One, the ETH-fee Optimistic Rollup running Nitro/ArbOS, this is the standard way to watch contract events such as ERC-20 transfers or DEX swaps over plain HTTP. The endpoint is https://arbitrum.therpc.io/YOUR_API_KEY (chain ID 42161, 0xa4b1).
Transfer events on a regular interval without re-specifying the full filter each time; on Arbitrum One's sub-second blocks you can poll more frequently than the ~12-second cadence typical of Ethereum L1.Swap events in a long-running indexer process by keeping one filter alive and reading incremental changes.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | filter | object | نعم | Filter object. Fields: `fromBlock` (string), `toBlock` (string), `address` (string | string[]), `topics` ((string | string[] | null)[]). |
| النوع | الوصف |
|---|---|
| string | Hex filter ID. Pass this to eth_getFilterChanges, eth_getFilterLogs, or eth_uninstallFilter. |
Try it live in the Arbitrum One playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32000 | filter not found | Provider rejected filter creation, or filter limit per connection was reached. |
-32602 | invalid argument | Malformed filter object or invalid topic format. |
eth_getFilterChanges returns a filter-not-found error.eth_subscribe over WebSocket is more efficient than repeatedly polling a filter, especially given the chain's fast sequencer blocks.المعاملات
Filter object. Fields: `fromBlock` (string), `toBlock` (string), `address` (string | string[]), `topics` ((string | string[] | null)[]).