createApplicationCallTransaction method
Future<ApplicationBaseTransaction>
createApplicationCallTransaction({
- required Address sender,
- required int applicationId,
- List<
Uint8List> ? arguments, - List<
Address> ? accounts, - List<
int> ? foreignApps, - List<
int> ? foreignAssets, - List<
AppBoxReference> ? appBoxReferences, - String? note,
- OnCompletion onCompletion = OnCompletion.NO_OP_OC,
- TransactionParams? suggestedParams,
Create a new ApplicationBaseTransaction.
@param sender The sender of the transaction. @param applicationId The id of the application to call.
@returns The constructed application call transaction.
Implementation
Future<ApplicationBaseTransaction> createApplicationCallTransaction({
required Address sender,
required int applicationId,
List<Uint8List>? arguments,
List<Address>? accounts,
List<int>? foreignApps,
List<int>? foreignAssets,
List<AppBoxReference>? appBoxReferences,
String? note,
OnCompletion onCompletion = OnCompletion.NO_OP_OC,
TransactionParams? suggestedParams,
}) async {
// Fetch the suggested transaction params
final params = suggestedParams ?? (await getSuggestedTransactionParams());
// Create the transaction
final tx = await (ApplicationCallTransactionBuilder(onCompletion)
..sender = sender
..applicationId = applicationId
..arguments = arguments
..accounts = accounts
..foreignApps = foreignApps
..foreignAssets = foreignAssets
..appBoxReferences = appBoxReferences
..noteText = note
..suggestedParams = params)
.build();
return tx;
}