eth_getFilterChanges

Polling method for a filter, which returns an array of logs which occurred since last poll.

🚧

NOTE: Filter must be created by calling either eth_newFilter or eth_newBlockFilter.

Parameters

Object NameRequiredTypeDetail
FILTER IDStringA hex code of an integer that represents the filter id.
"params": [
    "unknown"
]

Result

An array of log objects, or an empty array if nothing has changed since last poll.

🚧

NOTE: eth_getFilterChanges only returns logs since the filter was created, regardless of the block passed in to create the filter. To get logs ranging from a specific block you should use eth_getLogs.

  • For filters created with eth_newBlockFilter the return are block hashes (DATA, 32 Bytes), e.g. ["0x123456789..."].
  • For filters created with eth_newFilter logs are objects with following params:

Result Fields

KeyTypeDetail
addressStringAddress from which this log originated.
blockHashStringHash of the block where this log was in. null if either the returned block is pending or the log is pending.
blockNumberStringA hex code of an integer that represents the block number where this log was in. null if either the returned block is pending or the log is pending.
dataStringContains one or more 32 Bytes non-indexed arguments of the log.
logIndexStringA hex code of an integer that represents the log index position in the block. null if the log is pending.
removedBooleantrue if the log was removed, due to a chain reorganization. false if the log is valid.
topicsArrayArray of 0 to 4 32 Bytes DATA of indexed log arguments.
transactionHashStringHash of the transactions this log was created from. null if the log is pending.
transactionIndexStringA hex code of an integer that represents the transactions index position log was created from. null if the log is pending.

Example

Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["unknown"],"id":73}'

Return

unknown
Language
Click Try It! to start a request and see the response here!