Skip to main content

eth_getTransactionByBlockHashAndIndex RPC Method

Returns information about a transaction given a blockhash and transaction index position.

Updated on
Nov 02, 2023

To use the eth_getTransactionByBlockHashAndIndex method on the Avalanche C-Chain, ensure that the end of your URL includes ext/bc/C/rpc.

Parameters

blockHash
string
REQUIRED

The block hash

index
string
REQUIRED

An integer of the transaction index position encoded as a hexadecimal

Returns

object
object | null

The transaction response object, or null if no transaction is found:

blockHash
string | null

The hash of the block where this log was in. null when it's a pending log

blockNumber
string | null

The block number where this log was in. null when it's a pending log

from
string

The address of the sender

gas
string

The gas provided by the sender, encoded as hexadecimal

gasPrice
string

The gas price provided by the sender in wei, encoded as hexadecimal

maxFeePerGas
string

The maximum fee per gas set in the transaction

maxPriorityFeePerGas
string

The maximum priority gas fee set in the transaction

hash
string

The hash of the transaction

input
string

The data sent along with the transaction

nonce
string

The number of transactions made by the sender before this one encoded as hexadecimal

to
string | null

The address of the receiver. null when it's a contract creation transaction

transactionIndex
string | null

The integer of the transaction's index position that the log was created from. null when it's a pending log

value
string

The value transferred in wei encoded as hexadecimal

type
string

The transaction type

accessList
array

A list of addresses and storage keys that the transaction plans to access

chainId
string

The chain ID of the transaction, if any

v
string

The standardized V field of the signature

r
string

The R field of the signature

s
string

The S field of the signature

Request
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free