Contents

eth_newFilter RPC method

Parameters:

  1. Object - Should contain filter information, all keys are optional:

    fromBlock - Integer block number encoded as a hexadecimal, "latest","pending", or "earliest" tags.

    toBlock - Integer block number encoded as a hexadecimal, "latest","pending", or "earliest" tags.

    address - Contract address or a list of addresses from which logs should originate.

    topics - Array of DATA topics. Topics are order-dependent. Go here to learn more about topics.

Returns:

  1. Result - A filter id - to be used when calling eth_getFilterChanges.

Code Examples:

curl http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"fromBlock": 1000000, "toBlock": 1000100, address": "0x6B175474E89094C44Da98b954EedeAC495271d0F"}],"id":420}'
Ready to try QuickNode? Start your 7-day free trial