eth_getFilterChanges(Alpha) - Scroll

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

Parameters

  • QUANTITY - The filter id.
params: ["0xfe704947a3cd3ca12541458a4321c869"];

Returns

Array - 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. ["0x3454645634534..."].
  • For filters created with eth_newPendingTransactionFilter the return are transaction hashes (DATA, 32 Bytes), e.g. ["0x6345343454645..."].
  • For filters created with eth_newFilter logs are objects with following params:
    • removed: TAG - True when the log was removed, due to a chain reorganization. false if its a valid log.
    • logIndex: QUANTITY - Integer of the log index position in the block. null when its pending log.
    • transactionIndex: QUANTITY - Integer of the transactions index position log was created from. null when its pending log.
    • transactionHash: DATA, 32 Bytes - Hash of the transactions this log was created from. null when its pending log.
    • blockHash: DATA, 32 Bytes - Hash of the block where this log was in. null when its pending. null when its pending log.
    • blockNumber: QUANTITY - The block number where this log was in. null when its pending. null when its pending log.
    • address: DATA, 20 Bytes - Address from which this log originated.
    • data: DATA - Contains one or more 32 Bytes non-indexed arguments of the log.
    • topics: Array of DATA - Array of 0 to 4 32 Bytes DATA of indexed log arguments.
      • In solidity: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declare the event with the anonymous specifier.

Example

Request

curl --location --request POST 'https://scroll-alpha.unifra.io/v1/your-api-key' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0x433f460405cc3301fc07314056de481e"],"id":73}'

Result

{
    "jsonrpc": "2.0",
    "id": 73,
    "result": []
}
Language
Click Try It! to start a request and see the response here!