Skip to main content

eth_newFilter

Creates a filter object, based on filter options, to notify when the state changes (logs).

Parameters

Filter(object)

filter

Returns

hex encoded unsigned integer

Example request
await provider.request({
method: "eth_newFilter",
params: [
{
"fromBlock": "0x137d3c2",
"toBlock": "0x137d3c3",
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"topics": []
}
]
});
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x01"
}