Transaction class

Constructors

Transaction({XCBAddress? from, XCBAddress? to, int? maxEnergy, XCBAmount? energyPrice, XCBAmount? value, Uint8List? data, int? nonce})
Transaction.callContract({required DeployedContract contract, required ContractFunction function, required List parameters, XCBAddress? from, int? maxEnergy, XCBAmount? energyPrice, XCBAmount? value, int? nonce})
Constructs a transaction that can be used to call a contract function.

Properties

data → Uint8List?
For transactions that call a contract function or create a contract, contains the hashed function name and the encoded parameters or the compiled contract code, respectively.
final
energyPrice → XCBAmount?
How much ether to spend on a single unit of energy. Can be null, in which case the rpc server will choose this value.
final
from → XCBAddress?
The address of the sender of this transaction.
final
hashCode → int
The hash code for this object.
no setterinherited
maxEnergy → int?
The maximum amount of energy to spend.
final
nonce → int?
The nonce of this transaction. A nonce is incremented per sender and transaction to make sure the same transaction can't be sent more than once.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
to → XCBAddress?
The recipient of this transaction, or null for transactions that create a contract.
final
value → XCBAmount?
How much ether to send to to. This can be null, as some transactions that call a contracts method won't have to send ether.
final

Methods

copyWith({XCBAddress? from, XCBAddress? to, int? maxEnergy, XCBAmount? energyPrice, XCBAmount? value, Uint8List? data, int? nonce, XCBAmount? maxPriorityFeePerEnergy, XCBAmount? maxFeePerEnergy}) → Transaction
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited