AMMDeposit constructor

AMMDeposit({
  1. required String account,
  2. required XRPCurrencies asset,
  3. required XRPCurrencies asset2,
  4. List<XRPLMemo>? memos = const [],
  5. int? ticketSequance,
  6. CurrencyAmount? amount,
  7. CurrencyAmount? amount2,
  8. CurrencyAmount? ePrice,
  9. IssuedCurrencyAmount? lpTokenOut,
  10. String signingPubKey = "",
  11. int? sequence,
  12. String? fee,
  13. 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.

amount The amount of one asset to deposit to the AMM. If present, this must match the type of one of the assets (tokens or XRP) in the AMM's pool.

amount2 The amount of another asset to add to the AMM. If present, this must match the type of the other asset in the AMM's pool and cannot be the same asset as Amount.

ePrice The maximum effective price, in the deposit asset, to pay for each LP Token received.

lpTokenOut How many of the AMM's LP Tokens to buy.

Implementation

AMMDeposit({
  required super.account,
  required this.asset,
  required this.asset2,
  super.memos,
  super.ticketSequance,
  this.amount,
  this.amount2,
  this.ePrice,
  this.lpTokenOut,
  super.signingPubKey,
  super.sequence,
  super.fee,
  super.lastLedgerSequence,
}) : super(transactionType: XRPLTransactionType.AMM_DEPOSIT) {
  final err = _getError();
  assert(err == null, err);
}