Transaction class

Available extensions

Constructors

Transaction({EthereumAddress? from, EthereumAddress? to, int? maxGas, EtherAmount? gasPrice, EtherAmount? value, Uint8List? data, int? nonce, EtherAmount? maxFeePerGas, EtherAmount? maxPriorityFeePerGas})
Transaction.callContract({required DeployedContract contract, required ContractFunction function, required List parameters, EthereumAddress? from, int? maxGas, EtherAmount? gasPrice, EtherAmount? value, int? nonce, EtherAmount? maxFeePerGas, EtherAmount? maxPriorityFeePerGas})
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
from EthereumAddress?
The address of the sender of this transaction.
final
gasPrice EtherAmount?
How much ether to spend on a single unit of gas. Can be null, in which case the rpc server will choose this value.
final
hashCode int
The hash code for this object.
no setterinherited
isEIP1559 bool
no setter
maxFeePerGas EtherAmount?
final
maxGas int?
The maximum amount of gas to spend.
final
maxPriorityFeePerGas EtherAmount?
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 EthereumAddress?
The recipient of this transaction, or null for transactions that create a contract.
final
value EtherAmount?
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({EthereumAddress? from, EthereumAddress? to, int? maxGas, EtherAmount? gasPrice, EtherAmount? value, Uint8List? data, int? nonce, EtherAmount? maxPriorityFeePerGas, EtherAmount? maxFeePerGas}) Transaction
getUnsignedSerialized({int? chainId = 1}) Uint8List
The transaction pre-image.
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