Skip to main content

Relationship between Transaction Trie and Receipts Trie provides a good summary:

Transaction Receipts record the transaction outcome

Here is the Structure of a transaction receipt

blockHash: String, 32 Bytes - hash of the block where this transaction was in.
blockNumber: Number - block number where this transaction was in.
transactionHash: String, 32 Bytes - hash of the transaction.
transactionIndex: Number - integer of the transactions index position in the block.
from: String, 20 Bytes - address of the sender.
to: String, 20 Bytes - address of the receiver. null when its a contract creation transaction.
cumulativeGasUsed: Number - The total amount of gas used when this transaction was executed in the block.
gasUsed: Number - The amount of gas used by this specific transaction alone.
status: String - '0x0' indicates transaction failure , '0x1' indicates transaction succeeded.
contractAddress: String - 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null.
logs: Array - Array of log objects, which this transaction generated.

Take a look at the last two properties. A simple use of a receipt is to find out a new contract's contractAddress. A more advanced used for a receipt is with Proving the Existence of Logs to the Blockchain

The status indicates if the transaction succeeded or not (ie. it ran out of gas)

Relationship between Transaction Trie and Receipts Trie provides a good summary:

Transaction Receipts record the transaction outcome

Here is the Structure of a transaction receipt

blockHash: String, 32 Bytes - hash of the block where this transaction was in.
blockNumber: Number - block number where this transaction was in.
transactionHash: String, 32 Bytes - hash of the transaction.
transactionIndex: Number - integer of the transactions index position in the block.
from: String, 20 Bytes - address of the sender.
to: String, 20 Bytes - address of the receiver. null when its a contract creation transaction.
cumulativeGasUsed: Number - The total amount of gas used when this transaction was executed in the block.
gasUsed: Number - The amount of gas used by this specific transaction alone.
contractAddress: String - 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null.
logs: Array - Array of log objects, which this transaction generated.

Take a look at the last two properties. A simple use of a receipt is to find out a new contract's contractAddress. A more advanced used for a receipt is with Proving the Existence of Logs to the Blockchain

Relationship between Transaction Trie and Receipts Trie provides a good summary:

Transaction Receipts record the transaction outcome

Here is the Structure of a transaction receipt

blockHash: String, 32 Bytes - hash of the block where this transaction was in.
blockNumber: Number - block number where this transaction was in.
transactionHash: String, 32 Bytes - hash of the transaction.
transactionIndex: Number - integer of the transactions index position in the block.
from: String, 20 Bytes - address of the sender.
to: String, 20 Bytes - address of the receiver. null when its a contract creation transaction.
cumulativeGasUsed: Number - The total amount of gas used when this transaction was executed in the block.
gasUsed: Number - The amount of gas used by this specific transaction alone.
status: String - '0x0' indicates transaction failure , '0x1' indicates transaction succeeded.
contractAddress: String - 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null.
logs: Array - Array of log objects, which this transaction generated.

Take a look at the last two properties. A simple use of a receipt is to find out a new contract's contractAddress. A more advanced used for a receipt is with Proving the Existence of Logs to the Blockchain

The status indicates if the transaction succeeded or not (ie. it ran out of gas)

Source Link
eth
  • 86.5k
  • 53
  • 287
  • 411

Relationship between Transaction Trie and Receipts Trie provides a good summary:

Transaction Receipts record the transaction outcome

Here is the Structure of a transaction receipt

blockHash: String, 32 Bytes - hash of the block where this transaction was in.
blockNumber: Number - block number where this transaction was in.
transactionHash: String, 32 Bytes - hash of the transaction.
transactionIndex: Number - integer of the transactions index position in the block.
from: String, 20 Bytes - address of the sender.
to: String, 20 Bytes - address of the receiver. null when its a contract creation transaction.
cumulativeGasUsed: Number - The total amount of gas used when this transaction was executed in the block.
gasUsed: Number - The amount of gas used by this specific transaction alone.
contractAddress: String - 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null.
logs: Array - Array of log objects, which this transaction generated.

Take a look at the last two properties. A simple use of a receipt is to find out a new contract's contractAddress. A more advanced used for a receipt is with Proving the Existence of Logs to the Blockchain