20 #include <ripple/app/tx/impl/NFTokenCancelOffer.h>
21 #include <ripple/app/tx/impl/details/NFTokenUtils.h>
22 #include <ripple/ledger/View.h>
23 #include <ripple/protocol/Feature.h>
24 #include <ripple/protocol/TxFlags.h>
25 #include <ripple/protocol/st.h>
26 #include <boost/endian/conversion.hpp>
64 ids.begin(), ids.end(), [&ctx, &account](
uint256 const&
id) {
65 auto const offer = ctx.view.read(keylet::child(id));
74 if (offer->getType() != ltNFTOKEN_OFFER)
78 if (hasExpired(ctx.view, (*offer)[~sfExpiration]))
82 if ((*offer)[sfOwner] == account)
86 if (auto const dest = (*offer)[~sfDestination]; dest == account)
106 JLOG(
j_.
fatal()) <<
"Unable to delete token offer " <<
id
107 <<
" (ledger " <<
view().
seq() <<
")";
NotTEC preflight2(PreflightContext const &ctx)
Checks whether the signature appears valid.
bool enabled(uint256 const &feature) const
Returns true if a feature is enabled.
const SF_VECTOR256 sfNFTokenOffers
const STVector256 & getFieldV256(SField const &field) const
std::vector< uint256 >::iterator end()
Keylet nftoffer(AccountID const &owner, std::uint32_t seq)
An offer from an account to buy or sell an NFT.
static NotTEC preflight(PreflightContext const &ctx)
NotTEC preflight1(PreflightContext const &ctx)
Performs early sanity checks on the account and fee fields.
std::vector< uint256 >::iterator begin()
static TER preclaim(PreclaimContext const &ctx)
std::uint32_t getFlags() const
constexpr std::size_t maxTokenOfferCancelCount
The maximum number of token offers that can be canceled at once.
State information when determining if a tx is likely to claim a fee.
constexpr const std::uint32_t tfNFTokenCancelOfferMask
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
const uint256 featureNonFungibleTokensV1
LedgerIndex seq() const
Returns the sequence number of the base ledger.
T adjacent_find(T... args)
const SF_ACCOUNT sfAccount
State information when preflighting a tx.
bool deleteTokenOffer(ApplyView &view, std::shared_ptr< SLE > const &offer)
Deletes the given token offer.
TERSubset< CanCvtToNotTEC > NotTEC