curl --request POST \
--url https://ronin-mainnet.core.chainstack.com/3997273fc956a67dc6982384500e669e \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_newFilter",
"id": 1,
"params": [
{
"fromBlock": "latest",
"address": "0x0b7007c13325c48911f73a2dad5fa5dcbf808adc",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
}
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}
curl --request POST \
--url https://ronin-mainnet.core.chainstack.com/3997273fc956a67dc6982384500e669e \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_newFilter",
"id": 1,
"params": [
{
"fromBlock": "latest",
"address": "0x0b7007c13325c48911f73a2dad5fa5dcbf808adc",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
}
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}
eth_newFilter
creates a new filter object for filtering logs that match specific criteria. This is particularly useful for applications that need to listen for specific events on the Ronin blockchain.
fromBlock
(optional): The block number from which to start filtering. This can be a hexadecimal number or one of the strings “earliest”, “latest” or “pending”. In the provided example, “latest” is used.address
(optional): The address of the contract to filter logs from. This can be a single address as a string or an array of addresses. The example uses “0x0b7007c13325c48911f73a2dad5fa5dcbf808adc”.topics
(optional): An array of topics used to filter logs. Each event signature generated by the contract will have a unique topic. The example filters logs with the topic “0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef”.result
— the ID of the created filter. This ID can then be used with methods like eth_getFilterChanges
or eth_getFilterLogs
to retrieve the logs that match the filter.eth_newFilter
allows for specifying precise criteria, reducing the amount of data to process and improving responsiveness.The ID of the created filter
The response is of type object
.
Was this page helpful?