eth_getTransactionByBlockNumberAndIndex

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

Parameters

  1. Quantity or tag - choose 1 of the following options:

    • A hexadecimal block number.

    • "earliest" - the earliest/genesis block.

    • "latest" - the latest mined block.

    • "safe" - the latest safe head block.

    • "finalized" - the latest finalized block.

    • "pending" - the pending state/transactions.

  2. Index position of the transaction in hex code.

Sample Request

curl https://lb.nodies.app/v1/<INSERT URL> \
   -H "x-api-key: <API-KEY>" \
   -X POST \
   -H "Content-Type: application/json" \
   -d '{ 
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "latest",
    "0x0"
  ]
}'

Sample Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "blockHash": "0x5c3bca0446ab5aefe208457d5c1e45c224c17a702c08aa11819b93297afe6e0b",
    "blockNumber": "0x1182681",
    "from": "0xae2fc483527b8ef99eb5d9b44875f005ba1fae13",
    "gas": "0x2e86b",
    "gasPrice": "0x166f11b58",
    "maxPriorityFeePerGas": "0x0",
    "maxFeePerGas": "0x166f11b58",
    "hash": "0xeeaeb33286931c4f089631b2c1ef44d8f573370e474ca0d0e66bc3ae394ca301",
    "input": "0x81cf553e9c493678d8606d6a5ba284643db2110df823bc8022ad00ae78736cd615f374d3085123a210448e74fc63930064",
    "nonce": "0x1619d7",
    "to": "0x6b75d8af000000e20b7a7ddf000ba900b4009a80",
    "transactionIndex": "0x0",
    "value": "0x8baddef5c",
    "type": "0x2",
    "accessList": [
      {
        "address": "0x553e9c493678d8606d6a5ba284643db2110df823",
        "storageKeys": [
          "0x000000000000000000000000000000000000000000000000000000000000000e",
          "0x0000000000000000000000000000000000000000000000000000000000000001",
          "0xfc6b1a703126e2de051660ff8c3f8d0d2e2391e13a62e9c1440a6b3bcf71e1cd",
          "0xfc6b1a703126e2de051660ff8c3f8d0d2e2391e13a62e9c1440a6b3bcf71e1ce",
          "0x000000000000000000000000000000000000000000000000000000000000000f",
          "0x0000000000000000000000000000000000000000000000000000000000000004",
          "0x75f96ab15d697e93042dc45b5c896c4b27e89bb6eaf39475c5c371cb2513f7d2",
          "0xfc6b1a703126e2de051660ff8c3f8d0d2e2391e13a62e9c1440a6b3bcf71e1cf",
          "0xfc6b1a703126e2de051660ff8c3f8d0d2e2391e13a62e9c1440a6b3bcf71e1cc",
          "0x0000000000000000000000000000000000000000000000000000000000000000",
          "0x0000000000000000000000000000000000000000000000000000000000000002"
        ]
      },
      {
        "address": "0xae78736cd615f374d3085123a210448e74fc6393",
        "storageKeys": [
          "0xb13754d277606a2d2a4b0b75aa440d8613b1fa8a1d6c437b93a244b976fa6435",
          "0x577b913a3c8810dd10161c9ae11e2ee31042564c62114c83b0bc5d3a3e71b362",
          "0x0000000000000000000000000000000000000000000000000000000000000000"
        ]
      },
      {
        "address": "0x1d8f8f00cfa6758d7be78336684788fb0ee0fa46",
        "storageKeys": ["0x18681ae3313545fc40918f2a4f696b24577bc493dd88b5607959adac1cf59ca1"]
      },
      {
        "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "storageKeys": [
          "0x4d428fa5e631df6e9bc2cfcc4c6f233552a7da6ac61f6a0957f360fb6b3b17f2",
          "0x12231cd4c753cb5530a43a74c45106c24765e6f81dc8927d4f4be7e53315d5a8"
        ]
      }
    ],
    "chainId": "0x1",
    "v": "0x1",
    "r": "0xed30d07fbb7b9557060a814772732f5a3bc35d079e30fec129df079960b2df43",
    "s": "0x39041b3f72d1eeb1757323a4d6b9acb00ec6ff6881c83f1a196a4095a3e82d4e"
  }
}

Last updated