tuweni / org.apache.tuweni.eth / TransactionReceipt

TransactionReceipt

class TransactionReceipt (source)

A transaction receipt, containing information pertaining a transaction execution.

Transaction receipts have two different formats: state root-encoded and status-encoded. The difference between these two formats is that the state root-encoded transaction receipt contains the state root for world state after the transaction has been processed (e.g. not invalid) and the status-encoded transaction receipt instead has contains the status of the transaction (e.g. 1 for success and 0 for failure). The other transaction receipt fields are the same for both formats: logs, logs bloom, and cumulative gas used in the block. The TransactionReceiptType attribute is the best way to check which format has been used.

Constructors

<init>

Creates an instance of a state root-encoded transaction receipt.

TransactionReceipt(stateRoot: Bytes32!, cumulativeGasUsed: Long, bloomFilter: LogsBloomFilter!, logs: MutableList<Log!>!)

Creates an instance of a status-encoded transaction receipt.

TransactionReceipt(status: Int, cumulativeGasUsed: Long, bloomFilter: LogsBloomFilter!, logs: MutableList<Log!>!)

Functions

equals

fun equals(other: Any?): Boolean

fromBytes

Read a transaction receipt from its RLP serialized representation

static fun fromBytes(bytes: Bytes!): TransactionReceipt!

getBloomFilter

Returns the logs bloom filter for the logs generated by the transaction

fun getBloomFilter(): LogsBloomFilter!

getCumulativeGasUsed

Returns the total amount of gas consumed in the block after the transaction has been processed.

fun getCumulativeGasUsed(): Long

getLogs

Returns the logs generated by the transaction.

fun getLogs(): MutableList<Log!>!

getStateRoot

Returns the state root for a state root-encoded transaction receipt

fun getStateRoot(): Bytes32!

getStatus

Returns the status code for the status-encoded transaction receipt

fun getStatus(): Int!

hashCode

fun hashCode(): Int

isValid

Computes the logs bloom filters of the current receipt and compares it to the bloom filter stored.

fun isValid(): Boolean

readFrom

Creates a transaction receipt for the given RLP

static fun readFrom(reader: RLPReader!): TransactionReceipt!

toBytes

Writes the transaction receipt into a serialized RLP form.

fun toBytes(): Bytes!

toString

fun toString(): String

writeTo

Write an RLP representation.

fun writeTo(writer: RLPWriter!): Unit