AMMCreate constructor

AMMCreate({
  1. required String account,
  2. required CurrencyAmount amount,
  3. required CurrencyAmount amount2,
  4. required int tradingFee,
  5. List<XRPLMemo>? memos = const [],
  6. int? ticketSequance,
  7. String signingPubKey = "",
  8. int? sequence,
  9. String? fee,
  10. int? lastLedgerSequence,
})

amount The first of the two assets to fund this AMM with. This must be a positive amount amount2 The second of the two assets to fund this AMM with. This must be a positive amount.

tradingFee The fee to charge for trades against this AMM instance, in units of 1/100,000; a value of 1 is equivalent to 0.001%. The maximum value is 1000, indicating a 1% fee. The minimum value is 0.

Implementation

AMMCreate({
  required super.account,
  required this.amount,
  required this.amount2,
  required this.tradingFee,
  super.memos,
  super.ticketSequance,
  super.signingPubKey,
  super.sequence,
  super.fee,
  super.lastLedgerSequence,
})  : assert(() {
        if (tradingFee < 0 || tradingFee > AMM_MAX_TRADING_FEE) {
          return false;
        }
        return true;
      }(), "Must be between 0 and $AMM_MAX_TRADING_FEE"),
      super(transactionType: XRPLTransactionType.AMM_CREATE);