Log In

eth_getTransactionByBlockNumberAndIndex - Base

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

Parameters

  • QUANTITY|TAG - A block number, or the string "earliest", "latest" or "pending", as in the default block parameter.
  • QUANTITY - The transaction index position.
params: [
	"latest", // 668
	"0x0", // 0
];

Returns

See eth_getTransactionByHash


Example

Request

curl --request POST \
     --url https://base-testnet.unifra.io/v1/{your-api-key} \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": [
    "latest",
    "0x0"
  ],
  "id": "1"
}
'

Result

{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "blockHash": "0x44990a7affe1567f3c3ebd8f655d0b0ab68bf882e7440ba8e646b06575b1abdd",
    "blockNumber": "0x5c9893",
    "from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001",
    "gas": "0xf4240",
    "gasPrice": "0x0",
    "hash": "0xebce33c95efcb014ae565b5519b79e9ea32b7ad6ccf98c2f751061a36bf77b51",
    "input": "0x015d8eb900000000000000000000000000000000000000000000000000000000008c994c0000000000000000000000000000000000000000000000000000000064929dd400000000000000000000000000000000000000000000000000000000000000111a64af4b838f7624834a7cfb3e77d7248b86a88aa8a0ab13a8cc0e85d0c5240f000000000000000000000000000000000000000000000000000000000000000500000000000000000000000073b4168cc87f35cc239200a20eb841cded23493b000000000000000000000000000000000000000000000000000000000000083400000000000000000000000000000000000000000000000000000000000f4240",
    "nonce": "0x5c9892",
    "to": "0x4200000000000000000000000000000000000015",
    "transactionIndex": "0x0",
    "value": "0x0",
    "type": "0x7e",
    "v": "0x0",
    "r": "0x0",
    "s": "0x0",
    "sourceHash": "0x672fd15ecf4562f98b03c5510d5f53f0a8e4f276b4ac2b6c7c5e76a87bdc5378",
    "mint": "0x0"
  }
}
Language
Click Try It! to start a request and see the response here!