eth_getTransactionByBlockHashAndIndex
Defined in the Ethereum JSON-RPC Specification
Returns information about a transaction by block hash and transaction index position.
Parameters
type GetTransactionByBlockHashAndIndexParams = [string, string]
- Hash of a block
- Integer of the transaction index position (hexadecimal)
Returns
interface Transaction {
hash: string // Hash of the transaction
nonce: string // The number of transactions made by the sender prior to this one
blockHash: string | null // Hash of the block where this transaction was in. null if pending
blockNumber: string | null // Block number where this transaction was in. null if pending
transactionIndex: string | null // Integer of the transaction's index position in the block. null if pending
from: string // Address of the sender
to: string | null // Address of the receiver. null when it's a contract creation transaction
value: string // Value transferred in wei
gasPrice: string // Gas price provided by the sender in wei
gas: string // Gas provided by the sender
input: string // The data sent along with the transaction
v: string // ECDSA recovery id
r: string // ECDSA signature r
s: string // ECDSA signature s
}
Returns null
when no transaction was found.
Errors
Code | Message |
---|---|
4200 | Unsupported method |