rippled
DeleteAccount.cpp
1 //------------------------------------------------------------------------------
2 /*
3  This file is part of rippled: https://github.com/ripple/rippled
4  Copyright (c) 2019 Ripple Labs Inc.
5 
6  Permission to use, copy, modify, and/or distribute this software for any
7  purpose with or without fee is hereby granted, provided that the above
8  copyright notice and this permission notice appear in all copies.
9 
10  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18 //==============================================================================
19 
20 #include <ripple/app/tx/impl/DID.h>
21 #include <ripple/app/tx/impl/DeleteAccount.h>
22 #include <ripple/app/tx/impl/DeleteOracle.h>
23 #include <ripple/app/tx/impl/DepositPreauth.h>
24 #include <ripple/app/tx/impl/SetSignerList.h>
25 #include <ripple/app/tx/impl/details/NFTokenUtils.h>
26 #include <ripple/basics/FeeUnits.h>
27 #include <ripple/basics/Log.h>
28 #include <ripple/basics/mulDiv.h>
29 #include <ripple/ledger/View.h>
30 #include <ripple/protocol/Feature.h>
31 #include <ripple/protocol/Indexes.h>
32 #include <ripple/protocol/Protocol.h>
33 #include <ripple/protocol/TxFlags.h>
34 #include <ripple/protocol/st.h>
35 
36 namespace ripple {
37 
38 NotTEC
40 {
42  return temDISABLED;
43 
44  if (ctx.tx.getFlags() & tfUniversalMask)
45  return temINVALID_FLAG;
46 
47  if (auto const ret = preflight1(ctx); !isTesSuccess(ret))
48  return ret;
49 
50  if (ctx.tx[sfAccount] == ctx.tx[sfDestination])
51  // An account cannot be deleted and give itself the resulting XRP.
52  return temDST_IS_SRC;
53 
54  return preflight2(ctx);
55 }
56 
59 {
60  // The fee required for AccountDelete is one owner reserve.
61  return view.fees().increment;
62 }
63 
64 namespace {
65 // Define a function pointer type that can be used to delete ledger node types.
66 using DeleterFuncPtr = TER (*)(
67  Application& app,
68  ApplyView& view,
69  AccountID const& account,
70  uint256 const& delIndex,
71  std::shared_ptr<SLE> const& sleDel,
72  beast::Journal j);
73 
74 // Local function definitions that provides signature compatibility.
75 TER
77  Application& app,
78  ApplyView& view,
79  AccountID const& account,
80  uint256 const& delIndex,
81  std::shared_ptr<SLE> const& sleDel,
83 {
84  return offerDelete(view, sleDel, j);
85 }
86 
87 TER
89  Application& app,
90  ApplyView& view,
91  AccountID const& account,
92  uint256 const& delIndex,
93  std::shared_ptr<SLE> const& sleDel,
95 {
96  return SetSignerList::removeFromLedger(app, view, account, j);
97 }
98 
99 TER
100 removeTicketFromLedger(
101  Application&,
102  ApplyView& view,
103  AccountID const& account,
104  uint256 const& delIndex,
105  std::shared_ptr<SLE> const&,
106  beast::Journal j)
107 {
108  return Transactor::ticketDelete(view, account, delIndex, j);
109 }
110 
111 TER
112 removeDepositPreauthFromLedger(
113  Application& app,
114  ApplyView& view,
115  AccountID const& account,
116  uint256 const& delIndex,
117  std::shared_ptr<SLE> const& sleDel,
118  beast::Journal j)
119 {
120  return DepositPreauth::removeFromLedger(app, view, delIndex, j);
121 }
122 
123 TER
124 removeNFTokenOfferFromLedger(
125  Application& app,
126  ApplyView& view,
127  AccountID const& account,
128  uint256 const& delIndex,
129  std::shared_ptr<SLE> const& sleDel,
131 {
132  if (!nft::deleteTokenOffer(view, sleDel))
133  return tefBAD_LEDGER;
134 
135  return tesSUCCESS;
136 }
137 
138 TER
139 removeDIDFromLedger(
140  Application& app,
141  ApplyView& view,
142  AccountID const& account,
143  uint256 const& delIndex,
144  std::shared_ptr<SLE> const& sleDel,
145  beast::Journal j)
146 {
147  return DIDDelete::deleteSLE(view, sleDel, account, j);
148 }
149 
150 TER
151 removeOracleFromLedger(
152  Application&,
153  ApplyView& view,
154  AccountID const& account,
155  uint256 const&,
156  std::shared_ptr<SLE> const& sleDel,
157  beast::Journal j)
158 {
159  return DeleteOracle::deleteOracle(view, sleDel, account, j);
160 }
161 
162 // Return nullptr if the LedgerEntryType represents an obligation that can't
163 // be deleted. Otherwise return the pointer to the function that can delete
164 // the non-obligation
165 DeleterFuncPtr
166 nonObligationDeleter(LedgerEntryType t)
167 {
168  switch (t)
169  {
170  case ltOFFER:
171  return offerDelete;
172  case ltSIGNER_LIST:
174  case ltTICKET:
175  return removeTicketFromLedger;
176  case ltDEPOSIT_PREAUTH:
177  return removeDepositPreauthFromLedger;
178  case ltNFTOKEN_OFFER:
179  return removeNFTokenOfferFromLedger;
180  case ltDID:
181  return removeDIDFromLedger;
182  case ltORACLE:
183  return removeOracleFromLedger;
184  default:
185  return nullptr;
186  }
187 }
188 
189 } // namespace
190 
191 TER
193 {
194  AccountID const account{ctx.tx[sfAccount]};
195  AccountID const dst{ctx.tx[sfDestination]};
196 
197  auto sleDst = ctx.view.read(keylet::account(dst));
198 
199  if (!sleDst)
200  return tecNO_DST;
201 
202  if ((*sleDst)[sfFlags] & lsfRequireDestTag && !ctx.tx[~sfDestinationTag])
203  return tecDST_TAG_NEEDED;
204 
205  // Check whether the destination account requires deposit authorization.
206  if (ctx.view.rules().enabled(featureDepositAuth) &&
207  (sleDst->getFlags() & lsfDepositAuth))
208  {
209  if (!ctx.view.exists(keylet::depositPreauth(dst, account)))
210  return tecNO_PERMISSION;
211  }
212 
213  auto sleAccount = ctx.view.read(keylet::account(account));
214  assert(sleAccount);
215  if (!sleAccount)
216  return terNO_ACCOUNT;
217 
219  {
220  // If an issuer has any issued NFTs resident in the ledger then it
221  // cannot be deleted.
222  if ((*sleAccount)[~sfMintedNFTokens] !=
223  (*sleAccount)[~sfBurnedNFTokens])
224  return tecHAS_OBLIGATIONS;
225 
226  // If the account owns any NFTs it cannot be deleted.
227  Keylet const first = keylet::nftpage_min(account);
228  Keylet const last = keylet::nftpage_max(account);
229 
230  auto const cp = ctx.view.read(Keylet(
232  ctx.view.succ(first.key, last.key.next()).value_or(last.key)));
233  if (cp)
234  return tecHAS_OBLIGATIONS;
235  }
236 
237  // We don't allow an account to be deleted if its sequence number
238  // is within 256 of the current ledger. This prevents replay of old
239  // transactions if this account is resurrected after it is deleted.
240  //
241  // We look at the account's Sequence rather than the transaction's
242  // Sequence in preparation for Tickets.
243  constexpr std::uint32_t seqDelta{255};
244  if ((*sleAccount)[sfSequence] + seqDelta > ctx.view.seq())
245  return tecTOO_SOON;
246 
247  // When fixNFTokenRemint is enabled, we don't allow an account to be
248  // deleted if <FirstNFTokenSequence + MintedNFTokens> is within 256 of the
249  // current ledger. This is to prevent having duplicate NFTokenIDs after
250  // account re-creation.
251  //
252  // Without this restriction, duplicate NFTokenIDs can be reproduced when
253  // authorized minting is involved. Because when the minter mints a NFToken,
254  // the issuer's sequence does not change. So when the issuer re-creates
255  // their account and mints a NFToken, it is possible that the
256  // NFTokenSequence of this NFToken is the same as the one that the
257  // authorized minter minted in a previous ledger.
258  if (ctx.view.rules().enabled(fixNFTokenRemint) &&
259  ((*sleAccount)[~sfFirstNFTokenSequence].value_or(0) +
260  (*sleAccount)[~sfMintedNFTokens].value_or(0) + seqDelta >
261  ctx.view.seq()))
262  return tecTOO_SOON;
263 
264  // Verify that the account does not own any objects that would prevent
265  // the account from being deleted.
266  Keylet const ownerDirKeylet{keylet::ownerDir(account)};
267  if (dirIsEmpty(ctx.view, ownerDirKeylet))
268  return tesSUCCESS;
269 
270  std::shared_ptr<SLE const> sleDirNode{};
271  unsigned int uDirEntry{0};
272  uint256 dirEntry{beast::zero};
273 
274  // Account has no directory at all. This _should_ have been caught
275  // by the dirIsEmpty() check earlier, but it's okay to catch it here.
276  if (!cdirFirst(
277  ctx.view, ownerDirKeylet.key, sleDirNode, uDirEntry, dirEntry))
278  return tesSUCCESS;
279 
280  std::int32_t deletableDirEntryCount{0};
281  do
282  {
283  // Make sure any directory node types that we find are the kind
284  // we can delete.
285  auto sleItem = ctx.view.read(keylet::child(dirEntry));
286  if (!sleItem)
287  {
288  // Directory node has an invalid index. Bail out.
289  JLOG(ctx.j.fatal())
290  << "DeleteAccount: directory node in ledger " << ctx.view.seq()
291  << " has index to object that is missing: "
292  << to_string(dirEntry);
293  return tefBAD_LEDGER;
294  }
295 
296  LedgerEntryType const nodeType{
297  safe_cast<LedgerEntryType>((*sleItem)[sfLedgerEntryType])};
298 
299  if (!nonObligationDeleter(nodeType))
300  return tecHAS_OBLIGATIONS;
301 
302  // We found a deletable directory entry. Count it. If we find too
303  // many deletable directory entries then bail out.
304  if (++deletableDirEntryCount > maxDeletableDirEntries)
305  return tefTOO_BIG;
306 
307  } while (cdirNext(
308  ctx.view, ownerDirKeylet.key, sleDirNode, uDirEntry, dirEntry));
309 
310  return tesSUCCESS;
311 }
312 
313 TER
315 {
316  auto src = view().peek(keylet::account(account_));
317  assert(src);
318 
319  auto dst = view().peek(keylet::account(ctx_.tx[sfDestination]));
320  assert(dst);
321 
322  if (!src || !dst)
323  return tefBAD_LEDGER;
324 
325  Keylet const ownerDirKeylet{keylet::ownerDir(account_)};
326  auto const ter = cleanupOnAccountDelete(
327  view(),
328  ownerDirKeylet,
329  [&](LedgerEntryType nodeType,
330  uint256 const& dirEntry,
332  if (auto deleter = nonObligationDeleter(nodeType))
333  {
334  TER const result{
335  deleter(ctx_.app, view(), account_, dirEntry, sleItem, j_)};
336 
337  return {result, SkipEntry::No};
338  }
339 
340  assert(!"Undeletable entry should be found in preclaim.");
341  JLOG(j_.error()) << "DeleteAccount undeletable item not "
342  "found in preclaim.";
344  },
345  ctx_.journal);
346  if (ter != tesSUCCESS)
347  return ter;
348 
349  // Transfer any XRP remaining after the fee is paid to the destination:
350  (*dst)[sfBalance] = (*dst)[sfBalance] + mSourceBalance;
351  (*src)[sfBalance] = (*src)[sfBalance] - mSourceBalance;
353 
354  assert((*src)[sfBalance] == XRPAmount(0));
355 
356  // If there's still an owner directory associated with the source account
357  // delete it.
358  if (view().exists(ownerDirKeylet) && !view().emptyDirDelete(ownerDirKeylet))
359  {
360  JLOG(j_.error()) << "DeleteAccount cannot delete root dir node of "
361  << toBase58(account_);
362  return tecHAS_OBLIGATIONS;
363  }
364 
365  // Re-arm the password change fee if we can and need to.
366  if (mSourceBalance > XRPAmount(0) && dst->isFlag(lsfPasswordSpent))
367  dst->clearFlag(lsfPasswordSpent);
368 
369  view().update(dst);
370  view().erase(src);
371 
372  return tesSUCCESS;
373 }
374 
375 } // namespace ripple
beast::Journal::fatal
Stream fatal() const
Definition: Journal.h:338
ripple::keylet::ownerDir
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Definition: Indexes.cpp:313
ripple::Application
Definition: Application.h:116
ripple::cdirNext
bool cdirNext(ReadView const &view, uint256 const &root, std::shared_ptr< SLE const > &page, unsigned int &index, uint256 &entry)
Returns the next entry in the directory, advancing the index.
Definition: View.cpp:145
ripple::sfFirstNFTokenSequence
const SF_UINT32 sfFirstNFTokenSequence
ripple::preflight2
NotTEC preflight2(PreflightContext const &ctx)
Checks whether the signature appears valid.
Definition: Transactor.cpp:133
ripple::ltTICKET
@ ltTICKET
A ledger object which describes a ticket.
Definition: LedgerFormats.h:80
ripple::lsfPasswordSpent
@ lsfPasswordSpent
Definition: LedgerFormats.h:259
ripple::Keylet
A pair of SHAMap key and LedgerEntryType.
Definition: Keylet.h:38
ripple::Rules::enabled
bool enabled(uint256 const &feature) const
Returns true if a feature is enabled.
Definition: Rules.cpp:94
std::shared_ptr
STL class.
ripple::PreclaimContext::view
ReadView const & view
Definition: Transactor.h:56
ripple::ltORACLE
@ ltORACLE
A ledger object which tracks Oracle.
Definition: LedgerFormats.h:198
ripple::PreclaimContext::j
const beast::Journal j
Definition: Transactor.h:60
ripple::ApplyView::peek
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
ripple::sfDestination
const SF_ACCOUNT sfDestination
ripple::Transactor::j_
const beast::Journal j_
Definition: Transactor.h:89
ripple::isTesSuccess
bool isTesSuccess(TER x)
Definition: TER.h:643
std::pair
ripple::sfSequence
const SF_UINT32 sfSequence
ripple::ApplyView::erase
virtual void erase(std::shared_ptr< SLE > const &sle)=0
Remove a peeked SLE.
ripple::ReadView::fees
virtual Fees const & fees() const =0
Returns the fees for the base ledger.
ripple::DeleteOracle::deleteOracle
static TER deleteOracle(ApplyView &view, std::shared_ptr< SLE > const &sle, AccountID const &account, beast::Journal j)
Definition: DeleteOracle.cpp:70
ripple::ltSIGNER_LIST
@ ltSIGNER_LIST
A ledger object which contains a signer list for an account.
Definition: LedgerFormats.h:86
ripple::sfMintedNFTokens
const SF_UINT32 sfMintedNFTokens
ripple::featureDepositAuth
const uint256 featureDepositAuth
ripple::tecDST_TAG_NEEDED
@ tecDST_TAG_NEEDED
Definition: TER.h:292
ripple::toBase58
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
Definition: AccountID.cpp:104
ripple::DeleteAccount::preflight
static NotTEC preflight(PreflightContext const &ctx)
Definition: DeleteAccount.cpp:39
ripple::keylet::child
Keylet child(uint256 const &key) noexcept
Any item that can be in an owner dir.
Definition: Indexes.cpp:149
ripple::ApplyView::update
virtual void update(std::shared_ptr< SLE > const &sle)=0
Indicate changes to a peeked SLE.
ripple::DeleteAccount::doApply
TER doApply() override
Definition: DeleteAccount.cpp:314
ripple::ApplyContext::journal
const beast::Journal journal
Definition: ApplyContext.h:51
ripple::base_uint::next
base_uint next() const
Definition: base_uint.h:448
ripple::DeleteAccount::preclaim
static TER preclaim(PreclaimContext const &ctx)
Definition: DeleteAccount.cpp:192
ripple::temDST_IS_SRC
@ temDST_IS_SRC
Definition: TER.h:107
ripple::Transactor::ticketDelete
static TER ticketDelete(ApplyView &view, AccountID const &account, uint256 const &ticketIndex, beast::Journal j)
Definition: Transactor.cpp:386
ripple::preflight1
NotTEC preflight1(PreflightContext const &ctx)
Performs early sanity checks on the account and fee fields.
Definition: Transactor.cpp:81
ripple::lsfDepositAuth
@ lsfDepositAuth
Definition: LedgerFormats.h:270
ripple::ApplyView
Writeable view to a ledger, for applying a transaction.
Definition: ApplyView.h:134
ripple::ApplyContext::app
Application & app
Definition: ApplyContext.h:47
ripple::fixNFTokenRemint
const uint256 fixNFTokenRemint
ripple::uint256
base_uint< 256 > uint256
Definition: base_uint.h:550
ripple::featureDeletableAccounts
const uint256 featureDeletableAccounts
ripple::Fees::increment
XRPAmount increment
Definition: protocol/Fees.h:36
ripple::Keylet::key
uint256 key
Definition: Keylet.h:40
ripple::base_uint
Integers of any length that is a multiple of 32-bits.
Definition: base_uint.h:82
ripple::temINVALID_FLAG
@ temINVALID_FLAG
Definition: TER.h:110
ripple::keylet::nftpage_min
Keylet nftpage_min(AccountID const &owner)
NFT page keylets.
Definition: Indexes.cpp:342
ripple::tefBAD_LEDGER
@ tefBAD_LEDGER
Definition: TER.h:167
ripple::DepositPreauth::removeFromLedger
static TER removeFromLedger(Application &app, ApplyView &view, uint256 const &delIndex, beast::Journal j)
Definition: DepositPreauth.cpp:166
ripple::ltOFFER
@ ltOFFER
A ledger object which describes an offer on the DEX.
Definition: LedgerFormats.h:92
ripple::maxDeletableDirEntries
constexpr std::size_t maxDeletableDirEntries
The maximum number of owner directory entries for account to be deletable.
Definition: Protocol.h:64
ripple::keylet::account
Keylet account(AccountID const &id) noexcept
AccountID root.
Definition: Indexes.cpp:143
ripple::DIDDelete::deleteSLE
static TER deleteSLE(ApplyContext &ctx, Keylet sleKeylet, AccountID const owner)
Definition: DID.cpp:184
ripple::offerDelete
TER offerDelete(ApplyView &view, std::shared_ptr< SLE > const &sle, beast::Journal j)
Delete an offer.
Definition: View.cpp:910
ripple::ltDID
@ ltDID
The ledger object which tracks the DID.
Definition: LedgerFormats.h:193
ripple::ltNFTOKEN_OFFER
@ ltNFTOKEN_OFFER
A ledger object which identifies an offer to buy or sell an NFT.
Definition: LedgerFormats.h:181
ripple::TERSubset< CanCvtToTER >
ripple::TER
TERSubset< CanCvtToTER > TER
Definition: TER.h:614
ripple::ltDEPOSIT_PREAUTH
@ ltDEPOSIT_PREAUTH
A ledger object which describes a deposit preauthorization.
Definition: LedgerFormats.h:161
ripple::keylet::nftpage_max
Keylet nftpage_max(AccountID const &owner)
A keylet for the owner's last possible NFT page.
Definition: Indexes.cpp:350
beast::Journal::error
Stream error() const
Definition: Journal.h:332
ripple::ReadView::exists
virtual bool exists(Keylet const &k) const =0
Determine if a state item exists.
ripple::STObject::getFlags
std::uint32_t getFlags() const
Definition: STObject.cpp:497
ripple::STTx
Definition: STTx.h:46
ripple::SetSignerList::removeFromLedger
static TER removeFromLedger(Application &app, ApplyView &view, AccountID const &account, beast::Journal j)
Definition: SetSignerList.cpp:229
ripple::ApplyContext::deliver
void deliver(STAmount const &amount)
Sets the DeliveredAmount field in the metadata.
Definition: ApplyContext.h:74
beast::Journal
A generic endpoint for log messages.
Definition: Journal.h:58
std::uint32_t
ripple::ReadView::succ
virtual std::optional< key_type > succ(key_type const &key, std::optional< key_type > const &last=std::nullopt) const =0
Return the key of the next state item.
ripple::ReadView::read
virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0
Return the state item associated with a key.
ripple::cleanupOnAccountDelete
TER cleanupOnAccountDelete(ApplyView &view, Keylet const &ownerDirKeylet, EntryDeleter const &deleter, beast::Journal j, std::optional< uint16_t > maxNodesToDelete)
Definition: View.cpp:1531
ripple::PreclaimContext::tx
STTx const & tx
Definition: Transactor.h:58
ripple::lsfRequireDestTag
@ lsfRequireDestTag
Definition: LedgerFormats.h:260
ripple::terNO_ACCOUNT
@ terNO_ACCOUNT
Definition: TER.h:213
ripple::PreclaimContext
State information when determining if a tx is likely to claim a fee.
Definition: Transactor.h:52
ripple::tecTOO_SOON
@ tecTOO_SOON
Definition: TER.h:301
ripple::dirIsEmpty
bool dirIsEmpty(ReadView const &view, Keylet const &k)
Returns true if the directory is empty.
Definition: View.cpp:607
ripple::ReadView
A view into a ledger.
Definition: ReadView.h:54
ripple::ltNFTOKEN_PAGE
@ ltNFTOKEN_PAGE
A ledger object which contains a list of NFTs.
Definition: LedgerFormats.h:175
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::featureNonFungibleTokensV1
const uint256 featureNonFungibleTokensV1
ripple::sfLedgerEntryType
const SF_UINT16 sfLedgerEntryType
ripple::LedgerEntryType
LedgerEntryType
Identifiers for on-ledger objects.
Definition: LedgerFormats.h:53
ripple::Transactor::view
ApplyView & view()
Definition: Transactor.h:107
ripple::temDISABLED
@ temDISABLED
Definition: TER.h:113
ripple::ReadView::seq
LedgerIndex seq() const
Returns the sequence number of the base ledger.
Definition: ReadView.h:122
ripple::ReadView::rules
virtual Rules const & rules() const =0
Returns the tx processing rules.
ripple::sfFlags
const SF_UINT32 sfFlags
ripple::sfDestinationTag
const SF_UINT32 sfDestinationTag
ripple::tefTOO_BIG
@ tefTOO_BIG
Definition: TER.h:181
ripple::tecHAS_OBLIGATIONS
@ tecHAS_OBLIGATIONS
Definition: TER.h:300
ripple::tecNO_PERMISSION
@ tecNO_PERMISSION
Definition: TER.h:288
ripple::Transactor::mSourceBalance
XRPAmount mSourceBalance
Definition: Transactor.h:93
ripple::SkipEntry::No
@ No
ripple::sfBalance
const SF_AMOUNT sfBalance
ripple::removeSignersFromLedger
static TER removeSignersFromLedger(Application &app, ApplyView &view, Keylet const &accountKeylet, Keylet const &ownerDirKeylet, Keylet const &signerListKeylet, beast::Journal j)
Definition: SetSignerList.cpp:180
ripple::Transactor::ctx_
ApplyContext & ctx_
Definition: Transactor.h:88
ripple::to_string
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
Definition: app/misc/impl/Manifest.cpp:41
ripple::sfAccount
const SF_ACCOUNT sfAccount
ripple::PreflightContext::tx
STTx const & tx
Definition: Transactor.h:35
ripple::PreflightContext
State information when preflighting a tx.
Definition: Transactor.h:31
ripple::sfBurnedNFTokens
const SF_UINT32 sfBurnedNFTokens
ripple::PreflightContext::rules
const Rules rules
Definition: Transactor.h:36
ripple::cdirFirst
bool cdirFirst(ReadView const &view, uint256 const &root, std::shared_ptr< SLE const > &page, unsigned int &index, uint256 &entry)
Returns the first entry in the directory, advancing the index.
Definition: View.cpp:134
ripple::tfUniversalMask
constexpr std::uint32_t tfUniversalMask
Definition: TxFlags.h:60
ripple::keylet::depositPreauth
Keylet depositPreauth(AccountID const &owner, AccountID const &preauthorized) noexcept
A DepositPreauth.
Definition: Indexes.cpp:297
ripple::DeleteAccount::calculateBaseFee
static XRPAmount calculateBaseFee(ReadView const &view, STTx const &tx)
Definition: DeleteAccount.cpp:58
ripple::tesSUCCESS
@ tesSUCCESS
Definition: TER.h:238
ripple::Transactor::account_
const AccountID account_
Definition: Transactor.h:91
ripple::ApplyContext::tx
STTx const & tx
Definition: ApplyContext.h:48
ripple::AccountID
base_uint< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
Definition: AccountID.h:49
ripple::nft::deleteTokenOffer
bool deleteTokenOffer(ApplyView &view, std::shared_ptr< SLE > const &offer)
Deletes the given token offer.
Definition: NFTokenUtils.cpp:605
ripple::tecNO_DST
@ tecNO_DST
Definition: TER.h:273
ripple::XRPAmount
Definition: XRPAmount.h:46
ripple::NotTEC
TERSubset< CanCvtToNotTEC > NotTEC
Definition: TER.h:574