eth_getTransactionByBlockHashAndIndex - Ethereum

This method recalls the transaction data after you enter block hash and transaction index position

How to Use the eth_getTransactionByBlockHashAndIndex Method

Parameters

DATA, 32 Bytes - block’s hash.

QUANTITY - the transaction index position presented as an integer. params:

[ 
    '0xc0f4906fea23cf6f3cce98cb44e8e1449e455b28d684dfa9ff65426495584de6', 
    '0x0' // 0 
]

What you receive

TRANSACTION - An object of transaction, or returns null in case no transaction was found.

  • hash: 32 Bytes - the transaction’s hash.

  • nonce: how many transactions were sent from one address before the current one.

  • blockHash: DATA, 32 Bytes - the block’s hash where this transaction was located. returns null in case of a pending log.

  • blockNumber: the number of a block related to the chosen transaction. null when its pending.

  • transactionIndex: integer of the transactions index position in the block. returns null in case of a pending log.

  • from: 20 Bytes - the sender’s address.

  • to: 20 Bytes - the receiver’s address. returns null if a transaction relates to smart contract creation.

  • value: value represented in Wei.

  • gasPrice: gas price that the sender did provide. represented in Wei.

  • gas: gas amount that the sender provided.

  • input: which data was sent along the transaction.

Sample

Here is a typical appliance example.

Call

Outcome

Last updated