mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
36 lines
836 B
C++
36 lines
836 B
C++
#pragma once
|
|
|
|
#include <xrpl/tx/Transactor.h>
|
|
|
|
namespace xrpl {
|
|
|
|
/** AMMDelete implements AMM delete transactor. This is a mechanism to
|
|
* delete AMM in an empty state when the number of LP tokens is 0.
|
|
* AMMDelete deletes the trustlines up to configured maximum. If all
|
|
* trustlines are deleted then AMM ltAMM and root account are deleted.
|
|
* Otherwise AMMDelete should be called again.
|
|
*/
|
|
class AMMDelete : public Transactor
|
|
{
|
|
public:
|
|
static constexpr ConsequencesFactoryType ConsequencesFactory{Normal};
|
|
|
|
explicit AMMDelete(ApplyContext& ctx) : Transactor(ctx)
|
|
{
|
|
}
|
|
|
|
static bool
|
|
checkExtraFeatures(PreflightContext const& ctx);
|
|
|
|
static NotTEC
|
|
preflight(PreflightContext const& ctx);
|
|
|
|
static TER
|
|
preclaim(PreclaimContext const& ctx);
|
|
|
|
TER
|
|
doApply() override;
|
|
};
|
|
|
|
} // namespace xrpl
|