eth_newFilter

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

https://api.1inch.com/web3/59144
Supported on:
Linea

Parameters

Filter (required)

Filter
* object
fromBlock
string
toBlock
string
address
any
oneOf[0]
null
oneOf[1]
string
oneOf[2]
array
items
string
topics
any
oneOf[0]
null
oneOf[1]
array
items
any
oneOf[0]
string
oneOf[1]
array
items
string
additionalProperties
none

Request

Request
object
jsonrpc
* string (Enum)
2.0
method
* string
params
array
items
object
fromBlock
string
toBlock
string
address
any
oneOf[0]
null
oneOf[1]
string
oneOf[2]
array
items
string
topics
any
oneOf[0]
null
oneOf[1]
array
items
any
oneOf[0]
string
oneOf[1]
array
items
string
additionalProperties
none
id
* number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const response = await fetch('https://api.1inch.com/web3/59144', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${API_KEY}`,
  },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'eth_newFilter',
    params: [
      {
        fromBlock: 'string',
        toBlock: 'string',
        address: null,
        topics: null,
      },
    ],
    id: 1,
  }),
});

const data = await response.json();
console.log(data);

Response

Filter identifier

Filter identifier
string
JSON
1
2
"0x01"

Did you find what you need?