generateSignSubmitTransaction method

Future<String> generateSignSubmitTransaction(
  1. AptosAccount sender,
  2. TransactionPayload payload, {
  3. BigInt? maxGasAmount,
  4. BigInt? gasUnitPrice,
  5. BigInt? expireTimestamp,
})

Implementation

Future<String> generateSignSubmitTransaction(
  AptosAccount sender,
  TransactionPayload payload,{
  BigInt? maxGasAmount,
  BigInt? gasUnitPrice,
  BigInt? expireTimestamp
}) async {
  final rawTransaction = await generateRawTransaction(
    sender.address,
    payload,
    maxGasAmount: maxGasAmount,
    gasUnitPrice: gasUnitPrice,
    expireTimestamp: expireTimestamp
  );
  final bcsTxn = AptosClient.generateBCSTransaction(sender, rawTransaction);
  final pendingTransaction = await submitSignedBCSTransaction(bcsTxn);
  return pendingTransaction["hash"];
}