eth_getLogs - Moonbase RPC Method
Query event logs on Moonbase Alpha. Essential for indexing EVM dApp testing, XCM integration validation, and pre-mainnet deployment verification on the Moonbeam testnet for risk-free EVM dApp development and deployment testing.
Returns an array of all logs matching a given filter object on Moonbase Alpha.
Why Moonbase? Build on the Moonbeam testnet for risk-free EVM dApp development and deployment testing with free testnet tokens, full EVM compatibility, XCM testing capabilities, and identical feature set to Moonbeam mainnet.
Use Cases
The eth_getLogs method is essential for:
- Event indexing - Track contract events for EVM dApp testing, XCM integration validation, and pre-mainnet deployment verification
- 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 Moonbase Alpha. Essential for reading contract state for EVM dApp testing, XCM integration validation, and pre-mainnet deployment verification.
eth_newFilter
Create an event log filter on Moonbase Alpha. Essential for event monitoring, contract activity tracking, and DeFi event streaming for EVM dApp testing, XCM integration validation, and pre-mainnet deployment verification.