Avalanche
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
Avalanche
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
eth_getFilterChanges returns everything that matched a previously installed filter since your last call, so you poll for fresh activity on the Avalanche C-Chain without re-sending the filter criteria each time. What you get back depends on the filter type: log objects for a log filter, block hashes for a block filter, or transaction hashes for a pending-transaction filter. The C-Chain settles transactions (paid for in AVAX) under Snowman consensus with roughly 1–2 second finality, so the windows between polls are short. Call it against https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114, 0xa86a) using the filter ID you got at creation time.
eth_newBlockFilter, then poll eth_getFilterChanges repeatedly to react to each new Avalanche block as it finalizes.| # | 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 Avalanche playground.
| Code | Meldung | Ursache |
|---|---|---|
-32000 | filter not found | Filter ID is invalid, expired (>5 min inactivity), or was already uninstalled. |
filter not found error and recreate the filter rather than assuming the ID stays valid forever.removed field — a short reorg can mark previously delivered C-Chain logs as removed even with fast finality.Parameter
Hex filter ID from eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter