Ethereum API
Multichain API
eth_newFilter
Summary: Creates a filter object, based on filter options, to notify when the state changes (logs).
Parameters
Filter object
filter
Returns
Filter identifier string
hex encoded unsigned integer
Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
Customize request
Parameter
Value
Connect your MetaMask wallet to run requests successfully.
Request
await window.ethereum.request({
"method": "eth_newFilter",
"params": [
{
fromBlock: "0x137d3c2",
toBlock: "0x137d3c3",
address: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
topics: []
}
],
});
Example response
"0x01"