20#include <xrpld/app/misc/AMMUtils.h>
21#include <xrpld/app/tx/detail/AMMDelete.h>
22#include <xrpld/ledger/Sandbox.h>
24#include <xrpl/protocol/AMMCore.h>
25#include <xrpl/protocol/TER.h>
26#include <xrpl/protocol/TxFlags.h>
41 JLOG(ctx.
j.
debug()) <<
"AMM Delete: invalid flags.";
55 JLOG(ctx.
j.
debug()) <<
"AMM Delete: Invalid asset pair.";
59 auto const lpTokensBalance = (*ammSle)[sfLPTokenBalance];
60 if (lpTokensBalance != beast::zero)
static NotTEC preflight(PreflightContext const &ctx)
static TER preclaim(PreclaimContext const &ctx)
A currency issued by an account.
virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0
Return the state item associated with a key.
std::uint32_t getFlags() const
Discardable, editable view to a ledger.
Keylet amm(Asset const &issue1, Asset const &issue2) noexcept
AMM entry.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
TER deleteAMMAccount(Sandbox &view, Issue const &asset, Issue const &asset2, beast::Journal j)
Delete trustlines to AMM.
bool ammEnabled(Rules const &)
Return true if required AMM amendments are enabled.
NotTEC preflight1(PreflightContext const &ctx)
Performs early sanity checks on the account and fee fields.
NotTEC preflight2(PreflightContext const &ctx)
Checks whether the signature appears valid.
bool isTesSuccess(TER x) noexcept
constexpr std::uint32_t tfUniversalMask
TERSubset< CanCvtToNotTEC > NotTEC
State information when determining if a tx is likely to claim a fee.
State information when preflighting a tx.