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.
TransactionReceipt(stateRoot: Bytes32, cumulativeGasUsed: Long, bloomFilter: LogsBloomFilter, logs: MutableList<Log>)
Creates an instance of a state root-encoded transaction receipt. TransactionReceipt(status: Int, cumulativeGasUsed: Long, bloomFilter: LogsBloomFilter, logs: MutableList<Log>)
Creates an instance of a status-encoded transaction receipt. |
fun bloomFilter(): LogsBloomFilter
Returns the logs bloom filter for the logs generated by the transaction |
|
fun cumulativeGasUsed(): Long
Returns the total amount of gas consumed in the block after the transaction has been processed. |
|
fun equals(other: Any?): Boolean |
|
static fun fromBytes(bytes: Bytes): TransactionReceipt
Read a transaction receipt from its RLP serialized representation |
|
fun hashCode(): Int |
|
fun isValid(): Boolean
Computes the logs bloom filters of the current receipt and compares it to the bloom filter stored. |
|
fun logs(): MutableList<Log>
Returns the logs generated by the transaction. |
|
static fun readFrom(reader: RLPReader): TransactionReceipt
Creates a transaction receipt for the given RLP |
|
fun stateRoot(): Bytes32
Returns the state root for a state root-encoded transaction receipt |
|
fun status(): Int
Returns the status code for the status-encoded transaction receipt |
|
fun toBytes(): Bytes
Writes the transaction receipt into a serialized RLP form. |
|
fun toString(): String |
|
fun writeTo(writer: RLPWriter): Unit
Write an RLP representation. |