eth_getTransactionByBlockNumberAndIndex
Returns a transaction based on a block number and the transaction’s index position.
web3.eth.getTransactionByBlockNumberAndIndex(BlockNumber, indexNumber [, callback])Parameters
A block number .
The transaction’s index position.
Optional callback, returns an error object as first parameter and the result as second.
Returns
A transaction object its hash transactionHash:
hash: Hash of the transaction.
nonce: The number of transactions made by the sender prior to this one.
blockHash: Hash of the block where this transaction was in.nullif pending.
blockNumber: Block number where this transaction was in.nullif pending.
transactionIndex: Integer of the transactions index position in the block.nullif pending.
from: Address of the sender.
to: Address of the receiver.nullif it’s a contract creation transaction.
value: Value transferred in wei.
gasPrice: Gas price provided by the sender in wei.
gas: Gas provided by the sender.
input: The data sent along with the transaction.
Example
Last updated