Skip to main content

NewFilter

Filters

Creates a new filter.

Params

(1)

1. query (required)

The query structure of the filter.

Addresses
addresses
required

The addresses of the accounts/contracts the logs for whose events should be retrieved by the filter.

BlockHash
string

The hash of the blocks whose logs should be retrieved by the filter.

FromBlock
integer

The beginning of the range of the blocks whose logs should be retrieved by the filter.

ToBlock
integer

The end of the range of the blocks whose logs should be retrieved by the filter.

Topics
topics
required

The topics of the events whose lgos should be retrieved by the filter.

Result

(filterId)
string

The ID of the filter.

API credentials

Username

Token

Params

query

Unsupported field schema for field root_Addresses: Missing items definition.

{
  "title": "addresses",
  "type": "array"
}

Unsupported field schema for field root_Topics: Missing items definition.

{
  "title": "topics",
  "type": "array"
}

Request

curl -X POST https://api.devnet.nil.foundation/api/undefined/undefined \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_newFilter",
"params": [
null
],
"id": 1
}'