BNB Smart Chain
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
BNB Smart Chain
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
BNB Smart Chain is the EVM-compatible network secured by Proof-of-Staked-Authority, where validators are paid in BNB and roughly three-second blocks reach fast finality. eth_getLogs walks the historical chain and returns every event log that matches a single filter object in one round trip. That object pins down addresses, indexed topics, and a block window. Point your client at https://bsc.therpc.io/YOUR_API_KEY on chain ID 56, and this becomes the workhorse for one-shot log pulls and backfill indexing jobs, sweeping past PancakeSwap swaps or BEP-20 Transfer events without holding an open subscription.
Transfer log emitted by a BEP-20 token contract across a historical range of chain-56 blocks.| # | Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
| 1 | filter | object | Ja | Filter object. Fields: `fromBlock` (string, default "latest"), `toBlock` (string, default "latest"), `address` (string | string[]), `topics` ((string | string[] | null)[]), `blockHash` (string — mutually exclusive with fromBlock/toBlock). |
| Typ | Beschreibung |
|---|---|
| array | Array of log objects. Each log: `address`, `blockHash`, `blockNumber`, `data`, `logIndex`, `removed` (bool — true on reorg), `topics`, `transactionHash`, `transactionIndex`. |
Try it live in the BNB Smart Chain playground.
| Code | Meldung | Ursache |
|---|---|---|
-32005 | query exceeds max block range | The fromBlock–toBlock window exceeds the provider's block-range cap. |
-32005 | query returned more than 10000 results | Too many matching logs; narrow the filter or paginate. |
-32602 | invalid argument | blockHash combined with fromBlock/toBlock, or malformed topic format. |
removed flag and re-pull once the block settles.fromBlock: "latest" burns compute units for nothing. Wire up eth_newFilter plus eth_getFilterChanges, or open an eth_subscribe stream instead.Parameter
Filter object. Fields: `fromBlock` (string, default "latest"), `toBlock` (string, default "latest"), `address` (string | string[]), `topics` ((string | string[] | null)[]), `blockHash` (string — mutually exclusive with fromBlock/toBlock).