tuweni / org.apache.tuweni.eth / Transaction

Transaction

class Transaction (source)

An Ethereum transaction.

Constructors

<init>

Transaction(nonce: UInt256, gasPrice: Wei, gasLimit: Gas, to: Address?, value: Wei, payload: Bytes, keyPair: KeyPair)
Transaction(nonce: UInt256, gasPrice: Wei, gasLimit: Gas, to: Address?, value: Wei, payload: Bytes, keyPair: KeyPair, chainId: Int?)
Transaction(nonce: UInt256, gasPrice: Wei, gasLimit: Gas, to: Address?, value: Wei, payload: Bytes, chainId: Int?, signature: Signature)

Create a transaction.

Functions

chainId

fun chainId(): Int

equals

fun equals(other: Any?): Boolean

fromBytes

static fun fromBytes(encoded: Bytes): Transaction
static fun fromBytes(encoded: Bytes, lenient: Boolean): Transaction

Deserialize a transaction from RLP encoded bytes.

gasLimit

fun gasLimit(): Gas

gasPrice

fun gasPrice(): Wei

hash

fun hash(): Hash

Calculate and return the hash for this transaction.

hashCode

fun hashCode(): Int

isContractCreation

fun isContractCreation(): Boolean

nonce

fun nonce(): UInt256

payload

fun payload(): Bytes

readFrom

static fun readFrom(reader: RLPReader): Transaction

Deserialize a transaction from an RLP input.

sender

fun sender(): Address?

signature

fun signature(): Signature

signatureData

static fun signatureData(nonce: UInt256, gasPrice: Wei, gasLimit: Gas, to: Address?, value: Wei, payload: Bytes, chainId: Int?): Bytes

to

fun to(): Address?

toBytes

fun toBytes(): Bytes

toString

fun toString(): String

value

fun value(): Wei

writeTo

fun writeTo(writer: RLPWriter): Unit

Write this transaction to an RLP output.