Skip to main content

eth_newFilter

Creates a filter object on Arbitrum to notify when state changes (logs).

Use Cases#

  • Event monitoring - Subscribe to contract events
  • Real-time updates - Track events for high-volume DeFi (GMX, Uniswap, Aave), gaming, and cross-chain applications
  • Indexing - Build event indexes incrementally

Parameters#

ParameterTypeRequiredDescription
fromBlockQUANTITY|TAGNoStarting block
toBlockQUANTITY|TAGNoEnding block
addressDATA|ArrayNoContract address(es)
topicsArrayNoTopic filters

Request#

{
"jsonrpc": "2.0",
"method": "eth_newFilter",
"params": [{
"fromBlock": "latest",
"address": "0x13867a801e352e219c2d2AC29288Bf086e5C81ef",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]
}],
"id": 1
}

Returns#

TypeDescription
QUANTITYFilter ID

Code Examples#

curl -X POST https://api-arbitrum-mainnet-archive.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_newFilter",
"params": [{
"fromBlock": "latest",
"address": "0x13867a801e352e219c2d2AC29288Bf086e5C81ef"
}],
"id": 1
}'