Docs

eth_getLogs - Moonbeam RPC Method

Query event logs on Moonbeam. Essential for indexing cross-chain DeFi, multi-chain dApps, and Ethereum-to-Polkadot bridging via XCM, Axelar, LayerZero, and Wormhole on the cross-chain connected EVM platform on Polkadot with $65M+ TVL and 100+ projects.

Returns an array of all logs matching a given filter object on Moonbeam.

Why Moonbeam? Build on the cross-chain connected EVM platform on Polkadot with $65M+ TVL and 100+ projects with full EVM compatibility on Polkadot, native XCM cross-chain messaging, 10K+ TPS, 24% staking APR, and $0.015 transaction costs.

Use Cases

The eth_getLogs method is essential for:

  • Event indexing - Track contract events for cross-chain DeFi, multi-chain dApps, and Ethereum-to-Polkadot bridging via XCM, Axelar, LayerZero, and Wormhole
  • 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 CodeMessageDescription
-32005Query returned more than 10000 resultsReduce block range
-32602Invalid paramsInvalid filter parameters