curl --request POST \
--url https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getFilterChanges",
"id": 1,
"params": [
"0x4a2b3c"
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": [
{
"removed": true,
"logIndex": "<string>",
"transactionIndex": "<string>",
"transactionHash": "<string>",
"blockHash": "<string>",
"blockNumber": "<string>",
"address": "<string>",
"data": "<string>",
"topics": [
"<string>"
]
}
]
}
curl --request POST \
--url https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getFilterChanges",
"id": 1,
"params": [
"0x4a2b3c"
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": [
{
"removed": true,
"logIndex": "<string>",
"transactionIndex": "<string>",
"transactionHash": "<string>",
"blockHash": "<string>",
"blockNumber": "<string>",
"address": "<string>",
"data": "<string>",
"topics": [
"<string>"
]
}
]
}
eth_getFilterChanges
retrieves the changes of a filter since it was last accessed. This method is crucial for applications that need to monitor specific events or blocks on the Base blockchain.
eth_getFilterChanges
in this page, first create a new filter using one of the following:Then use the fresh filter ID as the parameter for eth_getFilterChanges
.filterId
— the ID of the filter whose changes are being queried. This ID is returned by filter creation methods such as eth_newBlockFilter
, or eth_newFilter
. For this example, a random value "0x4a2b3c"
is used.result
— an array of changes. For log filters, this will be an array of log entries. For block filters, it will be an array of block hashes. For pending transaction filters, it will be an array of transaction hashes. Each log entry object contains details such as the log index, transaction index, transaction hash, block hash, block number, address, data, and topics.eth_getFilterChanges
method is essential for:
The changes of the filter since last accessed
The response is of type object
.
Was this page helpful?