ETHTransactionBuilder class
Builder class for creating Ethereum transactions.
Constructors
- ETHTransactionBuilder({required ETHAddress from, required ETHAddress to, required BigInt value, required BigInt chainId, String? memo, ETHTransactionType? transactionType})
-
Factory constructor for creating a basic transaction.
factory
- ETHTransactionBuilder.contract({required ETHAddress from, required ETHAddress contractAddress, required BigInt value, required BigInt chainId, required AbiFunctionFragment function, required List functionParams, String? memo, ETHTransactionType? transactionType})
-
Factory constructor for creating a contract interaction transaction.
factory
Properties
-
accessList
→ List<
AccessListEntry> ? -
no setter
- chainId → BigInt
-
final
- data → String?
-
no setter
- from → ETHAddress
-
final
- function → AbiFunctionFragment?
-
final
- functionParam → List?
-
final
- gasLimit → BigInt?
-
no setter
- gasPrice → BigInt?
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxFeePerGas → BigInt?
-
no setter
- maxPriorityFeePerGas → BigInt?
-
no setter
- nonce → int?
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
serializedTransaction
→ List<
int> -
no setter
- to → ETHAddress
-
final
- transactionID → String
-
Returns the transaction hash (ID) after the signing process.
no setter
- type → ETHTransactionType?
-
no setter
- value → BigInt
-
final
Methods
-
autoFill(
EVMRPC rpc, [EIP1559FeeRate feeRate = EIP1559FeeRate.normal]) → Future< void> - Automatically fills in transaction details, such as type, nonce, gas limit, and fees.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendAndSubmitTransaction(
EVMRPC rpc, {Duration timeout = const Duration(minutes: 5), Duration periodicTimeOut = const Duration(seconds: 10)}) → Future< TransactionReceipt> - Sends and monitors the transaction on the Ethereum network via the provided RPC.
-
sendTransaction(
EVMRPC rpc) → Future< String> - Sends the signed transaction to the Ethereum network via the provided RPC.
-
setAccessList(
List< AccessListEntry> ? accessListEntry) → void - Sets the access list for the Ethereum transaction.
-
setEIP1559FeeDetails(
BigInt maxFeePerGas, BigInt maxPriorityFeePerGas) → void - Sets the fee details for an EIP-1559 Ethereum transaction.
-
setGasLimit(
BigInt gasLimit) → void - Sets the gas limit for the Ethereum transaction.
-
setGasPrice(
BigInt gasPrice) → void - Sets the gas price for the Ethereum transaction.
-
setNonce(
int nonce) → void - Sets the nonce for the Ethereum transaction.
-
setSignature(
ETHSignature signature) → void - Sets the provided ETHSignature for the transaction.
-
sign(
ETHPrivateKey privateKey) → void - Signs the transaction using the provided ETHPrivateKey.
-
signedSerializedTransaction(
[ETHSignature? signature]) → List< int> -
toEstimate(
) → Map< String, dynamic> - Converts the transaction details into a map for estimating gas or access list.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateFees(
EVMRPC rpc, [EIP1559FeeRate feeRate = EIP1559FeeRate.normal]) → Future< void> - Updates transaction fees using the provided EVMRPC and optional EIP-1559 fee rate.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited