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