For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

Botanix — web3, net, eth (3/3)

API reference for Botanix. All methods ->

Part 3 of 3: 1 · 2 · 3

eth_getTransactionByBlockHashAndIndex

Returns information on a transaction specified by block hash and transaction index position.

Parameters


  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (array; required):

    1. <string> (data, 32 bytes): a block hash.
    2. <string> (quantity): a transaction index position.

Returns


  • blockHash (string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending.
  • blockNumber (string; quantity): a number of the block containing the transaction; null when it's pending.
  • from (string; data, 20 bytes): an address of the sender.
  • gas (string; quantity): the gas provided by the sender.
  • gasPrice (string; quantity): the gas price provided by the sender in wei.
  • hash (string; data, 32 bytes): the hash of the transaction.
  • input (string; data): the data send along with the transaction.
  • nonce (string; quantity): the number of transactions made by the sender prior to this one.
  • to (string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction.
  • transactionIndex (string; quantity): the transaction index position in the block; null when it's pending.
  • value (string; quantity): the value transferred in wei.
  • v (string; quantity): ECDSA recovery ID.
  • r (string; quantity): ECDSA signature r.
  • s (string; quantity): ECDSA signature s.

Request example

curl -X POST https://rpc.ankr.com/botanix_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockHashAndIndex",
"params": ["0x98502d6708fb49ed2762f17ad038bd98ea6e2798a5239137f25e586b93da4e07", "0x0"],
"id": 1
}'

Response example

{
"id": 1,
"jsonrpc": "2.0",
"result": {
"hash": "0x8816760db1ab5121f82ccc6074e1b81e732354e9c0a21a893c2e0d62980b6735",
"nonce": "0x31",
"blockHash": "0x98502d6708fb49ed2762f17ad038bd98ea6e2798a5239137f25e586b93da4e07",
"blockNumber": "0x660b5",
"transactionIndex": "0x0",
"from": "0x891c16e3269e35202ba2b75fcb94c821fc2cb91d",
"to": "0x33b1ed34c11910f767b15ebabab782d61fb2c5ea",
"value": "0x0",
"gasPrice": "0x189b3",
"gas": "0x3a83c",
"maxFeePerGas": "0x189ac",
"maxPriorityFeePerGas": "0x189ac",
"input": "0x6c09596000000000000000000000000044cfd6b8e7ca65002f87250bbd5e4b3af9efbcaf000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000000000070c84c980000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000891c16e3269e35202ba2b75fcb94c821fc2cb91d0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000044cfd6b8e7ca65002f87250bbd5e4b3af9efbcaf000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000000000070c8669a1000000000000000000000000891c16e3269e35202ba2b75fcb94c821fc2cb91d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a5e0ae4e5103dc71ca290aa3654830442357a4890000000000000000000000002d1306bf00468b69345bbf1a2d01aa920359535a00000000000000000000000044cfd6b8e7ca65002f87250bbd5e4b3af9efbcaf000000000000000000000000233631132fd56c8f86d1fc97f0b82420a8d20af3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000026f20000000000000000000000000000000000000000000000000000000000000001",
"r": "0xc815313071e4762dfdb3ed934c7dca43ed891c16807cfe1d68c874a565dff23b",
"s": "0x78d96a0cd608746d7d05a9d0415ba4d337a09be745a8f0db4f86c6dfd2c9c144",
"v": "0x1",
"yParity": "0x1",
"chainId": "0xe34",
"accessList": [],
"type": "0x2"
}
}