mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Merge branch 'ximinez/lending-refactoring-3' into ximinez/lending-refactoring-4
This commit is contained in:
@@ -33,12 +33,6 @@
|
|||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
bool
|
|
||||||
AMMClawback::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureAMMClawback);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::uint32_t
|
std::uint32_t
|
||||||
AMMClawback::getFlagsMask(PreflightContext const& ctx)
|
AMMClawback::getFlagsMask(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static std::uint32_t
|
static std::uint32_t
|
||||||
getFlagsMask(PreflightContext const& ctx);
|
getFlagsMask(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -164,12 +164,6 @@ Batch::calculateBaseFee(ReadView const& view, STTx const& tx)
|
|||||||
return signerFees + txnFees + batchBase;
|
return signerFees + txnFees + batchBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
Batch::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureBatch);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::uint32_t
|
std::uint32_t
|
||||||
Batch::getFlagsMask(PreflightContext const& ctx)
|
Batch::getFlagsMask(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,9 +40,6 @@ public:
|
|||||||
static XRPAmount
|
static XRPAmount
|
||||||
calculateBaseFee(ReadView const& view, STTx const& tx);
|
calculateBaseFee(ReadView const& view, STTx const& tx);
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static std::uint32_t
|
static std::uint32_t
|
||||||
getFlagsMask(PreflightContext const& ctx);
|
getFlagsMask(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -29,12 +29,6 @@
|
|||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
bool
|
|
||||||
CancelCheck::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureChecks);
|
|
||||||
}
|
|
||||||
|
|
||||||
NotTEC
|
NotTEC
|
||||||
CancelCheck::preflight(PreflightContext const& ctx)
|
CancelCheck::preflight(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static NotTEC
|
static NotTEC
|
||||||
preflight(PreflightContext const& ctx);
|
preflight(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -32,12 +32,6 @@
|
|||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
bool
|
|
||||||
CashCheck::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureChecks);
|
|
||||||
}
|
|
||||||
|
|
||||||
NotTEC
|
NotTEC
|
||||||
CashCheck::preflight(PreflightContext const& ctx)
|
CashCheck::preflight(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static NotTEC
|
static NotTEC
|
||||||
preflight(PreflightContext const& ctx);
|
preflight(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -75,12 +75,6 @@ preflightHelper<MPTIssue>(PreflightContext const& ctx)
|
|||||||
return tesSUCCESS;
|
return tesSUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
Clawback::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureClawback);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::uint32_t
|
std::uint32_t
|
||||||
Clawback::getFlagsMask(PreflightContext const& ctx)
|
Clawback::getFlagsMask(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static std::uint32_t
|
static std::uint32_t
|
||||||
getFlagsMask(PreflightContext const& ctx);
|
getFlagsMask(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -28,12 +28,6 @@
|
|||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
bool
|
|
||||||
CreateCheck::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureChecks);
|
|
||||||
}
|
|
||||||
|
|
||||||
NotTEC
|
NotTEC
|
||||||
CreateCheck::preflight(PreflightContext const& ctx)
|
CreateCheck::preflight(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static NotTEC
|
static NotTEC
|
||||||
preflight(PreflightContext const& ctx);
|
preflight(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -33,12 +33,6 @@ CreateTicket::makeTxConsequences(PreflightContext const& ctx)
|
|||||||
return TxConsequences{ctx.tx, ctx.tx[sfTicketCount]};
|
return TxConsequences{ctx.tx, ctx.tx[sfTicketCount]};
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
CreateTicket::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureTicketBatch);
|
|
||||||
}
|
|
||||||
|
|
||||||
NotTEC
|
NotTEC
|
||||||
CreateTicket::preflight(PreflightContext const& ctx)
|
CreateTicket::preflight(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,9 +69,6 @@ public:
|
|||||||
static TxConsequences
|
static TxConsequences
|
||||||
makeTxConsequences(PreflightContext const& ctx);
|
makeTxConsequences(PreflightContext const& ctx);
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
/** Enforce constraints beyond those of the Transactor base class. */
|
/** Enforce constraints beyond those of the Transactor base class. */
|
||||||
static NotTEC
|
static NotTEC
|
||||||
preflight(PreflightContext const& ctx);
|
preflight(PreflightContext const& ctx);
|
||||||
|
|||||||
@@ -48,12 +48,6 @@ using namespace credentials;
|
|||||||
|
|
||||||
// ------- CREATE --------------------------
|
// ------- CREATE --------------------------
|
||||||
|
|
||||||
bool
|
|
||||||
CredentialCreate::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureCredentials);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::uint32_t
|
std::uint32_t
|
||||||
CredentialCreate::getFlagsMask(PreflightContext const& ctx)
|
CredentialCreate::getFlagsMask(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
@@ -199,11 +193,6 @@ CredentialCreate::doApply()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ------- DELETE --------------------------
|
// ------- DELETE --------------------------
|
||||||
bool
|
|
||||||
CredentialDelete::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureCredentials);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::uint32_t
|
std::uint32_t
|
||||||
CredentialDelete::getFlagsMask(PreflightContext const& ctx)
|
CredentialDelete::getFlagsMask(PreflightContext const& ctx)
|
||||||
@@ -283,12 +272,6 @@ CredentialDelete::doApply()
|
|||||||
|
|
||||||
// ------- APPLY --------------------------
|
// ------- APPLY --------------------------
|
||||||
|
|
||||||
bool
|
|
||||||
CredentialAccept::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureCredentials);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::uint32_t
|
std::uint32_t
|
||||||
CredentialAccept::getFlagsMask(PreflightContext const& ctx)
|
CredentialAccept::getFlagsMask(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static std::uint32_t
|
static std::uint32_t
|
||||||
getFlagsMask(PreflightContext const& ctx);
|
getFlagsMask(PreflightContext const& ctx);
|
||||||
|
|
||||||
@@ -60,9 +57,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static std::uint32_t
|
static std::uint32_t
|
||||||
getFlagsMask(PreflightContext const& ctx);
|
getFlagsMask(PreflightContext const& ctx);
|
||||||
|
|
||||||
@@ -87,9 +81,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static std::uint32_t
|
static std::uint32_t
|
||||||
getFlagsMask(PreflightContext const& ctx);
|
getFlagsMask(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -42,12 +42,6 @@ namespace ripple {
|
|||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
bool
|
|
||||||
DIDSet::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureDID);
|
|
||||||
}
|
|
||||||
|
|
||||||
NotTEC
|
NotTEC
|
||||||
DIDSet::preflight(PreflightContext const& ctx)
|
DIDSet::preflight(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
@@ -168,12 +162,6 @@ DIDSet::doApply()
|
|||||||
return addSLE(ctx_, sleDID, account_);
|
return addSLE(ctx_, sleDID, account_);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
DIDDelete::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureDID);
|
|
||||||
}
|
|
||||||
|
|
||||||
NotTEC
|
NotTEC
|
||||||
DIDDelete::preflight(PreflightContext const& ctx)
|
DIDDelete::preflight(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static NotTEC
|
static NotTEC
|
||||||
preflight(PreflightContext const& ctx);
|
preflight(PreflightContext const& ctx);
|
||||||
|
|
||||||
@@ -54,9 +51,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static NotTEC
|
static NotTEC
|
||||||
preflight(PreflightContext const& ctx);
|
preflight(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -27,12 +27,6 @@
|
|||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
bool
|
|
||||||
DelegateSet::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featurePermissionDelegation);
|
|
||||||
}
|
|
||||||
|
|
||||||
NotTEC
|
NotTEC
|
||||||
DelegateSet::preflight(PreflightContext const& ctx)
|
DelegateSet::preflight(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static NotTEC
|
static NotTEC
|
||||||
preflight(PreflightContext const& ctx);
|
preflight(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -26,12 +26,6 @@
|
|||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
bool
|
|
||||||
DeleteOracle::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featurePriceOracle);
|
|
||||||
}
|
|
||||||
|
|
||||||
NotTEC
|
NotTEC
|
||||||
DeleteOracle::preflight(PreflightContext const& ctx)
|
DeleteOracle::preflight(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -42,9 +42,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static NotTEC
|
static NotTEC
|
||||||
preflight(PreflightContext const& ctx);
|
preflight(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ namespace ripple {
|
|||||||
bool
|
bool
|
||||||
DepositPreauth::isEnabled(PreflightContext const& ctx)
|
DepositPreauth::isEnabled(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
if (!ctx.rules.enabled(featureDepositPreauth))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
bool const authArrPresent = ctx.tx.isFieldPresent(sfAuthorizeCredentials);
|
bool const authArrPresent = ctx.tx.isFieldPresent(sfAuthorizeCredentials);
|
||||||
bool const unauthArrPresent =
|
bool const unauthArrPresent =
|
||||||
ctx.tx.isFieldPresent(sfUnauthorizeCredentials);
|
ctx.tx.isFieldPresent(sfUnauthorizeCredentials);
|
||||||
|
|||||||
@@ -27,12 +27,6 @@
|
|||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
bool
|
|
||||||
LedgerStateFix::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(fixNFTokenPageLinks);
|
|
||||||
}
|
|
||||||
|
|
||||||
NotTEC
|
NotTEC
|
||||||
LedgerStateFix::preflight(PreflightContext const& ctx)
|
LedgerStateFix::preflight(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,9 +37,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static NotTEC
|
static NotTEC
|
||||||
preflight(PreflightContext const& ctx);
|
preflight(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -26,12 +26,6 @@
|
|||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
bool
|
|
||||||
MPTokenAuthorize::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureMPTokensV1);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::uint32_t
|
std::uint32_t
|
||||||
MPTokenAuthorize::getFlagsMask(PreflightContext const& ctx)
|
MPTokenAuthorize::getFlagsMask(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -42,9 +42,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static std::uint32_t
|
static std::uint32_t
|
||||||
getFlagsMask(PreflightContext const& ctx);
|
getFlagsMask(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -28,9 +28,6 @@ namespace ripple {
|
|||||||
bool
|
bool
|
||||||
MPTokenIssuanceCreate::isEnabled(PreflightContext const& ctx)
|
MPTokenIssuanceCreate::isEnabled(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
if (!ctx.rules.enabled(featureMPTokensV1))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (ctx.tx.isFieldPresent(sfDomainID) &&
|
if (ctx.tx.isFieldPresent(sfDomainID) &&
|
||||||
!(ctx.rules.enabled(featurePermissionedDomains) &&
|
!(ctx.rules.enabled(featurePermissionedDomains) &&
|
||||||
ctx.rules.enabled(featureSingleAssetVault)))
|
ctx.rules.enabled(featureSingleAssetVault)))
|
||||||
|
|||||||
@@ -25,12 +25,6 @@
|
|||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
bool
|
|
||||||
MPTokenIssuanceDestroy::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureMPTokensV1);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::uint32_t
|
std::uint32_t
|
||||||
MPTokenIssuanceDestroy::getFlagsMask(PreflightContext const& ctx)
|
MPTokenIssuanceDestroy::getFlagsMask(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static std::uint32_t
|
static std::uint32_t
|
||||||
getFlagsMask(PreflightContext const& ctx);
|
getFlagsMask(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -29,9 +29,6 @@ namespace ripple {
|
|||||||
bool
|
bool
|
||||||
MPTokenIssuanceSet::isEnabled(PreflightContext const& ctx)
|
MPTokenIssuanceSet::isEnabled(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
if (!ctx.rules.enabled(featureMPTokensV1))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return !ctx.tx.isFieldPresent(sfDomainID) ||
|
return !ctx.tx.isFieldPresent(sfDomainID) ||
|
||||||
(ctx.rules.enabled(featurePermissionedDomains) &&
|
(ctx.rules.enabled(featurePermissionedDomains) &&
|
||||||
ctx.rules.enabled(featureSingleAssetVault));
|
ctx.rules.enabled(featureSingleAssetVault));
|
||||||
@@ -64,7 +61,6 @@ static constexpr std::array<MPTMutabilityFlags, 6> mptMutabilityFlags = {
|
|||||||
NotTEC
|
NotTEC
|
||||||
MPTokenIssuanceSet::preflight(PreflightContext const& ctx)
|
MPTokenIssuanceSet::preflight(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|
||||||
auto const mutableFlags = ctx.tx[~sfMutableFlags];
|
auto const mutableFlags = ctx.tx[~sfMutableFlags];
|
||||||
auto const metadata = ctx.tx[~sfMPTokenMetadata];
|
auto const metadata = ctx.tx[~sfMPTokenMetadata];
|
||||||
auto const transferFee = ctx.tx[~sfTransferFee];
|
auto const transferFee = ctx.tx[~sfTransferFee];
|
||||||
|
|||||||
@@ -27,12 +27,6 @@
|
|||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
bool
|
|
||||||
NFTokenAcceptOffer::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureNonFungibleTokensV1);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::uint32_t
|
std::uint32_t
|
||||||
NFTokenAcceptOffer::getFlagsMask(PreflightContext const& ctx)
|
NFTokenAcceptOffer::getFlagsMask(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -51,9 +51,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static std::uint32_t
|
static std::uint32_t
|
||||||
getFlagsMask(PreflightContext const& ctx);
|
getFlagsMask(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -26,12 +26,6 @@
|
|||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
bool
|
|
||||||
NFTokenBurn::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureNonFungibleTokensV1);
|
|
||||||
}
|
|
||||||
|
|
||||||
NotTEC
|
NotTEC
|
||||||
NFTokenBurn::preflight(PreflightContext const& ctx)
|
NFTokenBurn::preflight(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static NotTEC
|
static NotTEC
|
||||||
preflight(PreflightContext const& ctx);
|
preflight(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -28,12 +28,6 @@
|
|||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
bool
|
|
||||||
NFTokenCancelOffer::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureNonFungibleTokensV1);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::uint32_t
|
std::uint32_t
|
||||||
NFTokenCancelOffer::getFlagsMask(PreflightContext const& ctx)
|
NFTokenCancelOffer::getFlagsMask(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static std::uint32_t
|
static std::uint32_t
|
||||||
getFlagsMask(PreflightContext const& ctx);
|
getFlagsMask(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -26,12 +26,6 @@
|
|||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
bool
|
|
||||||
NFTokenCreateOffer::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featureNonFungibleTokensV1);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::uint32_t
|
std::uint32_t
|
||||||
NFTokenCreateOffer::getFlagsMask(PreflightContext const& ctx)
|
NFTokenCreateOffer::getFlagsMask(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static std::uint32_t
|
static std::uint32_t
|
||||||
getFlagsMask(PreflightContext const& ctx);
|
getFlagsMask(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -49,9 +49,6 @@ hasOfferFields(PreflightContext const& ctx)
|
|||||||
bool
|
bool
|
||||||
NFTokenMint::isEnabled(PreflightContext const& ctx)
|
NFTokenMint::isEnabled(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
if (!ctx.rules.enabled(featureNonFungibleTokensV1))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return ctx.rules.enabled(featureNFTokenMintOffer) || !hasOfferFields(ctx);
|
return ctx.rules.enabled(featureNFTokenMintOffer) || !hasOfferFields(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,7 @@ namespace ripple {
|
|||||||
bool
|
bool
|
||||||
NFTokenModify::isEnabled(PreflightContext const& ctx)
|
NFTokenModify::isEnabled(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
return ctx.rules.enabled(featureNonFungibleTokensV1_1) &&
|
return ctx.rules.enabled(featureNonFungibleTokensV1_1);
|
||||||
ctx.rules.enabled(featureDynamicNFT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NotTEC
|
NotTEC
|
||||||
|
|||||||
@@ -24,12 +24,6 @@
|
|||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
bool
|
|
||||||
PermissionedDomainDelete::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featurePermissionedDomains);
|
|
||||||
}
|
|
||||||
|
|
||||||
NotTEC
|
NotTEC
|
||||||
PermissionedDomainDelete::preflight(PreflightContext const& ctx)
|
PermissionedDomainDelete::preflight(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static NotTEC
|
static NotTEC
|
||||||
preflight(PreflightContext const& ctx);
|
preflight(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,7 @@ namespace ripple {
|
|||||||
bool
|
bool
|
||||||
PermissionedDomainSet::isEnabled(PreflightContext const& ctx)
|
PermissionedDomainSet::isEnabled(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
return ctx.rules.enabled(featurePermissionedDomains) &&
|
return ctx.rules.enabled(featureCredentials);
|
||||||
ctx.rules.enabled(featureCredentials);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NotTEC
|
NotTEC
|
||||||
|
|||||||
@@ -36,12 +36,6 @@ tokenPairKey(STObject const& pair)
|
|||||||
pair.getFieldCurrency(sfQuoteAsset).currency());
|
pair.getFieldCurrency(sfQuoteAsset).currency());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
SetOracle::isEnabled(PreflightContext const& ctx)
|
|
||||||
{
|
|
||||||
return ctx.rules.enabled(featurePriceOracle);
|
|
||||||
}
|
|
||||||
|
|
||||||
NotTEC
|
NotTEC
|
||||||
SetOracle::preflight(PreflightContext const& ctx)
|
SetOracle::preflight(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -42,9 +42,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
isEnabled(PreflightContext const& ctx);
|
|
||||||
|
|
||||||
static NotTEC
|
static NotTEC
|
||||||
preflight(PreflightContext const& ctx);
|
preflight(PreflightContext const& ctx);
|
||||||
|
|
||||||
|
|||||||
@@ -203,7 +203,8 @@ public:
|
|||||||
/* Do NOT define an invokePreflight function in a derived class.
|
/* Do NOT define an invokePreflight function in a derived class.
|
||||||
Instead, define:
|
Instead, define:
|
||||||
|
|
||||||
// Optional if the transaction is gated on an amendment
|
// Optional if the transaction is gated on an amendment that
|
||||||
|
// isn't specified in transactions.macro
|
||||||
static bool
|
static bool
|
||||||
isEnabled(PreflightContext const& ctx);
|
isEnabled(PreflightContext const& ctx);
|
||||||
|
|
||||||
@@ -392,10 +393,6 @@ template <class T>
|
|||||||
NotTEC
|
NotTEC
|
||||||
Transactor::invokePreflight(PreflightContext const& ctx)
|
Transactor::invokePreflight(PreflightContext const& ctx)
|
||||||
{
|
{
|
||||||
// TODO: If #5650 is merged, use its transaction -> amendment lookup here to
|
|
||||||
// do a first-pass check. Rewrite or remove any `isEnabled` overloads that
|
|
||||||
// check those default amendments.
|
|
||||||
|
|
||||||
// Using this lookup does NOT require checking the fixDelegateV1_1. The data
|
// Using this lookup does NOT require checking the fixDelegateV1_1. The data
|
||||||
// exists regardless of whether it is enabled.
|
// exists regardless of whether it is enabled.
|
||||||
auto const feature =
|
auto const feature =
|
||||||
|
|||||||
Reference in New Issue
Block a user