eth_newFilter

Creates a filter object, based on filter options, to notify when the state changes (logs).

📘

Supported on Fantom (mainnet) only.

Parameters

object- The transaction response object which contains the following filter information:

  • fromBlock- string - (optional) The block number as a string in hexadecimal format or tags. The supported tag values include earliest for the earliest/genesis block, latest for the latest mined block, pending for the pending state/transactions, safe for the most recent secure block, and finalized for the most recent secure block accepted by more than 2/3 of validators. safe and finalized are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova, and Avalanche C-chain
  • toBlock- string - (optional) The block number as a string in hexadecimal format or tags. The supported tag values include earliest for the earliest/genesis block, latest for the latest mined block, pending for the pending state/transactions, safe for the most recent secure block, and finalized for the most recent secure block accepted by more than 2/3 of validators. safe and finalized are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova, and Avalanche C-chain
  • address- string - (optional) The contract address or a list of addresses from which logs should originate
  • topics- string - (optional) An array of DATA topics and also, the topics are order-dependent.

Returns

  • result - It returns a filter id to be used when calling eth_getFilterChanges

API Endpoint

The format of a Fantom API endpoint is
https://open-platform.nodereal.io/{{apiKey}}/fantom/

Here is an example:
https://open-platform.nodereal.io/4c0a1c23661a4e26bcbcwed461e34ea9/fantom/

Example

Request

curl https://open-platform.nodereal.io/{{apiKey}}/fantom/ \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"fromBlock": "0xe20360", "toBlock": "0xe20411", "address": "0x6b175474e89094c44da98b954eedeac495271d0f","topics": []}],"id":1}'

Result