eth_getLogs - opBNB RPC Method
Query event logs on opBNB. Essential for indexing fully on-chain games, high-frequency DeFi, and cost-sensitive applications on BNB Chain on Binance's high-performance L2 processing 100M+ daily transactions with the lowest L2 gas fees.
Returns an array of all logs matching a given filter object on opBNB.
Why opBNB? Build on Binance's high-performance L2 processing 100M+ daily transactions with the lowest L2 gas fees with sub-$0.0001 gas fees, 5-10K TPS, sub-second block times via Volta/Maxwell upgrades, and OP Stack architecture.
Use Cases
The eth_getLogs method is essential for:
- Event indexing - Track contract events for fully on-chain games, high-frequency DeFi, and cost-sensitive applications on BNB Chain
- Token transfers - Monitor ERC20/ERC721 transfers
- DeFi analytics - Track swaps, liquidity events, and more
- Notification systems - Alert on specific on-chain events
Code Examples
Error Handling
| Error Code | Message | Description |
|---|---|---|
| -32005 | Query returned more than 10000 results | Reduce block range |
| -32602 | Invalid params | Invalid filter parameters |
Related Methods
eth_newFilter- Create a filter for logseth_getFilterChanges- Poll filter for new logs
eth_call
Execute smart contract calls without creating transactions on opBNB. Essential for reading contract state for fully on-chain games, high-frequency DeFi, and cost-sensitive applications on BNB Chain.
eth_newFilter
Create an event log filter on opBNB. Essential for event monitoring, contract activity tracking, and DeFi event streaming for fully on-chain games, high-frequency DeFi, and cost-sensitive applications on BNB Chain.