createBatchTransferTransferEntry static method
AptosTransactionEntryFunction
createBatchTransferTransferEntry(
- List<
AptosTransferParams> transfers
Creates an Aptos transaction entry for transferring coins in bulk. This allows multiple transfers to different addresses in one transaction.
Implementation
static AptosTransactionEntryFunction createBatchTransferTransferEntry(
List<AptosTransferParams> transfers) {
return AptosTransactionEntryFunction(
moduleId: AptosConstants.systemFrameworkAccountModuleId,
functionName: AptosConstants.batchTransferFunctionName,
typeArgs: [],
args: [
MoveVector<MoveAddress>(transfers.map((e) => e.destination).toList()),
MoveVector.u64(transfers.map((e) => e.apt).toList())
]);
}