curl --request POST \
--url https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockHashAndIndex",
"id": 1,
"params": [
"0x07fcc7d5f86839e12afa756e979de05812b5341f936b850c9409aa0938819b30",
"0x1"
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": {
"blockHash": "<string>",
"blockNumber": "<string>",
"from": "<string>",
"gas": "<string>",
"gasPrice": "<string>",
"hash": "<string>",
"input": "<string>",
"nonce": "<string>",
"to": "<string>",
"transactionIndex": "<string>",
"value": "<string>",
"v": "<string>",
"r": "<string>",
"s": "<string>"
}
}
curl --request POST \
--url https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockHashAndIndex",
"id": 1,
"params": [
"0x07fcc7d5f86839e12afa756e979de05812b5341f936b850c9409aa0938819b30",
"0x1"
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": {
"blockHash": "<string>",
"blockNumber": "<string>",
"from": "<string>",
"gas": "<string>",
"gasPrice": "<string>",
"hash": "<string>",
"input": "<string>",
"nonce": "<string>",
"to": "<string>",
"transactionIndex": "<string>",
"value": "<string>",
"v": "<string>",
"r": "<string>",
"s": "<string>"
}
}
eth_getTransactionByBlockHashAndIndex
retrieves information about a transaction by specifying the block hash and the transaction’s index position within the block. This method is useful for fetching specific transactions when the block hash and index are known.
blockHash
— the hash of the block.transactionIndex
— the index position of the transaction in the block, specified as a hexadecimal. The example uses "0x1"
.result
— an object containing details about the transaction, including the block hash, block number, from address, gas used, gas price, hash, input data, nonce, to address, transaction index, value transferred, and the signature components (v, r, s).eth_getTransactionByBlockHashAndIndex
method is essential for:
Transaction information for the given block hash and index
The response is of type object
.