eth_getLogs - Base RPC Method
Query event logs on Base. Essential for indexing consumer dApps, SocialFi, NFT marketplaces, and merchant payment integrations on Coinbase's L2 with 54% of L2 market revenue and direct access to 110M+ Coinbase users.
Returns an array of all logs matching a given filter object on Base.
Why Base? Build on Coinbase's L2 with 54% of L2 market revenue and direct access to 110M+ Coinbase users with $8B+ TVL, $0.08 gas fees, built-in Coinbase distribution, and seamless fiat rails.
Use Cases
The eth_getLogs method is essential for:
- Event indexing - Track contract events for consumer dApps, SocialFi, NFT marketplaces, and merchant payment integrations
- 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 Base. Essential for reading contract state for consumer dApps, SocialFi, NFT marketplaces, and merchant payment integrations.
eth_newFilter
Create an event log filter on Base. Essential for event monitoring, contract activity tracking, and DeFi event streaming for consumer dApps, SocialFi, NFT marketplaces, and merchant payment integrations.