Base API method eth_newFilter
creates a new filter object for monitoring log entries that match specified criteria. This method is crucial for applications that need to track events or changes in smart contracts.
The example tracks all transfers of the USDC token.
Once you install the filter, track the changes with eth_getFilterChanges.
Get you own node endpoint today
Start for free and get your app to production levels immediately. No credit card required.
You can sign up with your GitHub, X, Google, or Microsoft account.
filterObject
— an object containing filter options:
fromBlock
— (optional) the block number (in hexadecimal) or one of the strings "earliest"
, "latest"
, or "pending"
from where to start filtering. Default is "latest"
.address
— (optional) an address or a list of addresses to only get logs from specific contracts.topics
— (optional) an array of topics to filter for log entries. Each event signature generated by the EVM logging mechanism has a unique topic.result
— the ID of the created filter. This ID is used to identify and manage the filter with other filter methods like eth_getFilterChanges
or eth_getFilterLogs
.The eth_newFilter
method is essential for:
The ID of the created filter
The response is of type object
.
Base API method eth_newFilter
creates a new filter object for monitoring log entries that match specified criteria. This method is crucial for applications that need to track events or changes in smart contracts.
The example tracks all transfers of the USDC token.
Once you install the filter, track the changes with eth_getFilterChanges.
Get you own node endpoint today
Start for free and get your app to production levels immediately. No credit card required.
You can sign up with your GitHub, X, Google, or Microsoft account.
filterObject
— an object containing filter options:
fromBlock
— (optional) the block number (in hexadecimal) or one of the strings "earliest"
, "latest"
, or "pending"
from where to start filtering. Default is "latest"
.address
— (optional) an address or a list of addresses to only get logs from specific contracts.topics
— (optional) an array of topics to filter for log entries. Each event signature generated by the EVM logging mechanism has a unique topic.result
— the ID of the created filter. This ID is used to identify and manage the filter with other filter methods like eth_getFilterChanges
or eth_getFilterLogs
.The eth_newFilter
method is essential for:
The ID of the created filter
The response is of type object
.