20#include <xrpld/app/tx/detail/AMMDelete.h>
22#include <xrpld/app/misc/AMMUtils.h>
23#include <xrpld/ledger/Sandbox.h>
24#include <xrpl/protocol/AMMCore.h>
25#include <xrpl/protocol/Feature.h>
26#include <xrpl/protocol/STAccount.h>
27#include <xrpl/protocol/TER.h>
28#include <xrpl/protocol/TxFlags.h>
43 JLOG(ctx.
j.
debug()) <<
"AMM Delete: invalid flags.";
57 JLOG(ctx.
j.
debug()) <<
"AMM Delete: Invalid asset pair.";
61 auto const lpTokensBalance = (*ammSle)[sfLPTokenBalance];
62 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.
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.