ETHTransaction class
Represents an Ethereum transaction with EIP-1559 support.
Constructors
-
ETHTransaction({required int nonce, required BigInt gasLimit, required List<
int> data, required BigInt value, required BigInt chainId, ETHAddress? from, ETHAddress? to, ETHTransactionType? type, AccessList? accessList, BigInt? gasPrice, BigInt? maxPriorityFeePerGas, BigInt? maxFeePerGas, ETHSignature? signature}) -
Factory constructor for creating an ETHTransaction.
factory
-
ETHTransaction.fromJson(Map<
String, dynamic> json) -
Factory constructor to create an ETHTransaction from JSON.
factory
-
ETHTransaction.fromSerialized(List<
int> transactionBytes) -
Factory constructor to create an ETHTransaction from serialized transaction bytes.
factory
Properties
- accessList → AccessList?
-
List of access list entries for EIP-2930 transactions.
final
- chainId → BigInt
-
The chain ID to which the transaction is intended.
final
-
data
→ List<
int> -
The input data for the transaction.
final
- from → ETHAddress?
-
The sender's address.
final
- gasLimit → BigInt
-
The maximum amount of gas that can be used in the transaction.
final
- gasPrice → BigInt?
-
The gas price for the transaction (applicable to legacy transactions).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxFeePerGas → BigInt?
-
The maximum fee that the sender is willing to pay for the entire block.
final
- maxPriorityFeePerGas → BigInt?
-
The maximum fee per gas unit that the sender is willing to pay.
final
- nonce → int
-
The transaction nonce.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
serialized
→ List<
int> -
Gets the serialized transaction.
no setter
- signature → ETHSignature?
-
The transaction signature.
final
- to → ETHAddress?
-
The recipient's address.
final
- transactionID → String
-
Generates the transaction ID using the Keccak256 hash of the serialized transaction.
no setter
- transactionType → ETHTransactionType
-
Determines the ETHTransactionType based on the transaction's properties.
no setter
- type → ETHTransactionType?
-
The type of the transaction (legacy, EIP-1559, EIP-2930).
final
- value → BigInt
-
The amount of Ether to transfer with the transaction.
final
Methods
-
copyWith(
{ETHTransactionType? type, ETHAddress? to, ETHAddress? from, int? nonce, BigInt? gasLimit, BigInt? gasPrice, BigInt? maxPriorityFeePerGas, BigInt? maxFeePerGas, List< int> ? data, BigInt? value, BigInt? chainId, List<int> ? hash, List<AccessListEntry> ? accessList, ETHSignature? signature}) → ETHTransaction - Creates a copy of the ETHTransaction with updated fields.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
signedSerialized(
[ETHSignature? sig]) → List< int> - Gets the serialized transaction for signing.
-
toEstimate(
) → Map< String, dynamic> - Converts the transaction details into a map for estimating gas.
-
toJson(
) → Map< String, dynamic> - Converts the transaction details into a json.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited