BNB Smart Chain
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
BNB Smart Chain
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Contract activity on BNB Smart Chain surfaces as event logs, and eth_newFilter is how you register interest in a specific slice of them. Chain ID 56 uses BNB as its gas token. Send the method to https://bsc.therpc.io/YOUR_API_KEY with an address and topic criteria, and it creates a server-side log filter that returns a hex filter ID. From then on you call eth_getFilterChanges with that ID to pull, incrementally, only the matching logs mined since your last poll. There is no need to restate the address-and-topics object on every request. The pattern pairs naturally with the chain's ~3-second PoSA block cadence for steady, low-overhead event ingestion.
Transfer events on a roughly per-block (~3-second) rhythm without re-specifying the full address-and-topics filter each time.Swap events from a long-running indexer process, letting the server track your read position.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | filter | object | Sí | Filter object. Fields: `fromBlock` (string), `toBlock` (string), `address` (string | string[]), `topics` ((string | string[] | null)[]). |
| Tipo | Descripción |
|---|---|
| string | Hex filter ID. Pass this to eth_getFilterChanges, eth_getFilterLogs, or eth_uninstallFilter. |
Try it live in the BNB Smart Chain playground.
| Código | Mensaje | Causa |
|---|---|---|
-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 answers with filter not found.eth_subscribe logs subscription over WebSocket beats repeatedly polling this filter.Parámetros
Filter object. Fields: `fromBlock` (string), `toBlock` (string), `address` (string | string[]), `topics` ((string | string[] | null)[]).