eth_getLogs

Returns an array of all logs matching the specified filter.

https://api.1inch.com/web3/42161
Supported on:
Arbitrum

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/42161', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${API_KEY}`,
  },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'eth_getLogs',
    params: [
      {
        fromBlock: 'string',
        toBlock: 'string',
        address: null,
        topics: null,
      },
    ],
    id: 1,
  }),
});

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

Response

Log objects

Log objects
any
anyOf[0]
array
items
string
anyOf[1]
array
items
object
removed
boolean
logIndex
string
transactionIndex
string
transactionHash
* string
blockHash
string
blockNumber
string
address
string
data
string
topics
array
items
string
additionalProperties
none
JSON
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[
  {
    "logIndex": "0x0",
    "removed": false,
    "blockNumber": "0x233",
    "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",
    "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",
    "transactionIndex": "0x0",
    "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
    "data": "0x0000000000000000000000000000000000000000000000000000000000000004",
    "topics": [
      "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
    ]
  },
  {
    "logIndex": "0x0",
    "removed": false,
    "blockNumber": "0x238",
    "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",
    "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",
    "transactionIndex": "0x0",
    "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",
    "data": "0x0000000000000000000000000000000000000000000000000000000000000007",
    "topics": [
      "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"
    ]
  }
]

Did you find what you need?