Skip to main content

eth_getFilterChanges

Polling method for the filter with the given ID (created using eth_newFilter). Returns an array of logs, block hashes, or transaction hashes since last poll, depending on the installed filter.

Parameters (by position)

Filter identifier string required


Result

Log objects array<string> or array<object>


Show Option 1 new block or transaction hashes array

new block or transaction hashes fields

Log objects array<string>

32 byte hex value

Match pattern: ^0x[0-9a-f]{64}$


Show Option 2 new logs array

new logs fields

Log objects array<object>

log


Show Log objects object

Log objects fields

  • removed boolean

    removed


  • logIndex string

    log index

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • transactionIndex string

    transaction index

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • transactionHash string required

    transaction hash

    Match pattern: ^0x[0-9a-f]{64}$


  • blockHash string

    block hash

    Match pattern: ^0x[0-9a-f]{64}$


  • blockNumber string

    block number

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • blockTimestamp string

    block timestamp

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]*)$


  • address string

    address

    Match pattern: ^0x[0-9a-fA-F]{40}$


  • data string

    data

    Match pattern: ^0x[0-9a-f]*$


  • topics array<string>

    32 hex encoded bytes

    Match pattern: ^0x[0-9a-f]{64}$


  • additionalProperties false


Examples

eth_getFilterChanges example

Request

{
"params": [
"0x01"
]
}

Response

[
{
"logIndex": "0x0",
"removed": false,
"blockNumber": "0x233",
"blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
"blockTimestamp": "0x11",
"transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
"transactionIndex": "0x0",
"address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
"data": "0x0000000000000000000000000000000000000000000000000000000000000004",
"topics": [
"0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
]
},
{
"logIndex": "0x0",
"removed": false,
"blockNumber": "0x238",
"blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
"blockTimestamp": "0x22",
"transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
"transactionIndex": "0x0",
"address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
"data": "0x0000000000000000000000000000000000000000000000000000000000000007",
"topics": [
"0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
]
}
]