curl --request POST \
--url https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getRawTransactionByBlockHashAndIndex",
"id": 1,
"params": [
"0x07fcc7d5f86839e12afa756e979de05812b5341f936b850c9409aa0938819b30",
"0x1"
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}
curl --request POST \
--url https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getRawTransactionByBlockHashAndIndex",
"id": 1,
"params": [
"0x07fcc7d5f86839e12afa756e979de05812b5341f936b850c9409aa0938819b30",
"0x1"
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}
eth_getRawTransactionByBlockHashAndIndex
retrieves the raw transaction data as a hexadecimal string for a transaction in a specific block, identified by the block hash and the transaction’s index position within that block. This method is useful for obtaining the complete transaction data, including its signature, without needing the transaction hash.
blockHash
— the hash of the block containing the transaction.transactionIndex
— the index position of the transaction in the block, specified as a hexadecimal. The example uses "0x1"
.result
— the raw transaction data as a hexadecimal string.eth_getRawTransactionByBlockHashAndIndex
method is essential for:
Raw transaction data for the given block hash and index
The response is of type object
.