RPCFast
Main PageChainsPricingBlog
  • Welcome to RPC Fast
  • 🐇RPC Fast API
    • Introduction
    • Getting Started
    • Pricing Plan
    • Growth Plan
    • Compute Units (CUs)
    • CUPS (Rate Limit)
    • Archive Node
    • JSON Web Token (JWT)
    • Ethereum API
      • eth_accounts - Ethereum
      • eth_blockNumber - Ethereum
      • eth_call - Ethereum
      • eth_chainId - Ethereum
      • eth_estimateGas - Ethereum
      • eth_gasPrice - Ethereum
      • eth_getBalance - Ethereum
      • eth_getBlockByHash - Ethereum
      • eth_getBlockByNumber - Ethereum
      • eth_getBlockTransactionCountByHash - Ethereum
      • eth_getBlockTransactionCountByNumber - Ethereum
      • eth_getCode - Ethereum
      • eth_getFilterChanges - Ethereum
      • eth_getFilterLogs - Ethereum
      • eth_getLogs - Ethereum
      • eth_getProof - Ethereum
      • eth_getStorageAt - Ethereum
      • eth_getTransactionByBlockHashAndIndex - Ethereum
      • eth_getTransactionByBlockNumberAndIndex - Ethereum
      • eth_getTransactionByHash - Ethereum
      • eth_getTransactionCount - Ethereum
      • eth_getTransactionReceipt - Ethereum
      • eth_getUncleByBlockHashAndIndex - Ethereum
      • eth_getUncleByBlockNumberAndIndex - Ethereum
      • eth_getUncleCountByBlockNumber - Ethereum
      • eth_getUncleCountByBlockHash - Ethereum
      • eth_newBlockFilter - Ethereum
      • eth_newFilter - Ethereum
      • eth_newPendingTransactionFilter - Ethereum
      • eth_sendRawTransaction - Ethereum
      • eth_subscribe - Ethereum
      • eth_syncing - Ethereum
      • eth_uninstallFilter - Ethereum
      • eth_unsubscribe - Ethereum
      • net_listening - Ethereum
      • net_version - Ethereum
      • web3_clientVersion - Ethereum
      • web3_sha3 - Ethereum
    • Yellowstone gRPC
    • Solana node benefits
  • Solana Trader API
    • Websocket endpoints
  • 🧩GUIDES
    • Intro
    • How to Add RPC Fast Endpoints to MetaMask
    • How to Add Polygon to MetaMask
    • How to check Solana RPC latency
  • Community
  • Use of Cookies
  • Support
  • Transaction Simulation
Powered by GitBook
On this page
  • How to Use the eth_getFilterChanges Method
  • Parameters
  • What you receive
  • Sample
  1. RPC Fast API
  2. Ethereum API

eth_getFilterChanges - Ethereum

A data collecting method that shows a logs array appeared since last data collection

How to Use the eth_getFilterChanges Method

Parameters

QUANTITY - an id of the filter.

What you receive

Array which contains log objects. In case if nothing has changed since the last poll you’ll receive an empty one.

  • If filters were created via eth_newBlockFilter the outcome is block hashes (DATA, 32 Bytes), such as ["0x3454645634534..."].

  • If filters were created via eth_newPendingTransactionFilter the outcome is transaction hashes (DATA, 32 Bytes), e.g. ["0x6345343454645..."].

  • If filters were created via eth_newFilter logs will be presented as objects with parameters stated below:

    • removed: TAG - true in case of the log removal, because of a chain reorganization. false if it's an existing actual log.

    • logIndex: QUANTITY - the log index position presented as an integer. returns null in case of a pending log.

    • transactionIndex: QUANTITY - the transactions index position log was created from, has an integer form. null in case of a pending log.

    • transactionHash: DATA, 32 Bytes - transactions’ hash that has created this log. returns null in case of a pending log.

    • blockHash: DATA, 32 Bytes - the block’s hash where this log was located. returns null in case of a pending log.

    • blockNumber: QUANTITY - the block’s number where this log was located. returns null in case of a pending log.

    • address: DATA, 20 Bytes - the log’s origination address.

    • data: DATA - a param with the log’s non-indexed arguments.

    • topics: Array of DATA - contains from 0 to 4 32 Bytes DATA with indexed log arguments. (In solidity: The first topic is the hash of the signature of the event (such as Deposit(address,bytes32,uint256)), unless the event declaration is with the anonymous specifier.)

Sample

Here is a typical appliance example.

Call

curl https://eth-mainnet.rpcfast.com/?api_key=<key> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0xd1bdcf5b6141c7ec379531c851cb91d3"],"id":1}'

Outcome

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [{
    "logIndex": "0x1", // 1
    "blockNumber":"0x1b4", // 436
    "blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
    "transactionHash":  "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
    "transactionIndex": "0x0", // 0
    "address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
    "data":"0x0000000000000000000000000000000000000000000000000000000000000000",
    "topics": ["0x59ebeb90bc63057b6515673c3ecf9438e5058bca0f92585014eced636878c9a5"]
    },{
      ...
    }]
}
Previouseth_getCode - EthereumNexteth_getFilterLogs - Ethereum

Last updated 2 years ago

🐇