createCoinTransferEntry static method

AptosTransactionEntryFunction createCoinTransferEntry(
  1. AptosTransferParams transfer
)

Creates an Aptos transaction entry for transferring coins to another account. It sets up the required module, function, and arguments for the transaction.

Implementation

static AptosTransactionEntryFunction createCoinTransferEntry(
    AptosTransferParams transfer) {
  return AptosTransactionEntryFunction(
      moduleId: AptosConstants.systemFrameworkCoinModuleId,
      functionName: AptosConstants.transferFunctionName,
      typeArgs: [
        AptosConstants.aptosCoinTypeStructArgs,
      ],
      args: [
        transfer.destination,
        MoveU64(transfer.apt)
      ]);
}