1#include <xrpld/app/tx/detail/NFTokenBurn.h>
2#include <xrpld/app/tx/detail/NFTokenUtils.h>
4#include <xrpl/protocol/Feature.h>
5#include <xrpl/protocol/Protocol.h>
6#include <xrpl/protocol/TxFlags.h>
19 auto const owner = [&ctx]() {
23 return ctx.
tx[sfAccount];
31 if (
auto const account = ctx.
tx[sfAccount]; owner != account)
41 if (
auto const minter = (*sle)[~sfNFTokenMinter];
68 (*issuer)[~sfBurnedNFTokens] =
69 (*issuer)[~sfBurnedNFTokens].value_or(0) + 1;
virtual void update(std::shared_ptr< SLE > const &sle)=0
Indicate changes to a peeked SLE.
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
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
bool isFieldPresent(SField const &field) const
Keylet account(AccountID const &id) noexcept
AccountID root.
Keylet nft_buys(uint256 const &id) noexcept
The directory of buy offers for the specified NFT.
Keylet nft_sells(uint256 const &id) noexcept
The directory of sell offers for the specified NFT.
constexpr std::uint16_t const flagBurnable
std::uint16_t getFlags(uint256 const &id)
TER removeToken(ApplyView &view, AccountID const &owner, uint256 const &nftokenID)
Remove the token from the owner's token directory.
AccountID getIssuer(uint256 const &id)
std::optional< STObject > findToken(ReadView const &view, AccountID const &owner, uint256 const &nftokenID)
Finds the specified token in the owner's token directory.
std::size_t removeTokenOffersWithLimit(ApplyView &view, Keylet const &directory, std::size_t maxDeletableOffers)
Delete up to a specified number of offers from the specified token offer directory.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::size_t constexpr maxDeletableTokenOfferEntries
The maximum number of offers in an offer directory for NFT to be burnable.
bool isTesSuccess(TER x) noexcept
TERSubset< CanCvtToNotTEC > NotTEC
State information when determining if a tx is likely to claim a fee.
State information when preflighting a tx.