eth_getTransaction

Get transaction by its hash

web3.eth.getTransaction(transactionHash [, callback])

Parameters

  1. The transaction hash.

  2. (optional) 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. null if pending.

  • blockNumber: Block number where this transaction was in. null if pending.

  • transactionIndex: Integer of the transactions index position in the block. null if pending.

  • from: Address of the sender.

  • to: Address of the receiver. null if 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.

  • chainId : chain ID of the current connected node

  • creates

  • piblicKey

  • r: First 32 bytes of the signature

  • rawThe RLP encoded transaction

  • s: Next 32 bytes of the signature

  • standardV

  • v: Recovery value + 27

Example

Last updated