eth_newFilter
Creates a filter object, based on filter options. To get all matching logs for specific filter, call eth_getFilterLogs. To check if the state has changed, call eth_getFilterChanges.
Parameters:
Object - The filter options:
fromBlock: QUANTITY|TAG - (optional, default: "latest") Integer block number, or "latest" for the last mined block
toBlock: QUANTITY|TAG - (optional, default: "latest") Integer block number, or "latest" for the last mined block
address: DATA|Array, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate.
topics: Array of DATA - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with βorβ options.
Returns:
QUANTITY - A filter id.
Example:
// Request
curl https://ethereum.blockpi.network/v1/rpc/your-rpc-key -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"topics":["0x1234123412341234123412341111111111111111111111111111111111111111"]}],"id":1}'
// Result
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
Last updated
Was this helpful?