eth_getFilterChanges - Ethereum
eth_getFilterChanges. Retrieves the changes (logs or transaction hashes) for a filter created with eth_newFilter or eth_newBlockFilter
eth_getFilterChanges - ethereum [Value: 20CU]
Retrieves the changes (logs or transaction hashes) for a filter created with eth_newFilter or eth_newBlockFilter
Use cases
- Check for updates on created filter logs
- Monitor changes in blockchain events with filter
- Track specific contract events for real-time updates
Constraints
- Requires valid filter ID input
- Node must support filter change queries
- Accurate filter ID essential for relevant updates
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl --request POST \
--url https://eth.drpc.org \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"params": [
"0x1"
],
"method": "eth_getFilterChanges"
}
'
Response
200
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"address": "0x79c912fef520be002c2b6e57ec4324e260f38e50",
"topics": [
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
"0x000000000000000000000000b94cb72c9b6282b78107a7c8a5eb74de08177935",
"0x0000000000000000000000009c12939390052919af3155f41bf4160fd3666a6f"
],
"data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"blockNumber": "0x45cb8ed",
"transactionHash": "0xa850e378548efda5217e6853fd56cded533d1a61377838abc4ddcc2b13d0acde",
"transactionIndex": "0x0",
"blockHash": "0x60d83df96893805e81eca600a67570cea16481dee40d5e9b210eac215352b714",
"logIndex": "0x0",
"removed": false
}
]
}
Request params
idinteger
jsonrpcstring
methodstring
array of strings
filterIDstring
The ID of the filter for which to retrieve changes.
Response
200
The array of log objects or transaction hashes that represent the changes detected by the filter. Response params
object
idinteger
jsonrpcstring
resultarray_of_objects
The content of this array depends on the type of filter created.
object
blockHashstring
32-byte hash of the block containing the log, or null if pending.
blockNumberstring
Block number containing the log, or null if pending.
transactionIndexstring
Index position of the transaction that generated the log, or null if pending.
addressstring
20-byte address from which the log originated.
logIndexstring
Index position of the log in the block, or null if pending.
datastring
Non-indexed arguments of the log, in 32-byte segments.
removedboolean
Indicates if the log was removed due to a chain reorganization (true) or is valid (false).
topicsarray_of_strings
Array of zero to four 32-byte data strings of indexed log arguments.
transactionHashstring
Hash of the transaction that generated the log, or null if pending.
logsBloomstring
256-byte bloom filter for quick log retrieval by light clients.
statusinteger
Status of the transaction: 1 for success, 0 for failure.
effectiveGasPricestring
The effective gas price for the transaction.
typestring
Type of the transaction.