generateTransaction method

Future<RawTransaction> generateTransaction(
  1. AptosAccount sender,
  2. EntryFunctionPayload payload, {
  3. String? sequenceNumber,
  4. String? gasUnitPrice,
  5. String? maxGasAmount,
  6. String? expirationTimestampSecs,
})

Implementation

Future<RawTransaction> generateTransaction(
  AptosAccount sender,
  EntryFunctionPayload payload,{
  String? sequenceNumber,
  String? gasUnitPrice,
  String? maxGasAmount,
  String? expirationTimestampSecs
}) async {
  final builderConfig = ABIBuilderConfig(
    sender: sender.address,
    sequenceNumber: sequenceNumber != null ? BigInt.parse(sequenceNumber) : null,
    gasUnitPrice: gasUnitPrice != null ? BigInt.parse(gasUnitPrice) : null,
    maxGasAmount: maxGasAmount != null ? BigInt.parse(maxGasAmount) : null,
    expSecFromNow: expirationTimestampSecs != null ? BigInt.parse(expirationTimestampSecs) : null
  );
  final builder = TransactionBuilderRemoteABI(this, builderConfig);
  return await builder.build(payload.functionId, payload.typeArguments, payload.arguments);
}