rippled
Loading...
Searching...
No Matches
SetAccount.cpp
1#include <xrpld/app/misc/DelegateUtils.h>
2#include <xrpld/app/tx/detail/SetAccount.h>
3#include <xrpld/core/Config.h>
4
5#include <xrpl/basics/Log.h>
6#include <xrpl/ledger/View.h>
7#include <xrpl/protocol/Feature.h>
8#include <xrpl/protocol/Indexes.h>
9#include <xrpl/protocol/PublicKey.h>
10#include <xrpl/protocol/Quality.h>
11#include <xrpl/protocol/st.h>
12
13namespace xrpl {
14
15TxConsequences
17{
18 // The SetAccount may be a blocker, but only if it sets or clears
19 // specific account flags.
20 auto getTxConsequencesCategory = [](STTx const& tx) {
21 if (std::uint32_t const uTxFlags = tx.getFlags(); uTxFlags & (tfRequireAuth | tfOptionalAuth))
23
24 if (auto const uSetFlag = tx[~sfSetFlag];
25 uSetFlag && (*uSetFlag == asfRequireAuth || *uSetFlag == asfDisableMaster || *uSetFlag == asfAccountTxnID))
27
28 if (auto const uClearFlag = tx[~sfClearFlag]; uClearFlag &&
29 (*uClearFlag == asfRequireAuth || *uClearFlag == asfDisableMaster || *uClearFlag == asfAccountTxnID))
31
33 };
34
35 return TxConsequences{ctx.tx, getTxConsequencesCategory(ctx.tx)};
36}
37
43
46{
47 auto& tx = ctx.tx;
48 auto& j = ctx.j;
49
50 std::uint32_t const uTxFlags = tx.getFlags();
51
52 std::uint32_t const uSetFlag = tx.getFieldU32(sfSetFlag);
53 std::uint32_t const uClearFlag = tx.getFieldU32(sfClearFlag);
54
55 if ((uSetFlag != 0) && (uSetFlag == uClearFlag))
56 {
57 JLOG(j.trace()) << "Malformed transaction: Set and clear same flag.";
58 return temINVALID_FLAG;
59 }
60
61 //
62 // RequireAuth
63 //
64 bool bSetRequireAuth = (uTxFlags & tfRequireAuth) || (uSetFlag == asfRequireAuth);
65 bool bClearRequireAuth = (uTxFlags & tfOptionalAuth) || (uClearFlag == asfRequireAuth);
66
67 if (bSetRequireAuth && bClearRequireAuth)
68 {
69 JLOG(j.trace()) << "Malformed transaction: Contradictory flags set.";
70 return temINVALID_FLAG;
71 }
72
73 //
74 // RequireDestTag
75 //
76 bool bSetRequireDest = (uTxFlags & tfRequireDestTag) || (uSetFlag == asfRequireDest);
77 bool bClearRequireDest = (uTxFlags & tfOptionalDestTag) || (uClearFlag == asfRequireDest);
78
79 if (bSetRequireDest && bClearRequireDest)
80 {
81 JLOG(j.trace()) << "Malformed transaction: Contradictory flags set.";
82 return temINVALID_FLAG;
83 }
84
85 //
86 // DisallowXRP
87 //
88 bool bSetDisallowXRP = (uTxFlags & tfDisallowXRP) || (uSetFlag == asfDisallowXRP);
89 bool bClearDisallowXRP = (uTxFlags & tfAllowXRP) || (uClearFlag == asfDisallowXRP);
90
91 if (bSetDisallowXRP && bClearDisallowXRP)
92 {
93 JLOG(j.trace()) << "Malformed transaction: Contradictory flags set.";
94 return temINVALID_FLAG;
95 }
96
97 // TransferRate
98 if (tx.isFieldPresent(sfTransferRate))
99 {
100 std::uint32_t uRate = tx.getFieldU32(sfTransferRate);
101
102 if (uRate && (uRate < QUALITY_ONE))
103 {
104 JLOG(j.trace()) << "Malformed transaction: Transfer rate too small.";
106 }
107
108 if (uRate > 2 * QUALITY_ONE)
109 {
110 JLOG(j.trace()) << "Malformed transaction: Transfer rate too large.";
112 }
113 }
114
115 // TickSize
116 if (tx.isFieldPresent(sfTickSize))
117 {
118 auto uTickSize = tx[sfTickSize];
119 if (uTickSize && ((uTickSize < Quality::minTickSize) || (uTickSize > Quality::maxTickSize)))
120 {
121 JLOG(j.trace()) << "Malformed transaction: Bad tick size.";
122 return temBAD_TICK_SIZE;
123 }
124 }
125
126 if (auto const mk = tx[~sfMessageKey])
127 {
128 if (mk->size() && !publicKeyType({mk->data(), mk->size()}))
129 {
130 JLOG(j.trace()) << "Invalid message key specified.";
131 return telBAD_PUBLIC_KEY;
132 }
133 }
134
135 if (auto const domain = tx[~sfDomain]; domain && domain->size() > maxDomainLength)
136 {
137 JLOG(j.trace()) << "domain too long";
138 return telBAD_DOMAIN;
139 }
140
141 // Configure authorized minting account:
142 if (uSetFlag == asfAuthorizedNFTokenMinter && !tx.isFieldPresent(sfNFTokenMinter))
143 return temMALFORMED;
144
145 if (uClearFlag == asfAuthorizedNFTokenMinter && tx.isFieldPresent(sfNFTokenMinter))
146 return temMALFORMED;
147
148 return tesSUCCESS;
149}
150
151NotTEC
153{
154 // SetAccount is prohibited to be granted on a transaction level,
155 // but some granular permissions are allowed.
156 auto const delegate = tx[~sfDelegate];
157 if (!delegate)
158 return tesSUCCESS;
159
160 auto const delegateKey = keylet::delegate(tx[sfAccount], *delegate);
161 auto const sle = view.read(delegateKey);
162
163 if (!sle)
165
167 loadGranularPermission(sle, ttACCOUNT_SET, granularPermissions);
168
169 auto const uSetFlag = tx.getFieldU32(sfSetFlag);
170 auto const uClearFlag = tx.getFieldU32(sfClearFlag);
171 auto const uTxFlags = tx.getFlags();
172 // We don't support any flag based granular permission under
173 // AccountSet transaction. If any delegated account is trying to
174 // update the flag on behalf of another account, it is not
175 // authorized.
176 if (uSetFlag != 0 || uClearFlag != 0 || uTxFlags & tfUniversalMask)
178
179 if (tx.isFieldPresent(sfEmailHash) && !granularPermissions.contains(AccountEmailHashSet))
181
182 if (tx.isFieldPresent(sfWalletLocator) || tx.isFieldPresent(sfNFTokenMinter))
184
185 if (tx.isFieldPresent(sfMessageKey) && !granularPermissions.contains(AccountMessageKeySet))
187
188 if (tx.isFieldPresent(sfDomain) && !granularPermissions.contains(AccountDomainSet))
190
191 if (tx.isFieldPresent(sfTransferRate) && !granularPermissions.contains(AccountTransferRateSet))
193
194 if (tx.isFieldPresent(sfTickSize) && !granularPermissions.contains(AccountTickSizeSet))
196
197 return tesSUCCESS;
198}
199
200TER
202{
203 auto const id = ctx.tx[sfAccount];
204
205 std::uint32_t const uTxFlags = ctx.tx.getFlags();
206
207 auto const sle = ctx.view.read(keylet::account(id));
208 if (!sle)
209 return terNO_ACCOUNT;
210
211 std::uint32_t const uFlagsIn = sle->getFieldU32(sfFlags);
212
213 std::uint32_t const uSetFlag = ctx.tx.getFieldU32(sfSetFlag);
214
215 // legacy AccountSet flags
216 bool bSetRequireAuth = (uTxFlags & tfRequireAuth) || (uSetFlag == asfRequireAuth);
217
218 //
219 // RequireAuth
220 //
221 if (bSetRequireAuth && !(uFlagsIn & lsfRequireAuth))
222 {
223 if (!dirIsEmpty(ctx.view, keylet::ownerDir(id)))
224 {
225 JLOG(ctx.j.trace()) << "Retry: Owner directory not empty.";
226 return (ctx.flags & tapRETRY) ? TER{terOWNERS} : TER{tecOWNERS};
227 }
228 }
229
230 //
231 // Clawback
232 //
233 if (ctx.view.rules().enabled(featureClawback))
234 {
235 if (uSetFlag == asfAllowTrustLineClawback)
236 {
237 if (uFlagsIn & lsfNoFreeze)
238 {
239 JLOG(ctx.j.trace()) << "Can't set Clawback if NoFreeze is set";
240 return tecNO_PERMISSION;
241 }
242
243 if (!dirIsEmpty(ctx.view, keylet::ownerDir(id)))
244 {
245 JLOG(ctx.j.trace()) << "Owner directory not empty.";
246 return tecOWNERS;
247 }
248 }
249 else if (uSetFlag == asfNoFreeze)
250 {
251 // Cannot set NoFreeze if clawback is enabled
252 if (uFlagsIn & lsfAllowTrustLineClawback)
253 {
254 JLOG(ctx.j.trace()) << "Can't set NoFreeze if clawback is enabled";
255 return tecNO_PERMISSION;
256 }
257 }
258 }
259
260 return tesSUCCESS;
261}
262
263TER
265{
266 auto const sle = view().peek(keylet::account(account_));
267 if (!sle)
268 return tefINTERNAL; // LCOV_EXCL_LINE
269
270 std::uint32_t const uFlagsIn = sle->getFieldU32(sfFlags);
271 std::uint32_t uFlagsOut = uFlagsIn;
272
273 STTx const& tx{ctx_.tx};
274 std::uint32_t const uSetFlag{tx.getFieldU32(sfSetFlag)};
275 std::uint32_t const uClearFlag{tx.getFieldU32(sfClearFlag)};
276
277 // legacy AccountSet flags
278 std::uint32_t const uTxFlags{tx.getFlags()};
279 bool const bSetRequireDest{(uTxFlags & tfRequireDestTag) || (uSetFlag == asfRequireDest)};
280 bool const bClearRequireDest{(uTxFlags & tfOptionalDestTag) || (uClearFlag == asfRequireDest)};
281 bool const bSetRequireAuth{(uTxFlags & tfRequireAuth) || (uSetFlag == asfRequireAuth)};
282 bool const bClearRequireAuth{(uTxFlags & tfOptionalAuth) || (uClearFlag == asfRequireAuth)};
283 bool const bSetDisallowXRP{(uTxFlags & tfDisallowXRP) || (uSetFlag == asfDisallowXRP)};
284 bool const bClearDisallowXRP{(uTxFlags & tfAllowXRP) || (uClearFlag == asfDisallowXRP)};
285
286 bool const sigWithMaster{[&tx, &acct = account_]() {
287 auto const spk = tx.getSigningPubKey();
288
289 if (publicKeyType(makeSlice(spk)))
290 {
291 PublicKey const signingPubKey(makeSlice(spk));
292
293 if (calcAccountID(signingPubKey) == acct)
294 return true;
295 }
296 return false;
297 }()};
298
299 //
300 // RequireAuth
301 //
302 if (bSetRequireAuth && !(uFlagsIn & lsfRequireAuth))
303 {
304 JLOG(j_.trace()) << "Set RequireAuth.";
305 uFlagsOut |= lsfRequireAuth;
306 }
307
308 if (bClearRequireAuth && (uFlagsIn & lsfRequireAuth))
309 {
310 JLOG(j_.trace()) << "Clear RequireAuth.";
311 uFlagsOut &= ~lsfRequireAuth;
312 }
313
314 //
315 // RequireDestTag
316 //
317 if (bSetRequireDest && !(uFlagsIn & lsfRequireDestTag))
318 {
319 JLOG(j_.trace()) << "Set lsfRequireDestTag.";
320 uFlagsOut |= lsfRequireDestTag;
321 }
322
323 if (bClearRequireDest && (uFlagsIn & lsfRequireDestTag))
324 {
325 JLOG(j_.trace()) << "Clear lsfRequireDestTag.";
326 uFlagsOut &= ~lsfRequireDestTag;
327 }
328
329 //
330 // DisallowXRP
331 //
332 if (bSetDisallowXRP && !(uFlagsIn & lsfDisallowXRP))
333 {
334 JLOG(j_.trace()) << "Set lsfDisallowXRP.";
335 uFlagsOut |= lsfDisallowXRP;
336 }
337
338 if (bClearDisallowXRP && (uFlagsIn & lsfDisallowXRP))
339 {
340 JLOG(j_.trace()) << "Clear lsfDisallowXRP.";
341 uFlagsOut &= ~lsfDisallowXRP;
342 }
343
344 //
345 // DisableMaster
346 //
347 if ((uSetFlag == asfDisableMaster) && !(uFlagsIn & lsfDisableMaster))
348 {
349 if (!sigWithMaster)
350 {
351 JLOG(j_.trace()) << "Must use master key to disable master key.";
352 return tecNEED_MASTER_KEY;
353 }
354
355 if ((!sle->isFieldPresent(sfRegularKey)) && (!view().peek(keylet::signers(account_))))
356 {
357 // Account has no regular key or multi-signer signer list.
359 }
360
361 JLOG(j_.trace()) << "Set lsfDisableMaster.";
362 uFlagsOut |= lsfDisableMaster;
363 }
364
365 if ((uClearFlag == asfDisableMaster) && (uFlagsIn & lsfDisableMaster))
366 {
367 JLOG(j_.trace()) << "Clear lsfDisableMaster.";
368 uFlagsOut &= ~lsfDisableMaster;
369 }
370
371 //
372 // DefaultRipple
373 //
374 if (uSetFlag == asfDefaultRipple)
375 {
376 JLOG(j_.trace()) << "Set lsfDefaultRipple.";
377 uFlagsOut |= lsfDefaultRipple;
378 }
379 else if (uClearFlag == asfDefaultRipple)
380 {
381 JLOG(j_.trace()) << "Clear lsfDefaultRipple.";
382 uFlagsOut &= ~lsfDefaultRipple;
383 }
384
385 //
386 // NoFreeze
387 //
388 if (uSetFlag == asfNoFreeze)
389 {
390 if (!sigWithMaster && !(uFlagsIn & lsfDisableMaster))
391 {
392 JLOG(j_.trace()) << "Must use master key to set NoFreeze.";
393 return tecNEED_MASTER_KEY;
394 }
395
396 JLOG(j_.trace()) << "Set NoFreeze flag";
397 uFlagsOut |= lsfNoFreeze;
398 }
399
400 // Anyone may set global freeze
401 if (uSetFlag == asfGlobalFreeze)
402 {
403 JLOG(j_.trace()) << "Set GlobalFreeze flag";
404 uFlagsOut |= lsfGlobalFreeze;
405 }
406
407 // If you have set NoFreeze, you may not clear GlobalFreeze
408 // This prevents those who have set NoFreeze from using
409 // GlobalFreeze strategically.
410 if ((uSetFlag != asfGlobalFreeze) && (uClearFlag == asfGlobalFreeze) && ((uFlagsOut & lsfNoFreeze) == 0))
411 {
412 JLOG(j_.trace()) << "Clear GlobalFreeze flag";
413 uFlagsOut &= ~lsfGlobalFreeze;
414 }
415
416 //
417 // Track transaction IDs signed by this account in its root
418 //
419 if ((uSetFlag == asfAccountTxnID) && !sle->isFieldPresent(sfAccountTxnID))
420 {
421 JLOG(j_.trace()) << "Set AccountTxnID.";
422 sle->makeFieldPresent(sfAccountTxnID);
423 }
424
425 if ((uClearFlag == asfAccountTxnID) && sle->isFieldPresent(sfAccountTxnID))
426 {
427 JLOG(j_.trace()) << "Clear AccountTxnID.";
428 sle->makeFieldAbsent(sfAccountTxnID);
429 }
430
431 //
432 // DepositAuth
433 //
434 if (uSetFlag == asfDepositAuth)
435 {
436 JLOG(j_.trace()) << "Set lsfDepositAuth.";
437 uFlagsOut |= lsfDepositAuth;
438 }
439 else if (uClearFlag == asfDepositAuth)
440 {
441 JLOG(j_.trace()) << "Clear lsfDepositAuth.";
442 uFlagsOut &= ~lsfDepositAuth;
443 }
444
445 //
446 // EmailHash
447 //
448 if (tx.isFieldPresent(sfEmailHash))
449 {
450 uint128 const uHash = tx.getFieldH128(sfEmailHash);
451
452 if (!uHash)
453 {
454 JLOG(j_.trace()) << "unset email hash";
455 sle->makeFieldAbsent(sfEmailHash);
456 }
457 else
458 {
459 JLOG(j_.trace()) << "set email hash";
460 sle->setFieldH128(sfEmailHash, uHash);
461 }
462 }
463
464 //
465 // WalletLocator
466 //
467 if (tx.isFieldPresent(sfWalletLocator))
468 {
469 uint256 const uHash = tx.getFieldH256(sfWalletLocator);
470
471 if (!uHash)
472 {
473 JLOG(j_.trace()) << "unset wallet locator";
474 sle->makeFieldAbsent(sfWalletLocator);
475 }
476 else
477 {
478 JLOG(j_.trace()) << "set wallet locator";
479 sle->setFieldH256(sfWalletLocator, uHash);
480 }
481 }
482
483 //
484 // MessageKey
485 //
486 if (tx.isFieldPresent(sfMessageKey))
487 {
488 Blob const messageKey = tx.getFieldVL(sfMessageKey);
489
490 if (messageKey.empty())
491 {
492 JLOG(j_.debug()) << "set message key";
493 sle->makeFieldAbsent(sfMessageKey);
494 }
495 else
496 {
497 JLOG(j_.debug()) << "set message key";
498 sle->setFieldVL(sfMessageKey, messageKey);
499 }
500 }
501
502 //
503 // Domain
504 //
505 if (tx.isFieldPresent(sfDomain))
506 {
507 Blob const domain = tx.getFieldVL(sfDomain);
508
509 if (domain.empty())
510 {
511 JLOG(j_.trace()) << "unset domain";
512 sle->makeFieldAbsent(sfDomain);
513 }
514 else
515 {
516 JLOG(j_.trace()) << "set domain";
517 sle->setFieldVL(sfDomain, domain);
518 }
519 }
520
521 //
522 // TransferRate
523 //
524 if (tx.isFieldPresent(sfTransferRate))
525 {
526 std::uint32_t uRate = tx.getFieldU32(sfTransferRate);
527
528 if (uRate == 0 || uRate == QUALITY_ONE)
529 {
530 JLOG(j_.trace()) << "unset transfer rate";
531 sle->makeFieldAbsent(sfTransferRate);
532 }
533 else
534 {
535 JLOG(j_.trace()) << "set transfer rate";
536 sle->setFieldU32(sfTransferRate, uRate);
537 }
538 }
539
540 //
541 // TickSize
542 //
543 if (tx.isFieldPresent(sfTickSize))
544 {
545 auto uTickSize = tx[sfTickSize];
546 if ((uTickSize == 0) || (uTickSize == Quality::maxTickSize))
547 {
548 JLOG(j_.trace()) << "unset tick size";
549 sle->makeFieldAbsent(sfTickSize);
550 }
551 else
552 {
553 JLOG(j_.trace()) << "set tick size";
554 sle->setFieldU8(sfTickSize, uTickSize);
555 }
556 }
557
558 // Configure authorized minting account:
559 if (uSetFlag == asfAuthorizedNFTokenMinter)
560 sle->setAccountID(sfNFTokenMinter, ctx_.tx[sfNFTokenMinter]);
561
562 if (uClearFlag == asfAuthorizedNFTokenMinter && sle->isFieldPresent(sfNFTokenMinter))
563 sle->makeFieldAbsent(sfNFTokenMinter);
564
565 if (uSetFlag == asfDisallowIncomingNFTokenOffer)
567 else if (uClearFlag == asfDisallowIncomingNFTokenOffer)
568 uFlagsOut &= ~lsfDisallowIncomingNFTokenOffer;
569
570 if (uSetFlag == asfDisallowIncomingCheck)
571 uFlagsOut |= lsfDisallowIncomingCheck;
572 else if (uClearFlag == asfDisallowIncomingCheck)
573 uFlagsOut &= ~lsfDisallowIncomingCheck;
574
575 if (uSetFlag == asfDisallowIncomingPayChan)
576 uFlagsOut |= lsfDisallowIncomingPayChan;
577 else if (uClearFlag == asfDisallowIncomingPayChan)
578 uFlagsOut &= ~lsfDisallowIncomingPayChan;
579
580 if (uSetFlag == asfDisallowIncomingTrustline)
581 uFlagsOut |= lsfDisallowIncomingTrustline;
582 else if (uClearFlag == asfDisallowIncomingTrustline)
583 uFlagsOut &= ~lsfDisallowIncomingTrustline;
584
585 // Set or clear flags for disallowing escrow
586 if (ctx_.view().rules().enabled(featureTokenEscrow))
587 {
588 if (uSetFlag == asfAllowTrustLineLocking)
589 uFlagsOut |= lsfAllowTrustLineLocking;
590 else if (uClearFlag == asfAllowTrustLineLocking)
591 uFlagsOut &= ~lsfAllowTrustLineLocking;
592 }
593
594 // Set flag for clawback
595 if (ctx_.view().rules().enabled(featureClawback) && uSetFlag == asfAllowTrustLineClawback)
596 {
597 JLOG(j_.trace()) << "set allow clawback";
598 uFlagsOut |= lsfAllowTrustLineClawback;
599 }
600
601 if (uFlagsIn != uFlagsOut)
602 sle->setFieldU32(sfFlags, uFlagsOut);
603
604 ctx_.view().update(sle);
605
606 return tesSUCCESS;
607}
608
609} // namespace xrpl
Stream debug() const
Definition Journal.h:300
Stream trace() const
Severity stream access functions.
Definition Journal.h:294
STTx const & tx
ApplyView & view()
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.
A public key.
Definition PublicKey.h:42
A view into a ledger.
Definition ReadView.h:31
virtual Rules const & rules() const =0
Returns the tx processing rules.
virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0
Return the state item associated with a key.
bool enabled(uint256 const &feature) const
Returns true if a feature is enabled.
Definition Rules.cpp:118
std::uint32_t getFieldU32(SField const &field) const
Definition STObject.cpp:576
bool isFieldPresent(SField const &field) const
Definition STObject.cpp:439
std::uint32_t getFlags() const
Definition STObject.cpp:492
static NotTEC checkPermission(ReadView const &view, STTx const &tx)
TER doApply() override
static TxConsequences makeTxConsequences(PreflightContext const &ctx)
static std::uint32_t getFlagsMask(PreflightContext const &ctx)
static TER preclaim(PreclaimContext const &ctx)
static NotTEC preflight(PreflightContext const &ctx)
AccountID const account_
Definition Transactor.h:112
beast::Journal const j_
Definition Transactor.h:110
ApplyView & view()
Definition Transactor.h:128
ApplyContext & ctx_
Definition Transactor.h:108
Class describing the consequences to the account of applying a transaction if the transaction consume...
Definition applySteps.h:37
@ normal
Moves currency around, creates offers, etc.
Definition applySteps.h:43
@ blocker
Affects the ability of subsequent transactions to claim a fee.
Definition applySteps.h:46
Integers of any length that is a multiple of 32-bits.
Definition base_uint.h:66
T contains(T... args)
T empty(T... args)
Keylet signers(AccountID const &account) noexcept
A SignerList.
Definition Indexes.cpp:287
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Definition Indexes.cpp:325
Keylet delegate(AccountID const &account, AccountID const &authorizedAccount) noexcept
A keylet for Delegate object.
Definition Indexes.cpp:406
Keylet account(AccountID const &id) noexcept
AccountID root.
Definition Indexes.cpp:160
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
constexpr std::uint32_t asfAllowTrustLineClawback
Definition TxFlags.h:74
@ telBAD_DOMAIN
Definition TER.h:33
@ telBAD_PUBLIC_KEY
Definition TER.h:35
@ terOWNERS
Definition TER.h:200
@ terNO_DELEGATE_PERMISSION
Definition TER.h:210
@ terNO_ACCOUNT
Definition TER.h:197
constexpr std::uint32_t asfGlobalFreeze
Definition TxFlags.h:63
constexpr std::uint32_t asfRequireDest
Definition TxFlags.h:57
constexpr std::uint32_t asfDisableMaster
Definition TxFlags.h:60
bool dirIsEmpty(ReadView const &view, Keylet const &k)
Returns true if the directory is empty.
Definition View.cpp:825
@ tefINTERNAL
Definition TER.h:153
constexpr std::uint32_t asfAccountTxnID
Definition TxFlags.h:61
constexpr std::uint32_t asfDisallowIncomingPayChan
Definition TxFlags.h:72
constexpr std::uint32_t tfOptionalAuth
Definition TxFlags.h:49
constexpr std::uint32_t asfDepositAuth
Definition TxFlags.h:65
constexpr std::uint32_t tfAccountSetMask
Definition TxFlags.h:52
std::optional< KeyType > publicKeyType(Slice const &slice)
Returns the type of public key.
constexpr std::uint32_t tfRequireAuth
Definition TxFlags.h:48
constexpr std::uint32_t asfDefaultRipple
Definition TxFlags.h:64
void loadGranularPermission(std::shared_ptr< SLE const > const &delegate, TxType const &type, std::unordered_set< GranularPermissionType > &granularPermissions)
Load the granular permissions granted to the delegate account for the specified transaction type.
constexpr std::uint32_t asfDisallowIncomingTrustline
Definition TxFlags.h:73
constexpr std::uint32_t tfAllowXRP
Definition TxFlags.h:51
constexpr std::uint32_t asfAuthorizedNFTokenMinter
Definition TxFlags.h:66
constexpr std::uint32_t tfRequireDestTag
Definition TxFlags.h:46
constexpr std::uint32_t tfOptionalDestTag
Definition TxFlags.h:47
AccountID calcAccountID(PublicKey const &pk)
std::size_t constexpr maxDomainLength
The maximum length of a domain.
Definition Protocol.h:214
@ tapRETRY
Definition ApplyView.h:19
constexpr std::uint32_t asfDisallowIncomingCheck
Definition TxFlags.h:71
constexpr std::uint32_t asfRequireAuth
Definition TxFlags.h:58
constexpr std::uint32_t asfNoFreeze
Definition TxFlags.h:62
@ temINVALID_FLAG
Definition TER.h:91
@ temMALFORMED
Definition TER.h:67
@ temBAD_TRANSFER_RATE
Definition TER.h:87
@ temBAD_TICK_SIZE
Definition TER.h:98
constexpr std::uint32_t asfDisallowXRP
Definition TxFlags.h:59
@ tecNEED_MASTER_KEY
Definition TER.h:289
@ tecNO_ALTERNATIVE_KEY
Definition TER.h:277
@ tecOWNERS
Definition TER.h:279
@ tecNO_PERMISSION
Definition TER.h:286
@ lsfDisallowIncomingNFTokenOffer
@ lsfAllowTrustLineClawback
@ lsfDepositAuth
@ lsfNoFreeze
@ lsfDisallowIncomingPayChan
@ lsfRequireAuth
@ lsfDisallowXRP
@ lsfDefaultRipple
@ lsfDisallowIncomingCheck
@ lsfRequireDestTag
@ lsfAllowTrustLineLocking
@ lsfGlobalFreeze
@ lsfDisableMaster
@ lsfDisallowIncomingTrustline
std::enable_if_t< std::is_same< T, char >::value||std::is_same< T, unsigned char >::value, Slice > makeSlice(std::array< T, N > const &a)
Definition Slice.h:213
constexpr std::uint32_t asfDisallowIncomingNFTokenOffer
Definition TxFlags.h:70
constexpr std::uint32_t tfDisallowXRP
Definition TxFlags.h:50
constexpr std::uint32_t asfAllowTrustLineLocking
Definition TxFlags.h:75
@ tesSUCCESS
Definition TER.h:225
constexpr std::uint32_t tfUniversalMask
Definition TxFlags.h:43
State information when determining if a tx is likely to claim a fee.
Definition Transactor.h:53
ReadView const & view
Definition Transactor.h:56
beast::Journal const j
Definition Transactor.h:61
State information when preflighting a tx.
Definition Transactor.h:15
beast::Journal const j
Definition Transactor.h:22