eth_getTransactionByBlockHashAndIndex - Ethereum

eth_getTransactionByBlockHashAndIndex. Returns information about a transaction by block hash and transaction index position

eth_getTransactionByBlockHashAndIndex - ethereum [Value: 19CU]
Returns information about a transaction by block hash and transaction index position.
Use cases

Use cases

  • Retrieve specific contract storage value by address
  • Verify current state of contract storage slots
  • Audit smart contract storage for data integrity
Constraints

Constraints

  • Requires valid smart contract address input
  • Needs accurate specific storage slot key
  • Depends on the latest blockchain state data
Get started
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl https://eth.drpc.org \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_getTransactionByBlockHashAndIndex","params":["0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b","0x0"],"id":1,"jsonrpc":"2.0"}'
Copy
Response
200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "blockHash": "0xbf06c77f6ed9a65441795eb8c2ccd694b3fc9b4d1be6066bf7ed52c73c5ec97c",
    "blockNumber": "0xfb6d2d",
    "from": "0x2b94cb7ce403ccc9ca89aea9aa8cddb409e6fb6a",
    "gas": "0x5208",
    "gasPrice": "0x2757a4abf6",
    "maxFeePerGas": "0x314492d449",
    "maxPriorityFeePerGas": "0x59682f00",
    "hash": "0x32b8edb39cd1f9d1299253ceb734539745f9bba284c7c7a2391ac62223192c68",
    "input": "0x",
    "nonce": "0xa2",
    "to": "0x514368a3dfb523dd8e0e049d9b22e20eec96eaf7",
    "transactionIndex": "0x64",
    "value": "0x16423069e486f18",
    "type": "0x2",
    "accessList": [],
    "chainId": "0x1",
    "v": "0x0",
    "r": "0x98695bf77dc2aed3308c913e9a5ac273d1de992f61da7eb7352174b30d9ce2e6",
    "s": "0x186b72d1ee15e3e76a7ed301062a2da3d93b1727135f063d845dca258445fab1",
    "yParity": "0x0"
  }
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersarray of strings
array of strings
blockHashstring
The block hash
indexstring
An integer of the transaction index position encoded as a hexadecimal

Response

200
A transaction object, or null when no transaction was found.

Response params

object
idinteger
jsonrpcstring
resultobject
Array of log objects, or an empty array if nothing has changed since last poll.
object
blockHashstring
The number of the block where the given transaction was included.
blockNumberstring
The block number where this log was in. null when its pending. null when its pending log.
transactionIndexstring
Integer of the transactions index position log was created from. null when its pending log.
noncestring
The number of transactions made by the sender prior to this one.
hashstring
32 Bytes - hash of the transaction.
fromstring
20 Bytes - address of the sender.
gasstring
Gas provided by the sender.
gasPricestring
Gas price provided by the sender in Wei.
inputstring
The data send along with the transaction.
rstring
ECDSA signature r.
sstring
ECDSA signature r.
tostring
20 Bytes - address of the receiver. null when it's a contract creation transaction.
vstring
ECDSA recovery id.
valuestring
Value transferred in Wei.