Avalanche
Avalanche
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Avalanche
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
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.
Este método no acepta parámetros. Pasa un array vacío [].
| Tipo | Descripción |
|---|---|
| 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.
| Código | Mensaje | Causa |
|---|---|---|
-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.