eth_getTransactionReceipt - Ethereum
Shows a receipt of a transaction with a transaction’s hash entered. It won’t be shown in cases of pending transactions
How to Use the eth_getTransactionReceipt Method
It is a useful call if you need to track the transaction’s status as far as it shows null until the successful result appears. Another function is an ability to see the contact address if you need to create a smart contact.
Parameters
DATA, 32 Bytes - hash of a transaction params:
What you receive
Object - A receipt of the transaction or null if the transaction was not finished:
transactionHash: DATA, 32 Bytes - the transaction’s hash.
transactionIndex: QUANTITY - integer of the transactions index position in the block.
blockHash: DATA, 32 Bytes - hash of the block where this transaction was located.
blockNumber: QUANTITY - the number of a block where this transaction took place.
from: DATA, 20 Bytes - the sender’s address.
to: DATA, 20 Bytes - address of the receiver. returns null if it is a contract creation transaction
cumulativeGasUsed: QUANTITY - The total amount of gas used in this block at the moment when the transaction was finished
gasUsed: QUANTITY - How much gas did this single transaction consume.
contractAddress: DATA, 20 Bytes - An address of a contract, if it was a contract creation transaction, or null in all other cases.
logs: Array - Array of log objects generated by this transaction.
logsBloom: DATA, 256 Bytes - Bloom filter for light clients for retrieving related logs in a fast manner.
It can also return:
root : DATA 32 bytes of post-transaction stateroot (pre Byzantium)
status: QUANTITY either 1 (success) or 0 (failure)
Sample
Here is a typical appliance example.
Call
Outcome
Last updated