eth_getTransactionByBlockHashAndIndex

The eth_getTransactionByBlockHashAndIndex method returns information about a transaction by block hash and transaction index position on the Optimism network. This method allows you to retrieve a specific transaction from a block when you know the block hash and the transaction's position within that block, useful for sequential transaction processing and block analysis.


Parameters

parameter
type
description
blockHash
string (required)
Hash of the block (32 bytes)
transactionIndex
string (required)
Transaction index position in hex
Return Object

Returns the transaction object at the specified position, or null if no transaction exists at that index. The transaction object contains details such as sender, recipient, gas parameters, and transaction data.

Request Example
Request
Response Example
Response

Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?