AMMBid constructor
AMMBid({
- required String account,
- required XRPCurrencies asset,
- required XRPCurrencies asset2,
- required CurrencyAmount bidMax,
- required CurrencyAmount bidMin,
- List<
AuthAccount> ? authAccounts, - String signingPubKey = "",
- int? sequence,
- String? fee,
- 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);