Docs
Supported ChainsImmutableJSON-RPC APISmart Contract Methods

eth_getFilterChanges - Immutable RPC Method

Poll filter for new events on Immutable. Essential for event monitoring for Web3 gaming (Gods Unchained, RavenQuest), gaming NFTs with enforced royalties, and cross-chain game assets.

Polling method for a filter on Immutable, returns an array of logs since last poll.

Use Cases

  • Event streaming - Get new events incrementally
  • Real-time monitoring - Track contract activity for Web3 gaming (Gods Unchained, RavenQuest), gaming NFTs with enforced royalties, and cross-chain game assets
  • Efficient indexing - Process only new events

Request Parameters

Request
filterIdQUANTITY

Filter ID from eth_newFilter

Response Body

Response

Code Examples

Bash
curl -X POST https://api-immutable-zkevm-mainnet.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getFilterChanges",
    "params": ["0x1"],
    "id": 1
  }'
JavaScript
import { JsonRpcProvider } from 'ethers';

const provider = new JsonRpcProvider('https://api-immutable-zkevm-mainnet.n.dwellir.com/YOUR_API_KEY');

// Poll loop
async function pollFilter(filterId, interval = 2000) {
  while (true) {
    const changes = await provider.send('eth_getFilterChanges', [filterId]);
    if (changes.length > 0) {
      console.log('New events:', changes);
    }
    await new Promise(r => setTimeout(r, interval));
  }
}

On this page