Skip to main content

eth_newFilter

Ethereum API

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

Params

(1)

1. Filter (required)

fromBlock
string
Match pattern:
^0x([1-9a-f]+[0-9a-f]*|0)$
toBlock
string
Match pattern:
^0x([1-9a-f]+[0-9a-f]*|0)$
address
topics

Result

(Filter Identifier)
string
Match pattern:
^0x([1-9a-f]+[0-9a-f]*|0)$

Params

Filter

Topics

Request

await window.ethereum.request({
"method": "eth_newFilter",
"params": [
null
]
});