eth_getTransactionByBlockHashAndIndex - Mantle
eth_getTransactionByBlockHashAndIndex. Fetches a transaction by its block hash and index
eth_getTransactionByBlockHashAndIndex - mantle [Value: 19CU]
Retrieves a specific transaction from a block using the block's hash and the transaction's index position
Use cases
- Retrieve specific contract storage value by address
- Verify current state of contract storage slots
- Audit smart contract storage for data integrity
Constraints
- Requires valid smart contract address input
- Needs accurate specific storage slot key
- Depends on the latest blockchain state data
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl https://mantle.drpc.org \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_getTransactionByBlockHashAndIndex","params":["0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b","0x0"],"id":1,"jsonrpc":"2.0"}'
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"
}
}
Request params
idinteger
jsonrpcstring
methodstring
array of strings
blockHashstring
The hash of the block containing the transaction.
indexstring
The index position of the transaction within the block, specified as an integer or hexadecimal string.
Response
200
Detailed transaction object if found, or null if no transaction is found at the given index.Response params
object
idinteger
jsonrpcstring
resultobject
object
blockHashstring
Hash of the block containing the transaction.
blockNumberstring
Block number containing the transaction.
transactionIndexstring
Position of the transaction in the block (null if pending)
noncestring
Number of prior transactions from the sender.
hashstring
32 Bytes - hash of the transaction.
fromstring
Transaction hash.
gasstring
Gas provided by the sender.
gasPricestring
Gas price provided by the sender in wei.
inputstring
Data sent with the transaction.
rstring
ECDSA signature r.
sstring
ECDSA signature r.
tostring
Receiver's address (null if contract creation).
vstring
ECDSA recovery id.
valuestring
Value transferred in Wei.