rippled
Loading...
Searching...
No Matches
SetAccount.cpp
1//------------------------------------------------------------------------------
2/*
3 This file is part of rippled: https://github.com/ripple/rippled
4 Copyright (c) 2012, 2013 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 <xrpld/app/tx/detail/SetAccount.h>
21#include <xrpld/core/Config.h>
22#include <xrpld/ledger/View.h>
23
24#include <xrpl/basics/Log.h>
25#include <xrpl/protocol/Feature.h>
26#include <xrpl/protocol/Indexes.h>
27#include <xrpl/protocol/PublicKey.h>
28#include <xrpl/protocol/Quality.h>
29#include <xrpl/protocol/st.h>
30
31namespace ripple {
32
33TxConsequences
35{
36 // The SetAccount may be a blocker, but only if it sets or clears
37 // specific account flags.
38 auto getTxConsequencesCategory = [](STTx const& tx) {
39 if (std::uint32_t const uTxFlags = tx.getFlags();
40 uTxFlags & (tfRequireAuth | tfOptionalAuth))
42
43 if (auto const uSetFlag = tx[~sfSetFlag]; uSetFlag &&
44 (*uSetFlag == asfRequireAuth || *uSetFlag == asfDisableMaster ||
45 *uSetFlag == asfAccountTxnID))
47
48 if (auto const uClearFlag = tx[~sfClearFlag]; uClearFlag &&
49 (*uClearFlag == asfRequireAuth || *uClearFlag == asfDisableMaster ||
50 *uClearFlag == asfAccountTxnID))
52
54 };
55
56 return TxConsequences{ctx.tx, getTxConsequencesCategory(ctx.tx)};
57}
58
61{
62 if (auto const ret = preflight1(ctx); !isTesSuccess(ret))
63 return ret;
64
65 auto& tx = ctx.tx;
66 auto& j = ctx.j;
67
68 std::uint32_t const uTxFlags = tx.getFlags();
69
70 if (uTxFlags & tfAccountSetMask)
71 {
72 JLOG(j.trace()) << "Malformed transaction: Invalid flags set.";
73 return temINVALID_FLAG;
74 }
75
76 std::uint32_t const uSetFlag = tx.getFieldU32(sfSetFlag);
77 std::uint32_t const uClearFlag = tx.getFieldU32(sfClearFlag);
78
79 if ((uSetFlag != 0) && (uSetFlag == uClearFlag))
80 {
81 JLOG(j.trace()) << "Malformed transaction: Set and clear same flag.";
82 return temINVALID_FLAG;
83 }
84
85 //
86 // RequireAuth
87 //
88 bool bSetRequireAuth =
89 (uTxFlags & tfRequireAuth) || (uSetFlag == asfRequireAuth);
90 bool bClearRequireAuth =
91 (uTxFlags & tfOptionalAuth) || (uClearFlag == asfRequireAuth);
92
93 if (bSetRequireAuth && bClearRequireAuth)
94 {
95 JLOG(j.trace()) << "Malformed transaction: Contradictory flags set.";
96 return temINVALID_FLAG;
97 }
98
99 //
100 // RequireDestTag
101 //
102 bool bSetRequireDest =
103 (uTxFlags & tfRequireDestTag) || (uSetFlag == asfRequireDest);
104 bool bClearRequireDest =
105 (uTxFlags & tfOptionalDestTag) || (uClearFlag == asfRequireDest);
106
107 if (bSetRequireDest && bClearRequireDest)
108 {
109 JLOG(j.trace()) << "Malformed transaction: Contradictory flags set.";
110 return temINVALID_FLAG;
111 }
112
113 //
114 // DisallowXRP
115 //
116 bool bSetDisallowXRP =
117 (uTxFlags & tfDisallowXRP) || (uSetFlag == asfDisallowXRP);
118 bool bClearDisallowXRP =
119 (uTxFlags & tfAllowXRP) || (uClearFlag == asfDisallowXRP);
120
121 if (bSetDisallowXRP && bClearDisallowXRP)
122 {
123 JLOG(j.trace()) << "Malformed transaction: Contradictory flags set.";
124 return temINVALID_FLAG;
125 }
126
127 // TransferRate
128 if (tx.isFieldPresent(sfTransferRate))
129 {
130 std::uint32_t uRate = tx.getFieldU32(sfTransferRate);
131
132 if (uRate && (uRate < QUALITY_ONE))
133 {
134 JLOG(j.trace())
135 << "Malformed transaction: Transfer rate too small.";
137 }
138
139 if (uRate > 2 * QUALITY_ONE)
140 {
141 JLOG(j.trace())
142 << "Malformed transaction: Transfer rate too large.";
144 }
145 }
146
147 // TickSize
148 if (tx.isFieldPresent(sfTickSize))
149 {
150 auto uTickSize = tx[sfTickSize];
151 if (uTickSize &&
152 ((uTickSize < Quality::minTickSize) ||
153 (uTickSize > Quality::maxTickSize)))
154 {
155 JLOG(j.trace()) << "Malformed transaction: Bad tick size.";
156 return temBAD_TICK_SIZE;
157 }
158 }
159
160 if (auto const mk = tx[~sfMessageKey])
161 {
162 if (mk->size() && !publicKeyType({mk->data(), mk->size()}))
163 {
164 JLOG(j.trace()) << "Invalid message key specified.";
165 return telBAD_PUBLIC_KEY;
166 }
167 }
168
169 if (auto const domain = tx[~sfDomain];
170 domain && domain->size() > maxDomainLength)
171 {
172 JLOG(j.trace()) << "domain too long";
173 return telBAD_DOMAIN;
174 }
175
176 if (ctx.rules.enabled(featureNonFungibleTokensV1))
177 {
178 // Configure authorized minting account:
179 if (uSetFlag == asfAuthorizedNFTokenMinter &&
180 !tx.isFieldPresent(sfNFTokenMinter))
181 return temMALFORMED;
182
183 if (uClearFlag == asfAuthorizedNFTokenMinter &&
184 tx.isFieldPresent(sfNFTokenMinter))
185 return temMALFORMED;
186 }
187
188 return preflight2(ctx);
189}
190
191TER
193{
194 auto const id = ctx.tx[sfAccount];
195
196 std::uint32_t const uTxFlags = ctx.tx.getFlags();
197
198 auto const sle = ctx.view.read(keylet::account(id));
199 if (!sle)
200 return terNO_ACCOUNT;
201
202 std::uint32_t const uFlagsIn = sle->getFieldU32(sfFlags);
203
204 std::uint32_t const uSetFlag = ctx.tx.getFieldU32(sfSetFlag);
205
206 // legacy AccountSet flags
207 bool bSetRequireAuth =
208 (uTxFlags & tfRequireAuth) || (uSetFlag == asfRequireAuth);
209
210 //
211 // RequireAuth
212 //
213 if (bSetRequireAuth && !(uFlagsIn & lsfRequireAuth))
214 {
215 if (!dirIsEmpty(ctx.view, keylet::ownerDir(id)))
216 {
217 JLOG(ctx.j.trace()) << "Retry: Owner directory not empty.";
218 return (ctx.flags & tapRETRY) ? TER{terOWNERS} : TER{tecOWNERS};
219 }
220 }
221
222 //
223 // Clawback
224 //
225 if (ctx.view.rules().enabled(featureClawback))
226 {
227 if (uSetFlag == asfAllowTrustLineClawback)
228 {
229 if (uFlagsIn & lsfNoFreeze)
230 {
231 JLOG(ctx.j.trace()) << "Can't set Clawback if NoFreeze is set";
232 return tecNO_PERMISSION;
233 }
234
235 if (!dirIsEmpty(ctx.view, keylet::ownerDir(id)))
236 {
237 JLOG(ctx.j.trace()) << "Owner directory not empty.";
238 return tecOWNERS;
239 }
240 }
241 else if (uSetFlag == asfNoFreeze)
242 {
243 // Cannot set NoFreeze if clawback is enabled
244 if (uFlagsIn & lsfAllowTrustLineClawback)
245 {
246 JLOG(ctx.j.trace())
247 << "Can't set NoFreeze if clawback is enabled";
248 return tecNO_PERMISSION;
249 }
250 }
251 }
252
253 return tesSUCCESS;
254}
255
256TER
258{
259 auto const sle = view().peek(keylet::account(account_));
260 if (!sle)
261 return tefINTERNAL;
262
263 std::uint32_t const uFlagsIn = sle->getFieldU32(sfFlags);
264 std::uint32_t uFlagsOut = uFlagsIn;
265
266 STTx const& tx{ctx_.tx};
267 std::uint32_t const uSetFlag{tx.getFieldU32(sfSetFlag)};
268 std::uint32_t const uClearFlag{tx.getFieldU32(sfClearFlag)};
269
270 // legacy AccountSet flags
271 std::uint32_t const uTxFlags{tx.getFlags()};
272 bool const bSetRequireDest{
273 (uTxFlags & tfRequireDestTag) || (uSetFlag == asfRequireDest)};
274 bool const bClearRequireDest{
275 (uTxFlags & tfOptionalDestTag) || (uClearFlag == asfRequireDest)};
276 bool const bSetRequireAuth{
277 (uTxFlags & tfRequireAuth) || (uSetFlag == asfRequireAuth)};
278 bool const bClearRequireAuth{
279 (uTxFlags & tfOptionalAuth) || (uClearFlag == asfRequireAuth)};
280 bool const bSetDisallowXRP{
281 (uTxFlags & tfDisallowXRP) || (uSetFlag == asfDisallowXRP)};
282 bool const bClearDisallowXRP{
283 (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)) &&
355 (!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) &&
411 ((uFlagsOut & lsfNoFreeze) == 0))
412 {
413 JLOG(j_.trace()) << "Clear GlobalFreeze flag";
414 uFlagsOut &= ~lsfGlobalFreeze;
415 }
416
417 //
418 // Track transaction IDs signed by this account in its root
419 //
420 if ((uSetFlag == asfAccountTxnID) && !sle->isFieldPresent(sfAccountTxnID))
421 {
422 JLOG(j_.trace()) << "Set AccountTxnID.";
423 sle->makeFieldPresent(sfAccountTxnID);
424 }
425
426 if ((uClearFlag == asfAccountTxnID) && sle->isFieldPresent(sfAccountTxnID))
427 {
428 JLOG(j_.trace()) << "Clear AccountTxnID.";
429 sle->makeFieldAbsent(sfAccountTxnID);
430 }
431
432 //
433 // DepositAuth
434 //
435 if (view().rules().enabled(featureDepositAuth))
436 {
437 if (uSetFlag == asfDepositAuth)
438 {
439 JLOG(j_.trace()) << "Set lsfDepositAuth.";
440 uFlagsOut |= lsfDepositAuth;
441 }
442 else if (uClearFlag == asfDepositAuth)
443 {
444 JLOG(j_.trace()) << "Clear lsfDepositAuth.";
445 uFlagsOut &= ~lsfDepositAuth;
446 }
447 }
448
449 //
450 // EmailHash
451 //
452 if (tx.isFieldPresent(sfEmailHash))
453 {
454 uint128 const uHash = tx.getFieldH128(sfEmailHash);
455
456 if (!uHash)
457 {
458 JLOG(j_.trace()) << "unset email hash";
459 sle->makeFieldAbsent(sfEmailHash);
460 }
461 else
462 {
463 JLOG(j_.trace()) << "set email hash";
464 sle->setFieldH128(sfEmailHash, uHash);
465 }
466 }
467
468 //
469 // WalletLocator
470 //
471 if (tx.isFieldPresent(sfWalletLocator))
472 {
473 uint256 const uHash = tx.getFieldH256(sfWalletLocator);
474
475 if (!uHash)
476 {
477 JLOG(j_.trace()) << "unset wallet locator";
478 sle->makeFieldAbsent(sfWalletLocator);
479 }
480 else
481 {
482 JLOG(j_.trace()) << "set wallet locator";
483 sle->setFieldH256(sfWalletLocator, uHash);
484 }
485 }
486
487 //
488 // MessageKey
489 //
490 if (tx.isFieldPresent(sfMessageKey))
491 {
492 Blob const messageKey = tx.getFieldVL(sfMessageKey);
493
494 if (messageKey.empty())
495 {
496 JLOG(j_.debug()) << "set message key";
497 sle->makeFieldAbsent(sfMessageKey);
498 }
499 else
500 {
501 JLOG(j_.debug()) << "set message key";
502 sle->setFieldVL(sfMessageKey, messageKey);
503 }
504 }
505
506 //
507 // Domain
508 //
509 if (tx.isFieldPresent(sfDomain))
510 {
511 Blob const domain = tx.getFieldVL(sfDomain);
512
513 if (domain.empty())
514 {
515 JLOG(j_.trace()) << "unset domain";
516 sle->makeFieldAbsent(sfDomain);
517 }
518 else
519 {
520 JLOG(j_.trace()) << "set domain";
521 sle->setFieldVL(sfDomain, domain);
522 }
523 }
524
525 //
526 // TransferRate
527 //
528 if (tx.isFieldPresent(sfTransferRate))
529 {
530 std::uint32_t uRate = tx.getFieldU32(sfTransferRate);
531
532 if (uRate == 0 || uRate == QUALITY_ONE)
533 {
534 JLOG(j_.trace()) << "unset transfer rate";
535 sle->makeFieldAbsent(sfTransferRate);
536 }
537 else
538 {
539 JLOG(j_.trace()) << "set transfer rate";
540 sle->setFieldU32(sfTransferRate, uRate);
541 }
542 }
543
544 //
545 // TickSize
546 //
547 if (tx.isFieldPresent(sfTickSize))
548 {
549 auto uTickSize = tx[sfTickSize];
550 if ((uTickSize == 0) || (uTickSize == Quality::maxTickSize))
551 {
552 JLOG(j_.trace()) << "unset tick size";
553 sle->makeFieldAbsent(sfTickSize);
554 }
555 else
556 {
557 JLOG(j_.trace()) << "set tick size";
558 sle->setFieldU8(sfTickSize, uTickSize);
559 }
560 }
561
562 // Configure authorized minting account:
563 if (ctx_.view().rules().enabled(featureNonFungibleTokensV1))
564 {
565 if (uSetFlag == asfAuthorizedNFTokenMinter)
566 sle->setAccountID(sfNFTokenMinter, ctx_.tx[sfNFTokenMinter]);
567
568 if (uClearFlag == asfAuthorizedNFTokenMinter &&
569 sle->isFieldPresent(sfNFTokenMinter))
570 sle->makeFieldAbsent(sfNFTokenMinter);
571 }
572
573 // Set or clear flags for disallowing various incoming instruments
574 if (ctx_.view().rules().enabled(featureDisallowIncoming))
575 {
576 if (uSetFlag == asfDisallowIncomingNFTokenOffer)
578 else if (uClearFlag == asfDisallowIncomingNFTokenOffer)
579 uFlagsOut &= ~lsfDisallowIncomingNFTokenOffer;
580
581 if (uSetFlag == asfDisallowIncomingCheck)
582 uFlagsOut |= lsfDisallowIncomingCheck;
583 else if (uClearFlag == asfDisallowIncomingCheck)
584 uFlagsOut &= ~lsfDisallowIncomingCheck;
585
586 if (uSetFlag == asfDisallowIncomingPayChan)
587 uFlagsOut |= lsfDisallowIncomingPayChan;
588 else if (uClearFlag == asfDisallowIncomingPayChan)
589 uFlagsOut &= ~lsfDisallowIncomingPayChan;
590
591 if (uSetFlag == asfDisallowIncomingTrustline)
592 uFlagsOut |= lsfDisallowIncomingTrustline;
593 else if (uClearFlag == asfDisallowIncomingTrustline)
594 uFlagsOut &= ~lsfDisallowIncomingTrustline;
595 }
596
597 // Set flag for clawback
598 if (ctx_.view().rules().enabled(featureClawback) &&
599 uSetFlag == asfAllowTrustLineClawback)
600 {
601 JLOG(j_.trace()) << "set allow clawback";
602 uFlagsOut |= lsfAllowTrustLineClawback;
603 }
604
605 if (uFlagsIn != uFlagsOut)
606 sle->setFieldU32(sfFlags, uFlagsOut);
607
608 ctx_.view().update(sle);
609
610 return tesSUCCESS;
611}
612
613} // namespace ripple
Stream debug() const
Definition: Journal.h:328
Stream trace() const
Severity stream access functions.
Definition: Journal.h:322
ApplyView & view()
Definition: ApplyContext.h:55
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:62
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:130
std::uint32_t getFieldU32(SField const &field) const
Definition: STObject.cpp:615
std::uint32_t getFlags() const
Definition: STObject.cpp:537
static TER preclaim(PreclaimContext const &ctx)
Definition: SetAccount.cpp:192
static TxConsequences makeTxConsequences(PreflightContext const &ctx)
Definition: SetAccount.cpp:34
static NotTEC preflight(PreflightContext const &ctx)
Definition: SetAccount.cpp:60
TER doApply() override
Definition: SetAccount.cpp:257
AccountID const account_
Definition: Transactor.h:92
ApplyView & view()
Definition: Transactor.h:108
beast::Journal const j_
Definition: Transactor.h:90
ApplyContext & ctx_
Definition: Transactor.h:89
Class describing the consequences to the account of applying a transaction if the transaction consume...
Definition: applySteps.h:59
@ normal
Moves currency around, creates offers, etc.
Definition: applySteps.h:65
@ blocker
Affects the ability of subsequent transactions to claim a fee.
Definition: applySteps.h:68
Integers of any length that is a multiple of 32-bits.
Definition: base_uint.h:86
T empty(T... args)
Keylet account(AccountID const &id) noexcept
AccountID root.
Definition: Indexes.cpp:175
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Definition: Indexes.cpp:365
Keylet signers(AccountID const &account) noexcept
A SignerList.
Definition: Indexes.cpp:321
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: algorithm.h:26
constexpr std::uint32_t tfAllowXRP
Definition: TxFlags.h:70
constexpr std::uint32_t asfGlobalFreeze
Definition: TxFlags.h:82
constexpr std::uint32_t asfDepositAuth
Definition: TxFlags.h:84
constexpr std::uint32_t asfDisallowIncomingNFTokenOffer
Definition: TxFlags.h:89
@ telBAD_PUBLIC_KEY
Definition: TER.h:55
@ telBAD_DOMAIN
Definition: TER.h:53
constexpr std::uint32_t asfRequireDest
Definition: TxFlags.h:76
constexpr std::uint32_t asfAuthorizedNFTokenMinter
Definition: TxFlags.h:85
constexpr std::uint32_t tfOptionalDestTag
Definition: TxFlags.h:66
@ lsfRequireDestTag
@ lsfDefaultRipple
@ lsfRequireAuth
@ lsfDisallowIncomingCheck
@ lsfAllowTrustLineClawback
@ lsfDisableMaster
@ lsfDepositAuth
@ lsfDisallowIncomingPayChan
@ lsfDisallowIncomingTrustline
@ lsfDisallowIncomingNFTokenOffer
@ lsfGlobalFreeze
@ lsfDisallowXRP
constexpr std::uint32_t tfAccountSetMask
Definition: TxFlags.h:71
constexpr std::uint32_t tfRequireDestTag
Definition: TxFlags.h:65
bool isTesSuccess(TER x)
Definition: TER.h:656
constexpr std::uint32_t asfNoFreeze
Definition: TxFlags.h:81
NotTEC preflight1(PreflightContext const &ctx)
Performs early sanity checks on the account and fee fields.
Definition: Transactor.cpp:82
AccountID calcAccountID(PublicKey const &pk)
Definition: AccountID.cpp:168
std::size_t constexpr maxDomainLength
The maximum length of a domain.
Definition: Protocol.h:98
constexpr std::uint32_t asfDisableMaster
Definition: TxFlags.h:79
constexpr std::uint32_t asfDisallowIncomingTrustline
Definition: TxFlags.h:92
@ tefINTERNAL
Definition: TER.h:173
std::optional< KeyType > publicKeyType(Slice const &slice)
Returns the type of public key.
Definition: PublicKey.cpp:223
NotTEC preflight2(PreflightContext const &ctx)
Checks whether the signature appears valid.
Definition: Transactor.cpp:134
constexpr std::uint32_t asfAccountTxnID
Definition: TxFlags.h:80
constexpr std::uint32_t asfDefaultRipple
Definition: TxFlags.h:83
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:244
constexpr std::uint32_t asfDisallowIncomingCheck
Definition: TxFlags.h:90
constexpr std::uint32_t tfRequireAuth
Definition: TxFlags.h:67
@ tecNEED_MASTER_KEY
Definition: TER.h:295
@ tecOWNERS
Definition: TER.h:285
@ tecNO_PERMISSION
Definition: TER.h:292
@ tecNO_ALTERNATIVE_KEY
Definition: TER.h:283
@ tesSUCCESS
Definition: TER.h:242
constexpr std::uint32_t tfOptionalAuth
Definition: TxFlags.h:68
constexpr std::uint32_t tfDisallowXRP
Definition: TxFlags.h:69
constexpr std::uint32_t asfDisallowIncomingPayChan
Definition: TxFlags.h:91
constexpr std::uint32_t asfAllowTrustLineClawback
Definition: TxFlags.h:93
@ tapRETRY
Definition: ApplyView.h:40
constexpr std::uint32_t asfRequireAuth
Definition: TxFlags.h:77
@ terOWNERS
Definition: TER.h:220
@ terNO_ACCOUNT
Definition: TER.h:217
bool dirIsEmpty(ReadView const &view, Keylet const &k)
Returns true if the directory is empty.
Definition: View.cpp:782
constexpr std::uint32_t asfDisallowXRP
Definition: TxFlags.h:78
@ temMALFORMED
Definition: TER.h:87
@ temINVALID_FLAG
Definition: TER.h:111
@ temBAD_TICK_SIZE
Definition: TER.h:118
@ temBAD_TRANSFER_RATE
Definition: TER.h:107
State information when determining if a tx is likely to claim a fee.
Definition: Transactor.h:54
ReadView const & view
Definition: Transactor.h:57
beast::Journal const j
Definition: Transactor.h:61
State information when preflighting a tx.
Definition: Transactor.h:33
beast::Journal const j
Definition: Transactor.h:39