Skip to main content

eth_newFilter

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

Use Cases#

  • Event monitoring - Subscribe to contract events
  • Real-time updates - Track events for AI-powered dApps, Web2 API integration, enterprise blockchain solutions, and offchain computation
  • 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": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]
}],
"id": 1
}

Returns#

TypeDescription
QUANTITYFilter ID

Code Examples#

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