SerialTransactionExecutor class
Signs and executes transactions one at a time for a single account, reusing the gas coin from each transaction's effects so the next transaction does not have to wait for the previous one to be indexed.
This covers the common high-throughput case (back-to-back transactions from one signer). It does not cache arbitrary owned-object versions across transactions, so a sequence that mutates the same non-gas object repeatedly must still pass fresh references; and it does not run transactions in parallel.
Constructors
- SerialTransactionExecutor({required SuiClient client, required SuiAccount signer, BigInt? defaultGasBudget})
Properties
- client → SuiClient
-
final
- defaultGasBudget → BigInt
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- signer → SuiAccount
-
final
Methods
-
buildTransaction(
Transaction transaction) → Future< Uint8List> -
Builds
transactionto BCS bytes, paying with the cached gas coin if one is available. Runs through the serial queue. -
executeTransaction(
Transaction transaction, {SuiTransactionBlockResponseOptions? responseOptions, List< String> additionalSignatures = const []}) → Future<SuiTransactionBlockResponse> -
Builds, signs, and executes
transaction, caching the resulting gas coin for the next transaction. On failure the cache is cleared so the next build re-selects gas from the client. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resetCache(
) → void - Clears the cached gas coin; the next build re-selects gas from the client.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited