Avalanche
Avalanche
Avalanche
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
eth_newBlockFilter creates a server-side filter on the Avalanche C-Chain (chain ID 43114, the EVM chain whose gas is paid in AVAX) that tracks new block arrivals. It returns a hex filter ID that you then poll with eth_getFilterChanges; each poll yields the hashes of blocks that have appeared since your last poll. With Snowman/Avalanche consensus finalizing blocks in roughly one to two seconds, new hashes show up quickly, so a tight polling loop keeps your app close to the chain head. Create the filter at https://avalanche.therpc.io/YOUR_API_KEY.
Diese Methode erwartet keine Parameter. Übergib ein leeres Array [].
| Typ | Beschreibung |
|---|---|
| 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 Avalanche playground.
| Code | Meldung | Ursache |
|---|---|---|
-32000 | filter not found | Provider rejected filter creation or the filter limit was reached. |
eth_getBlockByHash.eth_getFilterChanges starts returning filter not found, recreate the filter and resume.