HomeGuidesAPI ReferenceChangelog
GuidesAPI ReferenceCommunityDiscordBlogFAQBug BountyAnnouncementsChange Log
API Reference

eth_getFilterChanges

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

Parameters
QUANTITY - the filter id.

Returns

  • For filters created with eth_newFilte, return logs object list, each log object with following params:
FieldTypeDescription
removedTAGtrue when the log was removed, due to a chain reorganization. false if its a valid log.
logIndexQUANTITYInteger of the log index position in the block. null when its pending log.
transactionIndexQUANTITYInteger of the transactions index position log was created from. null when its pending log.
transactionHashDATA, 32BytesHash of the transactions this log was created from.
blockHashDATA, 32 BytesHash of the block where this log was in. null when its pending.
blockNumberQUANTITYThe block number where this log was in.
addressDATA, 32 BytesAddress from which this log originated.
dataDATAContains one or more 32 Bytes non-indexed arguments of the log.
topicsDATA[]Event topic and indexed arguments.
  • For filters created with eth_newBlockFilter the return are block hashes (DATA, 32 Bytes).

Example

curl -X POST 'https://api.shasta.trongrid.io/jsonrpc' --data '{
    "jsonrpc": "2.0",
    "method": "eth_getFilterChanges",
    "params": [
        "0xc11a84d5e906ecb9f5c1eb65ee940b154ad37dce8f5ac29c80764508b901d996"
    ],
    "id": 71
}'

Result

{
    "jsonrpc": "2.0",
    "id": 71,
    "error": {
        "code": -32000,
        "message": "filter not found",
        "data": "{}"
    }
}