Optimism
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
Optimism
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
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.| # | Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
| 1 | filterId | string | Ja | The filter ID to poll. |
| Typ | Beschreibung |
|---|---|
| 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.
| Code | Meldung | Ursache |
|---|---|---|
-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.Parameter
Hex filter ID from eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter