eth_newFilter - Flow EVM RPC Method
Create event log filter on Flow EVM Gateway. Essential for monitoring events for consumer NFTs (NBA Top Shot, Disney Pinnacle), gaming dApps, and hybrid Cadence-EVM applications.
Creates a filter object on Flow EVM Gateway to notify when state changes (logs).
Use Cases
- Event monitoring - Subscribe to contract events
- Real-time updates - Track events for consumer NFTs (NBA Top Shot, Disney Pinnacle), gaming dApps, and hybrid Cadence-EVM applications
- Indexing - Build event indexes incrementally
Request Parameters
Starting block
Ending block
Contract address(es)
Topic filters
Response Body
Filter ID
Code Examples
curl -X POST https://api-flow-evm-gateway-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_newFilter",
"params": [{
"fromBlock": "latest",
"address": "0xd3bF53DAC106A0290B0483EcBC89d40FcC961f3e"
}],
"id": 1
}'import { JsonRpcProvider } from 'ethers';
const provider = new JsonRpcProvider('https://api-flow-evm-gateway-mainnet.n.dwellir.com/YOUR_API_KEY');
// Create filter
const filterId = await provider.send('eth_newFilter', [{
fromBlock: 'latest',
address: '0xd3bF53DAC106A0290B0483EcBC89d40FcC961f3e',
topics: ['0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef']
}]);
// Poll for changes
const changes = await provider.send('eth_getFilterChanges', [filterId]);
console.log('New events:', changes);
// Cleanup
await provider.send('eth_uninstallFilter', [filterId]);Related Methods
eth_getFilterChanges- Poll filter for changeseth_uninstallFilter- Remove filtereth_getLogs- Direct log query
eth_getLogs
Query event logs on Flow EVM Gateway. Essential for indexing consumer NFTs (NBA Top Shot, Disney Pinnacle), gaming dApps, and hybrid Cadence-EVM applications on the EVM-equivalent layer on Flow blockchain enabling Cadence+Solidity composability.
eth_getFilterChanges
Poll filter for new events on Flow EVM Gateway. Essential for event monitoring for consumer NFTs (NBA Top Shot, Disney Pinnacle), gaming dApps, and hybrid Cadence-EVM applications.