1#include <xrpld/app/tx/detail/PermissionedDomainDelete.h>
3#include <xrpl/ledger/View.h>
4#include <xrpl/protocol/TxFlags.h>
12 if (domain == beast::zero)
22 auto const sleDomain = ctx.
view.
read({ltPERMISSIONED_DOMAIN, domain});
29 "ripple::PermissionedDomainDelete::preclaim : required fields present");
30 if (sleDomain->getAccountID(sfOwner) != ctx.
tx.
getAccountID(sfAccount))
42 "ripple::PermissionedDomainDelete::doApply : required field present");
46 auto const page = (*slePd)[sfOwnerNode];
52 <<
"Unable to delete permissioned domain directory entry.";
59 ownerSle && ownerSle->getFieldU32(sfOwnerCount) > 0,
60 "ripple::PermissionedDomainDelete::doApply : nonzero owner count");
beast::Journal const journal
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
virtual void erase(std::shared_ptr< SLE > const &sle)=0
Remove a peeked SLE.
TER doApply() override
Attempt to delete the Permissioned Domain.
static TER preclaim(PreclaimContext const &ctx)
static NotTEC preflight(PreflightContext const &ctx)
virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0
Return the state item associated with a key.
AccountID getAccountID(SField const &field) const
T::value_type at(TypedField< T > const &f) const
Get the value of a field.
bool isFieldPresent(SField const &field) const
uint256 getFieldH256(SField const &field) const
Keylet account(AccountID const &id) noexcept
AccountID root.
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void adjustOwnerCount(ApplyView &view, std::shared_ptr< SLE > const &sle, std::int32_t amount, beast::Journal j)
Adjust the owner count up or down.
TERSubset< CanCvtToNotTEC > NotTEC
State information when determining if a tx is likely to claim a fee.
State information when preflighting a tx.