Skip to main content

eth_newFilter

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

Use Cases#

  • Event monitoring - Subscribe to contract events
  • Real-time updates - Track events for high-throughput DeFi, latency-sensitive trading, and scalable EVM 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": "0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]
}],
"id": 1
}

Returns#

TypeDescription
QUANTITYFilter ID

Code Examples#

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