eth_getTransactionByBlockNumberAndIndex

Returns information about a transaction by block number and transaction index position.

https://api.1inch.com/web3/10
Supported on:
Optimism

Parameters

Block (required)

Block
* any
oneOf[0]
string
oneOf[1]
string (Enum)
earliest
finalized
safe
latest
pending

Transaction index (required)

Transaction index
* string

Request

Request
object
jsonrpc
* string (Enum)
2.0
method
* string
params
array
items
any
oneOf[0]
any
oneOf[0]
string
oneOf[1]
string (Enum)
earliest
finalized
safe
latest
pending
oneOf[1]
string
id
* number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const response = await fetch('https://api.1inch.com/web3/10', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${API_KEY}`,
  },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'eth_getTransactionByBlockNumberAndIndex',
    params: ['string', 'string'],
    id: 1,
  }),
});

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

Response

Transaction information

Transaction information
any
oneOf[0]
null
oneOf[1]
object
oneOf[0]
object
type
* string
nonce
* string
to
* string
gas
* string
value
* string
input
* string
maxPriorityFeePerGas
* string
maxFeePerGas
* string
gasPrice
string
accessList
* array
items
object
address
* string
storageKeys
* array
items
string
additionalProperties
none
chainId
* string
authorizationList
* array
items
object
chainId
* string
nonce
* string
address
* string
yParity
* string
r
* string
s
* string
yParity
* string
v
string
r
* string
s
* string
oneOf[1]
object
type
* string
nonce
* string
to
* string
gas
* string
value
* string
input
* string
maxPriorityFeePerGas
* string
maxFeePerGas
* string
maxFeePerBlobGas
* string
gasPrice
string
accessList
* array
items
object
address
* string
storageKeys
* array
items
string
additionalProperties
none
blobVersionedHashes
* array
items
string
chainId
* string
yParity
* string
v
string
r
* string
s
* string
oneOf[2]
object
type
* string
nonce
* string
to
any
oneOf[0]
null
oneOf[1]
string
gas
* string
value
* string
input
* string
maxPriorityFeePerGas
* string
maxFeePerGas
* string
gasPrice
* string
accessList
* array
items
object
address
* string
storageKeys
* array
items
string
additionalProperties
none
chainId
* string
yParity
* string
v
string
r
* string
s
* string
oneOf[3]
object
type
* string
nonce
* string
to
any
oneOf[0]
null
oneOf[1]
string
gas
* string
value
* string
input
* string
gasPrice
* string
accessList
* array
items
object
address
* string
storageKeys
* array
items
string
additionalProperties
none
chainId
* string
yParity
* string
v
string
r
* string
s
* string
oneOf[4]
object
type
* string
nonce
* string
to
any
oneOf[0]
null
oneOf[1]
string
gas
* string
value
* string
input
* string
gasPrice
* string
chainId
string
v
* string
r
* string
s
* string
blockHash
* any
oneOf[0]
null
oneOf[1]
string
blockNumber
* any
oneOf[0]
null
oneOf[1]
string
from
* string
hash
* string
transactionIndex
* string
JSON
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
  "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",
  "blockNumber": "0x422",
  "chainId": 2018,
  "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
  "gas": "0x5208",
  "gasPrice": "0x3b9aca00",
  "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",
  "input": "0x",
  "nonce": "0x1",
  "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",
  "transactionIndex": "0x0",
  "value": "0x4e1003b28d9280000",
  "v": "0xfe7",
  "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",
  "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"
}

Did you find what you need?