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