20 #ifndef RIPPLE_TX_AMMWITHDRAW_H_INCLUDED
21 #define RIPPLE_TX_AMMWITHDRAW_H_INCLUDED
23 #include <ripple/app/tx/impl/Transactor.h>
222 #endif // RIPPLE_TX_AMMWITHDRAW_H_INCLUDED
static constexpr ConsequencesFactoryType ConsequencesFactory
std::pair< TER, bool > applyGuts(Sandbox &view)
Integers of any length that is a multiple of 32-bits.
std::pair< TER, STAmount > singleWithdrawEPrice(Sandbox &view, AccountID const &ammAccount, STAmount const &amountBalance, STAmount const &lptAMMBalance, STAmount const &amount, STAmount const &ePrice, std::uint16_t tfee)
Withdraw single asset (Asset1Out, EPrice) with two constraints.
static NotTEC preflight(PreflightContext const &ctx)
std::pair< TER, STAmount > equalWithdrawTokens(Sandbox &view, AccountID const &ammAccount, STAmount const &amountBalance, STAmount const &amount2Balance, STAmount const &lptAMMBalance, STAmount const &lpTokens, STAmount const &lpTokensWithdraw, std::uint16_t tfee)
Equal-asset withdrawal (LPTokens) of some AMM instance pools shares represented by the number of LPTo...
std::pair< TER, STAmount > singleWithdraw(Sandbox &view, AccountID const &ammAccount, STAmount const &amountBalance, STAmount const &lptAMMBalance, STAmount const &amount, std::uint16_t tfee)
Single asset withdrawal (Asset1Out) equivalent to the amount specified in Asset1Out.
Discardable, editable view to a ledger.
AMMWithdraw implements AMM withdraw Transactor.
State information when applying a tx.
State information when determining if a tx is likely to claim a fee.
std::pair< TER, STAmount > singleWithdrawTokens(Sandbox &view, AccountID const &ammAccount, STAmount const &amountBalance, STAmount const &lptAMMBalance, STAmount const &amount, STAmount const &lpTokensWithdraw, std::uint16_t tfee)
Single asset withdrawal (Asset1Out, LPTokens) proportional to the share specified by tokens.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::pair< TER, STAmount > withdraw(Sandbox &view, AccountID const &ammAccount, STAmount const &amountWithdraw, STAmount const &amountBalance, std::optional< STAmount > const &amount2Withdraw, STAmount const &lpTokensAMMBalance, STAmount const &lpTokensWithdraw, std::uint16_t tfee)
Withdraw requested assets and token from AMM into LP account.
static TER preclaim(PreclaimContext const &ctx)
State information when preflighting a tx.
std::pair< TER, STAmount > equalWithdrawLimit(Sandbox &view, AccountID const &ammAccount, STAmount const &amountBalance, STAmount const &amount2Balance, STAmount const &lptAMMBalance, STAmount const &amount, STAmount const &amount2, std::uint16_t tfee)
Withdraw both assets (Asset1Out, Asset2Out) with the constraints on the maximum amount of each asset ...
AMMWithdraw(ApplyContext &ctx)