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#include <xrpl/basics/Log.h>
24#include <xrpl/protocol/Feature.h>
25#include <xrpl/protocol/Indexes.h>
26#include <xrpl/protocol/PublicKey.h>
27#include <xrpl/protocol/Quality.h>
28#include <xrpl/protocol/st.h>
29
30namespace ripple {
31
32TxConsequences
34{
35 // The SetAccount may be a blocker, but only if it sets or clears
36 // specific account flags.
37 auto getTxConsequencesCategory = [](STTx const& tx) {
38 if (std::uint32_t const uTxFlags = tx.getFlags();
39 uTxFlags & (tfRequireAuth | tfOptionalAuth))
41
42 if (auto const uSetFlag = tx[~sfSetFlag]; uSetFlag &&
43 (*uSetFlag == asfRequireAuth || *uSetFlag == asfDisableMaster ||
44 *uSetFlag == asfAccountTxnID))
46
47 if (auto const uClearFlag = tx[~sfClearFlag]; uClearFlag &&
48 (*uClearFlag == asfRequireAuth || *uClearFlag == asfDisableMaster ||
49 *uClearFlag == asfAccountTxnID))
51
53 };
54
55 return TxConsequences{ctx.tx, getTxConsequencesCategory(ctx.tx)};
56}
57
60{
61 if (auto const ret = preflight1(ctx); !isTesSuccess(ret))
62 return ret;
63
64 auto& tx = ctx.tx;
65 auto& j = ctx.j;
66
67 std::uint32_t const uTxFlags = tx.getFlags();
68
69 if (uTxFlags & tfAccountSetMask)
70 {
71 JLOG(j.trace()) << "Malformed transaction: Invalid flags set.";
72 return temINVALID_FLAG;
73 }
74
75 std::uint32_t const uSetFlag = tx.getFieldU32(sfSetFlag);
76 std::uint32_t const uClearFlag = tx.getFieldU32(sfClearFlag);
77
78 if ((uSetFlag != 0) && (uSetFlag == uClearFlag))
79 {
80 JLOG(j.trace()) << "Malformed transaction: Set and clear same flag.";
81 return temINVALID_FLAG;
82 }
83
84 //
85 // RequireAuth
86 //
87 bool bSetRequireAuth =
88 (uTxFlags & tfRequireAuth) || (uSetFlag == asfRequireAuth);
89 bool bClearRequireAuth =
90 (uTxFlags & tfOptionalAuth) || (uClearFlag == asfRequireAuth);
91
92 if (bSetRequireAuth && bClearRequireAuth)
93 {
94 JLOG(j.trace()) << "Malformed transaction: Contradictory flags set.";
95 return temINVALID_FLAG;
96 }
97
98 //
99 // RequireDestTag
100 //
101 bool bSetRequireDest =
102 (uTxFlags & tfRequireDestTag) || (uSetFlag == asfRequireDest);
103 bool bClearRequireDest =
104 (uTxFlags & tfOptionalDestTag) || (uClearFlag == asfRequireDest);
105
106 if (bSetRequireDest && bClearRequireDest)
107 {
108 JLOG(j.trace()) << "Malformed transaction: Contradictory flags set.";
109 return temINVALID_FLAG;
110 }
111
112 //
113 // DisallowXRP
114 //
115 bool bSetDisallowXRP =
116 (uTxFlags & tfDisallowXRP) || (uSetFlag == asfDisallowXRP);
117 bool bClearDisallowXRP =
118 (uTxFlags & tfAllowXRP) || (uClearFlag == asfDisallowXRP);
119
120 if (bSetDisallowXRP && bClearDisallowXRP)
121 {
122 JLOG(j.trace()) << "Malformed transaction: Contradictory flags set.";
123 return temINVALID_FLAG;
124 }
125
126 // TransferRate
127 if (tx.isFieldPresent(sfTransferRate))
128 {
129 std::uint32_t uRate = tx.getFieldU32(sfTransferRate);
130
131 if (uRate && (uRate < QUALITY_ONE))
132 {
133 JLOG(j.trace())
134 << "Malformed transaction: Transfer rate too small.";
136 }
137
138 if (uRate > 2 * QUALITY_ONE)
139 {
140 JLOG(j.trace())
141 << "Malformed transaction: Transfer rate too large.";
143 }
144 }
145
146 // TickSize
147 if (tx.isFieldPresent(sfTickSize))
148 {
149 auto uTickSize = tx[sfTickSize];
150 if (uTickSize &&
151 ((uTickSize < Quality::minTickSize) ||
152 (uTickSize > Quality::maxTickSize)))
153 {
154 JLOG(j.trace()) << "Malformed transaction: Bad tick size.";
155 return temBAD_TICK_SIZE;
156 }
157 }
158
159 if (auto const mk = tx[~sfMessageKey])
160 {
161 if (mk->size() && !publicKeyType({mk->data(), mk->size()}))
162 {
163 JLOG(j.trace()) << "Invalid message key specified.";
164 return telBAD_PUBLIC_KEY;
165 }
166 }
167
168 if (auto const domain = tx[~sfDomain];
169 domain && domain->size() > maxDomainLength)
170 {
171 JLOG(j.trace()) << "domain too long";
172 return telBAD_DOMAIN;
173 }
174
175 if (ctx.rules.enabled(featureNonFungibleTokensV1))
176 {
177 // Configure authorized minting account:
178 if (uSetFlag == asfAuthorizedNFTokenMinter &&
179 !tx.isFieldPresent(sfNFTokenMinter))
180 return temMALFORMED;
181
182 if (uClearFlag == asfAuthorizedNFTokenMinter &&
183 tx.isFieldPresent(sfNFTokenMinter))
184 return temMALFORMED;
185 }
186
187 return preflight2(ctx);
188}
189
190TER
192{
193 auto const id = ctx.tx[sfAccount];
194
195 std::uint32_t const uTxFlags = ctx.tx.getFlags();
196
197 auto const sle = ctx.view.read(keylet::account(id));
198 if (!sle)
199 return terNO_ACCOUNT;
200
201 std::uint32_t const uFlagsIn = sle->getFieldU32(sfFlags);
202
203 std::uint32_t const uSetFlag = ctx.tx.getFieldU32(sfSetFlag);
204
205 // legacy AccountSet flags
206 bool bSetRequireAuth =
207 (uTxFlags & tfRequireAuth) || (uSetFlag == asfRequireAuth);
208
209 //
210 // RequireAuth
211 //
212 if (bSetRequireAuth && !(uFlagsIn & lsfRequireAuth))
213 {
214 if (!dirIsEmpty(ctx.view, keylet::ownerDir(id)))
215 {
216 JLOG(ctx.j.trace()) << "Retry: Owner directory not empty.";
217 return (ctx.flags & tapRETRY) ? TER{terOWNERS} : TER{tecOWNERS};
218 }
219 }
220
221 //
222 // Clawback
223 //
224 if (ctx.view.rules().enabled(featureClawback))
225 {
226 if (uSetFlag == asfAllowTrustLineClawback)
227 {
228 if (uFlagsIn & lsfNoFreeze)
229 {
230 JLOG(ctx.j.trace()) << "Can't set Clawback if NoFreeze is set";
231 return tecNO_PERMISSION;
232 }
233
234 if (!dirIsEmpty(ctx.view, keylet::ownerDir(id)))
235 {
236 JLOG(ctx.j.trace()) << "Owner directory not empty.";
237 return tecOWNERS;
238 }
239 }
240 else if (uSetFlag == asfNoFreeze)
241 {
242 // Cannot set NoFreeze if clawback is enabled
243 if (uFlagsIn & lsfAllowTrustLineClawback)
244 {
245 JLOG(ctx.j.trace())
246 << "Can't set NoFreeze if clawback is enabled";
247 return tecNO_PERMISSION;
248 }
249 }
250 }
251
252 return tesSUCCESS;
253}
254
255TER
257{
258 auto const sle = view().peek(keylet::account(account_));
259 if (!sle)
260 return tefINTERNAL;
261
262 std::uint32_t const uFlagsIn = sle->getFieldU32(sfFlags);
263 std::uint32_t uFlagsOut = uFlagsIn;
264
265 STTx const& tx{ctx_.tx};
266 std::uint32_t const uSetFlag{tx.getFieldU32(sfSetFlag)};
267 std::uint32_t const uClearFlag{tx.getFieldU32(sfClearFlag)};
268
269 // legacy AccountSet flags
270 std::uint32_t const uTxFlags{tx.getFlags()};
271 bool const bSetRequireDest{
272 (uTxFlags & tfRequireDestTag) || (uSetFlag == asfRequireDest)};
273 bool const bClearRequireDest{
274 (uTxFlags & tfOptionalDestTag) || (uClearFlag == asfRequireDest)};
275 bool const bSetRequireAuth{
276 (uTxFlags & tfRequireAuth) || (uSetFlag == asfRequireAuth)};
277 bool const bClearRequireAuth{
278 (uTxFlags & tfOptionalAuth) || (uClearFlag == asfRequireAuth)};
279 bool const bSetDisallowXRP{
280 (uTxFlags & tfDisallowXRP) || (uSetFlag == asfDisallowXRP)};
281 bool const bClearDisallowXRP{
282 (uTxFlags & tfAllowXRP) || (uClearFlag == asfDisallowXRP)};
283
284 bool const sigWithMaster{[&tx, &acct = account_]() {
285 auto const spk = tx.getSigningPubKey();
286
287 if (publicKeyType(makeSlice(spk)))
288 {
289 PublicKey const signingPubKey(makeSlice(spk));
290
291 if (calcAccountID(signingPubKey) == acct)
292 return true;
293 }
294 return false;
295 }()};
296
297 //
298 // RequireAuth
299 //
300 if (bSetRequireAuth && !(uFlagsIn & lsfRequireAuth))
301 {
302 JLOG(j_.trace()) << "Set RequireAuth.";
303 uFlagsOut |= lsfRequireAuth;
304 }
305
306 if (bClearRequireAuth && (uFlagsIn & lsfRequireAuth))
307 {
308 JLOG(j_.trace()) << "Clear RequireAuth.";
309 uFlagsOut &= ~lsfRequireAuth;
310 }
311
312 //
313 // RequireDestTag
314 //
315 if (bSetRequireDest && !(uFlagsIn & lsfRequireDestTag))
316 {
317 JLOG(j_.trace()) << "Set lsfRequireDestTag.";
318 uFlagsOut |= lsfRequireDestTag;
319 }
320
321 if (bClearRequireDest && (uFlagsIn & lsfRequireDestTag))
322 {
323 JLOG(j_.trace()) << "Clear lsfRequireDestTag.";
324 uFlagsOut &= ~lsfRequireDestTag;
325 }
326
327 //
328 // DisallowXRP
329 //
330 if (bSetDisallowXRP && !(uFlagsIn & lsfDisallowXRP))
331 {
332 JLOG(j_.trace()) << "Set lsfDisallowXRP.";
333 uFlagsOut |= lsfDisallowXRP;
334 }
335
336 if (bClearDisallowXRP && (uFlagsIn & lsfDisallowXRP))
337 {
338 JLOG(j_.trace()) << "Clear lsfDisallowXRP.";
339 uFlagsOut &= ~lsfDisallowXRP;
340 }
341
342 //
343 // DisableMaster
344 //
345 if ((uSetFlag == asfDisableMaster) && !(uFlagsIn & lsfDisableMaster))
346 {
347 if (!sigWithMaster)
348 {
349 JLOG(j_.trace()) << "Must use master key to disable master key.";
350 return tecNEED_MASTER_KEY;
351 }
352
353 if ((!sle->isFieldPresent(sfRegularKey)) &&
354 (!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) &&
410 ((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 (view().rules().enabled(featureDepositAuth))
435 {
436 if (uSetFlag == asfDepositAuth)
437 {
438 JLOG(j_.trace()) << "Set lsfDepositAuth.";
439 uFlagsOut |= lsfDepositAuth;
440 }
441 else if (uClearFlag == asfDepositAuth)
442 {
443 JLOG(j_.trace()) << "Clear lsfDepositAuth.";
444 uFlagsOut &= ~lsfDepositAuth;
445 }
446 }
447
448 //
449 // EmailHash
450 //
451 if (tx.isFieldPresent(sfEmailHash))
452 {
453 uint128 const uHash = tx.getFieldH128(sfEmailHash);
454
455 if (!uHash)
456 {
457 JLOG(j_.trace()) << "unset email hash";
458 sle->makeFieldAbsent(sfEmailHash);
459 }
460 else
461 {
462 JLOG(j_.trace()) << "set email hash";
463 sle->setFieldH128(sfEmailHash, uHash);
464 }
465 }
466
467 //
468 // WalletLocator
469 //
470 if (tx.isFieldPresent(sfWalletLocator))
471 {
472 uint256 const uHash = tx.getFieldH256(sfWalletLocator);
473
474 if (!uHash)
475 {
476 JLOG(j_.trace()) << "unset wallet locator";
477 sle->makeFieldAbsent(sfWalletLocator);
478 }
479 else
480 {
481 JLOG(j_.trace()) << "set wallet locator";
482 sle->setFieldH256(sfWalletLocator, uHash);
483 }
484 }
485
486 //
487 // MessageKey
488 //
489 if (tx.isFieldPresent(sfMessageKey))
490 {
491 Blob const messageKey = tx.getFieldVL(sfMessageKey);
492
493 if (messageKey.empty())
494 {
495 JLOG(j_.debug()) << "set message key";
496 sle->makeFieldAbsent(sfMessageKey);
497 }
498 else
499 {
500 JLOG(j_.debug()) << "set message key";
501 sle->setFieldVL(sfMessageKey, messageKey);
502 }
503 }
504
505 //
506 // Domain
507 //
508 if (tx.isFieldPresent(sfDomain))
509 {
510 Blob const domain = tx.getFieldVL(sfDomain);
511
512 if (domain.empty())
513 {
514 JLOG(j_.trace()) << "unset domain";
515 sle->makeFieldAbsent(sfDomain);
516 }
517 else
518 {
519 JLOG(j_.trace()) << "set domain";
520 sle->setFieldVL(sfDomain, domain);
521 }
522 }
523
524 //
525 // TransferRate
526 //
527 if (tx.isFieldPresent(sfTransferRate))
528 {
529 std::uint32_t uRate = tx.getFieldU32(sfTransferRate);
530
531 if (uRate == 0 || uRate == QUALITY_ONE)
532 {
533 JLOG(j_.trace()) << "unset transfer rate";
534 sle->makeFieldAbsent(sfTransferRate);
535 }
536 else
537 {
538 JLOG(j_.trace()) << "set transfer rate";
539 sle->setFieldU32(sfTransferRate, uRate);
540 }
541 }
542
543 //
544 // TickSize
545 //
546 if (tx.isFieldPresent(sfTickSize))
547 {
548 auto uTickSize = tx[sfTickSize];
549 if ((uTickSize == 0) || (uTickSize == Quality::maxTickSize))
550 {
551 JLOG(j_.trace()) << "unset tick size";
552 sle->makeFieldAbsent(sfTickSize);
553 }
554 else
555 {
556 JLOG(j_.trace()) << "set tick size";
557 sle->setFieldU8(sfTickSize, uTickSize);
558 }
559 }
560
561 // Configure authorized minting account:
562 if (ctx_.view().rules().enabled(featureNonFungibleTokensV1))
563 {
564 if (uSetFlag == asfAuthorizedNFTokenMinter)
565 sle->setAccountID(sfNFTokenMinter, ctx_.tx[sfNFTokenMinter]);
566
567 if (uClearFlag == asfAuthorizedNFTokenMinter &&
568 sle->isFieldPresent(sfNFTokenMinter))
569 sle->makeFieldAbsent(sfNFTokenMinter);
570 }
571
572 // Set or clear flags for disallowing various incoming instruments
573 if (ctx_.view().rules().enabled(featureDisallowIncoming))
574 {
575 if (uSetFlag == asfDisallowIncomingNFTokenOffer)
577 else if (uClearFlag == asfDisallowIncomingNFTokenOffer)
578 uFlagsOut &= ~lsfDisallowIncomingNFTokenOffer;
579
580 if (uSetFlag == asfDisallowIncomingCheck)
581 uFlagsOut |= lsfDisallowIncomingCheck;
582 else if (uClearFlag == asfDisallowIncomingCheck)
583 uFlagsOut &= ~lsfDisallowIncomingCheck;
584
585 if (uSetFlag == asfDisallowIncomingPayChan)
586 uFlagsOut |= lsfDisallowIncomingPayChan;
587 else if (uClearFlag == asfDisallowIncomingPayChan)
588 uFlagsOut &= ~lsfDisallowIncomingPayChan;
589
590 if (uSetFlag == asfDisallowIncomingTrustline)
591 uFlagsOut |= lsfDisallowIncomingTrustline;
592 else if (uClearFlag == asfDisallowIncomingTrustline)
593 uFlagsOut &= ~lsfDisallowIncomingTrustline;
594 }
595
596 // Set flag for clawback
597 if (ctx_.view().rules().enabled(featureClawback) &&
598 uSetFlag == asfAllowTrustLineClawback)
599 {
600 JLOG(j_.trace()) << "set allow clawback";
601 uFlagsOut |= lsfAllowTrustLineClawback;
602 }
603
604 if (uFlagsIn != uFlagsOut)
605 sle->setFieldU32(sfFlags, uFlagsOut);
606
607 ctx_.view().update(sle);
608
609 return tesSUCCESS;
610}
611
612} // namespace ripple
Stream debug() const
Definition: Journal.h:317
Stream trace() const
Severity stream access functions.
Definition: Journal.h:311
ApplyView & view()
Definition: ApplyContext.h:54
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:122
std::uint32_t getFieldU32(SField const &field) const
Definition: STObject.cpp:585
std::uint32_t getFlags() const
Definition: STObject.cpp:507
static TER preclaim(PreclaimContext const &ctx)
Definition: SetAccount.cpp:191
static TxConsequences makeTxConsequences(PreflightContext const &ctx)
Definition: SetAccount.cpp:33
static NotTEC preflight(PreflightContext const &ctx)
Definition: SetAccount.cpp:59
TER doApply() override
Definition: SetAccount.cpp:256
AccountID const account_
Definition: Transactor.h:91
ApplyView & view()
Definition: Transactor.h:107
beast::Journal const j_
Definition: Transactor.h:89
ApplyContext & ctx_
Definition: Transactor.h:88
Class describing the consequences to the account of applying a transaction if the transaction consume...
Definition: applySteps.h:58
@ normal
Moves currency around, creates offers, etc.
Definition: applySteps.h:64
@ blocker
Affects the ability of subsequent transactions to claim a fee.
Definition: applySteps.h:67
Integers of any length that is a multiple of 32-bits.
Definition: base_uint.h:85
T empty(T... args)
Keylet account(AccountID const &id) noexcept
AccountID root.
Definition: Indexes.cpp:160
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Definition: Indexes.cpp:350
Keylet signers(AccountID const &account) noexcept
A SignerList.
Definition: Indexes.cpp:306
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:160
std::size_t constexpr maxDomainLength
The maximum length of a domain.
Definition: Protocol.h:97
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:207
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:243
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:39
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:744
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:53
ReadView const & view
Definition: Transactor.h:56
beast::Journal const j
Definition: Transactor.h:60
State information when preflighting a tx.
Definition: Transactor.h:32
beast::Journal const j
Definition: Transactor.h:38