AMMBid constructor

AMMBid({
  1. required String account,
  2. required XRPCurrencies asset,
  3. required XRPCurrencies asset2,
  4. required CurrencyAmount bidMax,
  5. required CurrencyAmount bidMin,
  6. List<AuthAccount>? authAccounts,
  7. String signingPubKey = "",
  8. int? sequence,
  9. String? fee,
  10. int? lastLedgerSequence,
})

asset The definition for one of the assets in the AMM's pool. asset2 The definition for the other asset in the AMM's pool bidMin Pay at least this amount for the slot. Setting this value higher makes it harder for others to outbid you. If omitted, pay the minimum necessary to win the bid.

bidMax Pay at most this amount for the slot. If the cost to win the bid is higher than this amount, the transaction fails. If omitted, pay as much as necessary to win the bid.

authAccounts A list of up to 4 additional accounts that you allow to trade at the discounted fee. This cannot include the address of the transaction sender.

Implementation

AMMBid({
  required super.account,
  required this.asset,
  required this.asset2,
  required this.bidMax,
  required this.bidMin,
  this.authAccounts,
  super.signingPubKey,
  super.sequence,
  super.fee,
  super.lastLedgerSequence,
})  : assert(() {
        if (asset is IssuedCurrencyAmount || asset2 is IssuedCurrencyAmount) {
          return false;
        }
        return true;
      }(), "use IssuedCurrency instead of IssuedCurrencyAmount"),
      assert(() {
        if (authAccounts != null &&
            authAccounts.length > _MAX_AUTH_ACCOUNTS) {
          return false;
        }
        return true;
      }(),
          "authAccounts Length must not be greater than $_MAX_AUTH_ACCOUNTS"),
      super(transactionType: XRPLTransactionType.AMM_BID);