rippled
TER.h
1 //------------------------------------------------------------------------------
2 /*
3  This file is part of rippled: https://github.com/ripple/rippled
4  Copyright (c) 2012 - 2019 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 #ifndef RIPPLE_PROTOCOL_TER_H_INCLUDED
21 #define RIPPLE_PROTOCOL_TER_H_INCLUDED
22 
23 #include <ripple/basics/safe_cast.h>
24 #include <ripple/json/json_value.h>
25 
26 #include <optional>
27 #include <ostream>
28 #include <string>
29 
30 namespace ripple {
31 
32 // See https://xrpl.org/transaction-results.html
33 //
34 // "Transaction Engine Result"
35 // or Transaction ERror.
36 //
37 using TERUnderlyingType = int;
38 
39 //------------------------------------------------------------------------------
40 
42  // Note: Range is stable.
43  // Exact numbers are used in ripple-binary-codec:
44  // https://github.com/ripple/ripple-binary-codec/blob/master/src/enums/definitions.json
45  // Use tokens.
46 
47  // -399 .. -300: L Local error (transaction fee inadequate, exceeds local
48  // limit) Only valid during non-consensus processing. Implications:
49  // - Not forwarded
50  // - No fee check
67 };
68 
69 //------------------------------------------------------------------------------
70 
72  // Note: Range is stable.
73  // Exact numbers are used in ripple-binary-codec:
74  // https://github.com/ripple/ripple-binary-codec/blob/master/src/enums/definitions.json
75  // Use tokens.
76 
77  // -299 .. -200: M Malformed (bad signature)
78  // Causes:
79  // - Transaction corrupt.
80  // Implications:
81  // - Not applied
82  // - Not forwarded
83  // - Reject
84  // - Cannot succeed in any imagined ledger.
85  temMALFORMED = -299,
86 
120 
121  temUNCERTAIN, // An internal intermediate result; should never be returned.
122  temUNKNOWN, // An internal intermediate result; should never be returned.
123 
126 
128 
135 };
136 
137 //------------------------------------------------------------------------------
138 
140  // Note: Range is stable.
141  // Exact numbers are used in ripple-binary-codec:
142  // https://github.com/ripple/ripple-binary-codec/blob/master/src/enums/definitions.json
143  // Use tokens.
144 
145  // -199 .. -100: F
146  // Failure (sequence number previously used)
147  //
148  // Causes:
149  // - Transaction cannot succeed because of ledger state.
150  // - Unexpected ledger state.
151  // - C++ exception.
152  //
153  // Implications:
154  // - Not applied
155  // - Not forwarded
156  // - Could succeed in an imagined ledger.
157  tefFAILURE = -199,
165  tefNO_AUTH_REQUIRED, // Can't set auth if auth is not required.
178 };
179 
180 //------------------------------------------------------------------------------
181 
183  // Note: Range is stable.
184  // Exact numbers are used in ripple-binary-codec:
185  // https://github.com/ripple/ripple-binary-codec/blob/master/src/enums/definitions.json
186  // Use tokens.
187 
188  // -99 .. -1: R Retry
189  // sequence too high, no funds for txn fee, originating -account
190  // non-existent
191  //
192  // Cause:
193  // Prior application of another, possibly non-existent, transaction could
194  // allow this transaction to succeed.
195  //
196  // Implications:
197  // - Not applied
198  // - May be forwarded
199  // - Results indicating the txn was forwarded: terQUEUED
200  // - All others are not forwarded.
201  // - Might succeed later
202  // - Hold
203  // - Makes hole in sequence which jams transactions.
204  terRETRY = -99,
205  terFUNDS_SPENT, // DEPRECATED.
206  terINSUF_FEE_B, // Can't pay fee, therefore don't burden network.
207  terNO_ACCOUNT, // Can't pay fee, therefore don't burden network.
208  terNO_AUTH, // Not authorized to hold IOUs.
209  terNO_LINE, // Internal flag.
210  terOWNERS, // Can't succeed with non-zero owner count.
211  terPRE_SEQ, // Can't pay fee, no point in forwarding, so don't
212  // burden network.
213  terLAST, // DEPRECATED.
214  terNO_RIPPLE, // Rippling not allowed
215  terQUEUED, // Transaction is being held in TxQ until fee drops
216  terPRE_TICKET, // Ticket is not yet in ledger but might be on its way
217  terNO_AMM, // AMM doesn't exist for the asset pair
218  terSUBMITTED // Has been submitted async.
219 };
220 
221 //------------------------------------------------------------------------------
222 
224  // Note: Exact number must stay stable. This code is stored by value
225  // in metadata for historic transactions.
226 
227  // 0: S Success (success)
228  // Causes:
229  // - Success.
230  // Implications:
231  // - Applied
232  // - Forwarded
234 };
235 
236 //------------------------------------------------------------------------------
237 
239  // Note: Exact numbers must stay stable. These codes are stored by
240  // value in metadata for historic transactions.
241 
242  // 100 .. 255 C
243  // Claim fee only (ripple transaction with no good paths, pay to
244  // non-existent account, no path)
245  //
246  // Causes:
247  // - Success, but does not achieve optimal result.
248  // - Invalid transaction or no effect, but claim fee to use the sequence
249  // number.
250  //
251  // Implications:
252  // - Applied
253  // - Forwarded
254  //
255  // Only allowed as a return code of appliedTransaction when !tapRETRY.
256  // Otherwise, treated as terRETRY.
257  //
258  // DO NOT CHANGE THESE NUMBERS: They appear in ledger meta data.
259  tecCLAIM = 100,
261  tecUNFUNDED_ADD = 102, // Unused legacy code
265  tecDIR_FULL = 121,
268  tecNO_DST = 124,
272  tecPATH_DRY = 128,
273  tecUNFUNDED = 129,
276  tecOWNERS = 132,
278  tecNO_AUTH = 134,
279  tecNO_LINE = 135,
281  tecFROZEN = 137,
284  tecNO_ENTRY = 140,
288  tecINTERNAL = 144,
289  tecOVERSIZE = 145,
292  tecEXPIRED = 148,
294  tecKILLED = 150,
296  tecTOO_SOON = 152,
297  tecHOOK_REJECTED [[maybe_unused]] = 153,
331 };
332 
333 //------------------------------------------------------------------------------
334 
335 // For generic purposes, a free function that returns the value of a TE*codes.
336 constexpr TERUnderlyingType
338 {
339  return safe_cast<TERUnderlyingType>(v);
340 }
341 
342 constexpr TERUnderlyingType
344 {
345  return safe_cast<TERUnderlyingType>(v);
346 }
347 
348 constexpr TERUnderlyingType
350 {
351  return safe_cast<TERUnderlyingType>(v);
352 }
353 
354 constexpr TERUnderlyingType
356 {
357  return safe_cast<TERUnderlyingType>(v);
358 }
359 
360 constexpr TERUnderlyingType
362 {
363  return safe_cast<TERUnderlyingType>(v);
364 }
365 
366 constexpr TERUnderlyingType
368 {
369  return safe_cast<TERUnderlyingType>(v);
370 }
371 
372 //------------------------------------------------------------------------------
373 // Template class that is specific to selected ranges of error codes. The
374 // Trait tells std::enable_if which ranges are allowed.
375 template <template <typename> class Trait>
377 {
379 
380 public:
381  // Constructors
382  constexpr TERSubset() : code_(tesSUCCESS)
383  {
384  }
385  constexpr TERSubset(TERSubset const& rhs) = default;
386  constexpr TERSubset(TERSubset&& rhs) = default;
387 
388 private:
389  constexpr explicit TERSubset(int rhs) : code_(rhs)
390  {
391  }
392 
393 public:
394  static constexpr TERSubset
395  fromInt(int from)
396  {
397  return TERSubset(from);
398  }
399 
400  // Trait tells enable_if which types are allowed for construction.
401  template <
402  typename T,
403  typename = std::enable_if_t<
404  Trait<std::remove_cv_t<std::remove_reference_t<T>>>::value>>
405  constexpr TERSubset(T rhs) : code_(TERtoInt(rhs))
406  {
407  }
408 
409  // Assignment
410  constexpr TERSubset&
411  operator=(TERSubset const& rhs) = default;
412  constexpr TERSubset&
413  operator=(TERSubset&& rhs) = default;
414 
415  // Trait tells enable_if which types are allowed for assignment.
416  template <typename T>
417  constexpr auto
419  {
420  code_ = TERtoInt(rhs);
421  return *this;
422  }
423 
424  // Conversion to bool.
425  explicit operator bool() const
426  {
427  return code_ != tesSUCCESS;
428  }
429 
430  // Conversion to Json::Value allows assignment to Json::Objects
431  // without casting.
432  operator Json::Value() const
433  {
434  return Json::Value{code_};
435  }
436 
437  // Streaming operator.
438  friend std::ostream&
440  {
441  return os << rhs.code_;
442  }
443 
444  // Return the underlying value. Not a member so similarly named free
445  // functions can do the same work for the enums.
446  //
447  // It's worth noting that an explicit conversion operator was considered
448  // and rejected. Consider this case, taken from Status.h
449  //
450  // class Status {
451  // int code_;
452  // public:
453  // Status (TER ter)
454  // : code_ (ter) {}
455  // }
456  //
457  // This code compiles with no errors or warnings if TER has an explicit
458  // (unnamed) conversion to int. To avoid silent conversions like these
459  // we provide (only) a named conversion.
460  friend constexpr TERUnderlyingType
462  {
463  return v.code_;
464  }
465 };
466 
467 // Comparison operators.
468 // Only enabled if both arguments return int if TERtiInt is called with them.
469 template <typename L, typename R>
470 constexpr auto
471 operator==(L const& lhs, R const& rhs) -> std::enable_if_t<
472  std::is_same<decltype(TERtoInt(lhs)), int>::value &&
473  std::is_same<decltype(TERtoInt(rhs)), int>::value,
474  bool>
475 {
476  return TERtoInt(lhs) == TERtoInt(rhs);
477 }
478 
479 template <typename L, typename R>
480 constexpr auto
481 operator!=(L const& lhs, R const& rhs) -> std::enable_if_t<
482  std::is_same<decltype(TERtoInt(lhs)), int>::value &&
483  std::is_same<decltype(TERtoInt(rhs)), int>::value,
484  bool>
485 {
486  return TERtoInt(lhs) != TERtoInt(rhs);
487 }
488 
489 template <typename L, typename R>
490 constexpr auto
491 operator<(L const& lhs, R const& rhs) -> std::enable_if_t<
492  std::is_same<decltype(TERtoInt(lhs)), int>::value &&
493  std::is_same<decltype(TERtoInt(rhs)), int>::value,
494  bool>
495 {
496  return TERtoInt(lhs) < TERtoInt(rhs);
497 }
498 
499 template <typename L, typename R>
500 constexpr auto
501 operator<=(L const& lhs, R const& rhs) -> std::enable_if_t<
502  std::is_same<decltype(TERtoInt(lhs)), int>::value &&
503  std::is_same<decltype(TERtoInt(rhs)), int>::value,
504  bool>
505 {
506  return TERtoInt(lhs) <= TERtoInt(rhs);
507 }
508 
509 template <typename L, typename R>
510 constexpr auto
511 operator>(L const& lhs, R const& rhs) -> std::enable_if_t<
512  std::is_same<decltype(TERtoInt(lhs)), int>::value &&
513  std::is_same<decltype(TERtoInt(rhs)), int>::value,
514  bool>
515 {
516  return TERtoInt(lhs) > TERtoInt(rhs);
517 }
518 
519 template <typename L, typename R>
520 constexpr auto
521 operator>=(L const& lhs, R const& rhs) -> std::enable_if_t<
522  std::is_same<decltype(TERtoInt(lhs)), int>::value &&
523  std::is_same<decltype(TERtoInt(rhs)), int>::value,
524  bool>
525 {
526  return TERtoInt(lhs) >= TERtoInt(rhs);
527 }
528 
529 //------------------------------------------------------------------------------
530 
531 // Use traits to build a TERSubset that can convert from any of the TE*codes
532 // enums *except* TECcodes: NotTEC
533 
534 // NOTE: NotTEC is useful for codes returned by preflight in transactors.
535 // Preflight checks occur prior to signature checking. If preflight returned
536 // a tec code, then a malicious user could submit a transaction with a very
537 // large fee and have that fee charged against an account without using that
538 // account's valid signature.
539 template <typename FROM>
541 {
542 };
543 template <>
545 {
546 };
547 template <>
549 {
550 };
551 template <>
553 {
554 };
555 template <>
557 {
558 };
559 template <>
561 {
562 };
563 
565 
566 //------------------------------------------------------------------------------
567 
568 // Use traits to build a TERSubset that can convert from any of the TE*codes
569 // enums as well as from NotTEC.
570 template <typename FROM>
572 {
573 };
574 template <>
576 {
577 };
578 template <>
580 {
581 };
582 template <>
584 {
585 };
586 template <>
588 {
589 };
590 template <>
592 {
593 };
594 template <>
596 {
597 };
598 template <>
600 {
601 };
602 
603 // TER allows all of the subsets.
605 
606 //------------------------------------------------------------------------------
607 
608 inline bool
610 {
611  return ((x) >= telLOCAL_ERROR && (x) < temMALFORMED);
612 }
613 
614 inline bool
616 {
617  return ((x) >= temMALFORMED && (x) < tefFAILURE);
618 }
619 
620 inline bool
622 {
623  return ((x) >= tefFAILURE && (x) < terRETRY);
624 }
625 
626 inline bool
628 {
629  return ((x) >= terRETRY && (x) < tesSUCCESS);
630 }
631 
632 inline bool
634 {
635  return ((x) == tesSUCCESS);
636 }
637 
638 inline bool
640 {
641  return ((x) >= tecCLAIM);
642 }
643 
644 bool
645 transResultInfo(TER code, std::string& token, std::string& text);
646 
648 transToken(TER code);
649 
651 transHuman(TER code);
652 
654 transCode(std::string const& token);
655 
656 } // namespace ripple
657 
658 #endif
ripple::tecUNFUNDED_OFFER
@ tecUNFUNDED_OFFER
Definition: TER.h:262
ripple::temXCHAIN_BAD_PROOF
@ temXCHAIN_BAD_PROOF
Definition: TER.h:130
ripple::tecXCHAIN_ACCOUNT_CREATE_TOO_MANY
@ tecXCHAIN_ACCOUNT_CREATE_TOO_MANY
Definition: TER.h:326
ripple::tefNO_TICKET
@ tefNO_TICKET
Definition: TER.h:176
ripple::terPRE_TICKET
@ terPRE_TICKET
Definition: TER.h:216
ripple::tecOBJECT_NOT_FOUND
@ tecOBJECT_NOT_FOUND
Definition: TER.h:304
std::is_same
ripple::tecFROZEN
@ tecFROZEN
Definition: TER.h:281
ripple::tecUNFUNDED_AMM
@ tecUNFUNDED_AMM
Definition: TER.h:306
ripple::tecXCHAIN_BAD_CLAIM_ID
@ tecXCHAIN_BAD_CLAIM_ID
Definition: TER.h:316
std::false_type
ripple::tecNO_TARGET
@ tecNO_TARGET
Definition: TER.h:282
ripple::temBAD_SEND_XRP_MAX
@ temBAD_SEND_XRP_MAX
Definition: TER.h:98
ripple::tefINTERNAL
@ tefINTERNAL
Definition: TER.h:164
ripple::tecINVARIANT_FAILED
@ tecINVARIANT_FAILED
Definition: TER.h:291
ripple::tecINSUF_RESERVE_LINE
@ tecINSUF_RESERVE_LINE
Definition: TER.h:266
std::string
STL class.
ripple::temBAD_OFFER
@ temBAD_OFFER
Definition: TER.h:93
ripple::tecXCHAIN_PROOF_UNKNOWN_KEY
@ tecXCHAIN_PROOF_UNKNOWN_KEY
Definition: TER.h:318
ripple::TERSubset::code_
TERUnderlyingType code_
Definition: TER.h:378
ripple::tefBAD_ADD_AUTH
@ tefBAD_ADD_AUTH
Definition: TER.h:159
ripple::tecXCHAIN_CLAIM_NO_QUORUM
@ tecXCHAIN_CLAIM_NO_QUORUM
Definition: TER.h:317
ripple::terINSUF_FEE_B
@ terINSUF_FEE_B
Definition: TER.h:206
ripple::temBAD_CURRENCY
@ temBAD_CURRENCY
Definition: TER.h:88
ripple::TEScodes
TEScodes
Definition: TER.h:223
ripple::TERSubset::operator<<
friend std::ostream & operator<<(std::ostream &os, TERSubset const &rhs)
Definition: TER.h:439
ripple::terNO_LINE
@ terNO_LINE
Definition: TER.h:209
ripple::tecOWNERS
@ tecOWNERS
Definition: TER.h:276
ripple::isTesSuccess
bool isTesSuccess(TER x)
Definition: TER.h:633
ripple::telLOCAL_ERROR
@ telLOCAL_ERROR
Definition: TER.h:51
ripple::tecINSUFFICIENT_FUNDS
@ tecINSUFFICIENT_FUNDS
Definition: TER.h:303
ripple::tefINVARIANT_FAILED
@ tefINVARIANT_FAILED
Definition: TER.h:174
ripple::tecNO_REGULAR_KEY
@ tecNO_REGULAR_KEY
Definition: TER.h:275
ripple::telCAN_NOT_QUEUE_FEE
@ telCAN_NOT_QUEUE_FEE
Definition: TER.h:62
ripple::TECcodes
TECcodes
Definition: TER.h:238
ripple::temBAD_REGKEY
@ temBAD_REGKEY
Definition: TER.h:96
ripple::tecXCHAIN_WRONG_CHAIN
@ tecXCHAIN_WRONG_CHAIN
Definition: TER.h:320
ripple::tecXCHAIN_SENDING_ACCOUNT_MISMATCH
@ tecXCHAIN_SENDING_ACCOUNT_MISMATCH
Definition: TER.h:323
ripple::telBAD_DOMAIN
@ telBAD_DOMAIN
Definition: TER.h:52
ripple::temXCHAIN_EQUAL_DOOR_ACCOUNTS
@ temXCHAIN_EQUAL_DOOR_ACCOUNTS
Definition: TER.h:129
ripple::CanCvtToNotTEC
Definition: TER.h:540
ripple::tecDST_TAG_NEEDED
@ tecDST_TAG_NEEDED
Definition: TER.h:287
ripple::TERSubset::TERtoInt
constexpr friend TERUnderlyingType TERtoInt(TERSubset v)
Definition: TER.h:461
ripple::terFUNDS_SPENT
@ terFUNDS_SPENT
Definition: TER.h:205
ripple::temCANNOT_PREAUTH_SELF
@ temCANNOT_PREAUTH_SELF
Definition: TER.h:118
ripple::tecAMM_EMPTY
@ tecAMM_EMPTY
Definition: TER.h:310
ripple::tecXCHAIN_NO_CLAIM_ID
@ tecXCHAIN_NO_CLAIM_ID
Definition: TER.h:315
ripple::transToken
std::string transToken(TER code)
Definition: TER.cpp:244
ripple::telCAN_NOT_QUEUE_FULL
@ telCAN_NOT_QUEUE_FULL
Definition: TER.h:63
ripple::telCAN_NOT_QUEUE
@ telCAN_NOT_QUEUE
Definition: TER.h:58
ripple::TERUnderlyingType
int TERUnderlyingType
Definition: TER.h:37
ripple::telNETWORK_ID_MAKES_TX_NON_CANONICAL
@ telNETWORK_ID_MAKES_TX_NON_CANONICAL
Definition: TER.h:66
ripple::tecHOOK_REJECTED
@ tecHOOK_REJECTED
Definition: TER.h:297
ripple::CanCvtToTER
Definition: TER.h:571
ripple::TERtoInt
constexpr TERUnderlyingType TERtoInt(TELcodes v)
Definition: TER.h:337
ripple::tecCANT_ACCEPT_OWN_NFTOKEN_OFFER
@ tecCANT_ACCEPT_OWN_NFTOKEN_OFFER
Definition: TER.h:302
ripple::terNO_RIPPLE
@ terNO_RIPPLE
Definition: TER.h:214
ripple::temBAD_ISSUER
@ temBAD_ISSUER
Definition: TER.h:91
ripple::tefCREATED
@ tefCREATED
Definition: TER.h:162
ripple::temBAD_TRANSFER_RATE
@ temBAD_TRANSFER_RATE
Definition: TER.h:105
ripple::tecINCOMPLETE
@ tecINCOMPLETE
Definition: TER.h:313
ripple::temBAD_PATH
@ temBAD_PATH
Definition: TER.h:94
ripple::temDST_IS_SRC
@ temDST_IS_SRC
Definition: TER.h:106
ripple::isTecClaim
bool isTecClaim(TER x)
Definition: TER.h:639
ripple::tefBAD_AUTH
@ tefBAD_AUTH
Definition: TER.h:160
ripple::temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT
@ temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT
Definition: TER.h:134
ripple::tecAMM_FAILED
@ tecAMM_FAILED
Definition: TER.h:308
ripple::operator==
bool operator==(Manifest const &lhs, Manifest const &rhs)
Definition: Manifest.h:165
ripple::transCode
std::optional< TER > transCode(std::string const &token)
Definition: TER.cpp:262
ripple::temXCHAIN_BRIDGE_BAD_ISSUES
@ temXCHAIN_BRIDGE_BAD_ISSUES
Definition: TER.h:131
ripple::tecKILLED
@ tecKILLED
Definition: TER.h:294
ripple::temUNCERTAIN
@ temUNCERTAIN
Definition: TER.h:121
ripple::terQUEUED
@ terQUEUED
Definition: TER.h:215
ripple::isTerRetry
bool isTerRetry(TER x)
Definition: TER.h:627
ripple::TERSubset::TERSubset
constexpr TERSubset(T rhs)
Definition: TER.h:405
ripple::tefBAD_QUORUM
@ tefBAD_QUORUM
Definition: TER.h:171
ripple::tecOVERSIZE
@ tecOVERSIZE
Definition: TER.h:289
ripple::tecNO_DST_INSUF_XRP
@ tecNO_DST_INSUF_XRP
Definition: TER.h:269
ripple::tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR
@ tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR
Definition: TER.h:329
ripple::temINVALID_FLAG
@ temINVALID_FLAG
Definition: TER.h:109
ripple::tecNFTOKEN_OFFER_TYPE_MISMATCH
@ tecNFTOKEN_OFFER_TYPE_MISMATCH
Definition: TER.h:301
ripple::tefBAD_LEDGER
@ tefBAD_LEDGER
Definition: TER.h:161
ripple::temBAD_QUORUM
@ temBAD_QUORUM
Definition: TER.h:114
ripple::telFAILED_PROCESSING
@ telFAILED_PROCESSING
Definition: TER.h:55
ripple::temBAD_AMM_TOKENS
@ temBAD_AMM_TOKENS
Definition: TER.h:127
ripple::operator<=
bool operator<=(STAmount const &lhs, STAmount const &rhs)
Definition: STAmount.h:478
ripple::tecAMM_NOT_EMPTY
@ tecAMM_NOT_EMPTY
Definition: TER.h:311
ripple::tecNO_ALTERNATIVE_KEY
@ tecNO_ALTERNATIVE_KEY
Definition: TER.h:274
ripple::temBAD_SEND_XRP_PARTIAL
@ temBAD_SEND_XRP_PARTIAL
Definition: TER.h:100
ripple::operator>
bool operator>(STAmount const &lhs, STAmount const &rhs)
Definition: STAmount.h:472
ripple::tefMAX_LEDGER
@ tefMAX_LEDGER
Definition: TER.h:169
std::enable_if_t
ripple::tefNFTOKEN_IS_NOT_TRANSFERABLE
@ tefNFTOKEN_IS_NOT_TRANSFERABLE
Definition: TER.h:177
ripple::operator<
bool operator<(CanonicalTXSet::Key const &lhs, CanonicalTXSet::Key const &rhs)
Definition: CanonicalTXSet.cpp:25
ripple::tefMASTER_DISABLED
@ tefMASTER_DISABLED
Definition: TER.h:168
std::ostream
STL class.
ripple::temBAD_LIMIT
@ temBAD_LIMIT
Definition: TER.h:92
ripple::terRETRY
@ terRETRY
Definition: TER.h:204
ripple::temBAD_SIGNER
@ temBAD_SIGNER
Definition: TER.h:113
ripple::tecDUPLICATE
@ tecDUPLICATE
Definition: TER.h:293
ripple::tecAMM_INVALID_TOKENS
@ tecAMM_INVALID_TOKENS
Definition: TER.h:309
ripple::temBAD_SEND_XRP_PATHS
@ temBAD_SEND_XRP_PATHS
Definition: TER.h:101
ripple::TERSubset
Definition: TER.h:376
ripple::terLAST
@ terLAST
Definition: TER.h:213
ripple::tecFAILED_PROCESSING
@ tecFAILED_PROCESSING
Definition: TER.h:264
ripple::isTefFailure
bool isTefFailure(TER x)
Definition: TER.h:621
ripple::operator!=
bool operator!=(Manifest const &lhs, Manifest const &rhs)
Definition: Manifest.h:175
ripple::temDST_NEEDED
@ temDST_NEEDED
Definition: TER.h:107
ripple::temBAD_SEQUENCE
@ temBAD_SEQUENCE
Definition: TER.h:102
ripple::tecAMM_BALANCE
@ tecAMM_BALANCE
Definition: TER.h:307
ripple::terOWNERS
@ terOWNERS
Definition: TER.h:210
ripple::operator>=
bool operator>=(STAmount const &lhs, STAmount const &rhs)
Definition: STAmount.h:484
ripple::tecUNFUNDED
@ tecUNFUNDED
Definition: TER.h:273
ripple::TER
TERSubset< CanCvtToTER > TER
Definition: TER.h:604
ripple::temBAD_SRC_ACCOUNT
@ temBAD_SRC_ACCOUNT
Definition: TER.h:104
ripple::telINSUF_FEE_P
@ telINSUF_FEE_P
Definition: TER.h:56
ripple::TELcodes
TELcodes
Definition: TER.h:41
ripple::terNO_AUTH
@ terNO_AUTH
Definition: TER.h:208
ripple::telREQUIRES_NETWORK_ID
@ telREQUIRES_NETWORK_ID
Definition: TER.h:65
ripple::tecNO_LINE_REDUNDANT
@ tecNO_LINE_REDUNDANT
Definition: TER.h:271
ripple::tecUNFUNDED_PAYMENT
@ tecUNFUNDED_PAYMENT
Definition: TER.h:263
ripple::tecXCHAIN_ACCOUNT_CREATE_PAST
@ tecXCHAIN_ACCOUNT_CREATE_PAST
Definition: TER.h:325
ripple::tecINTERNAL
@ tecINTERNAL
Definition: TER.h:288
ripple::TERSubset::operator=
constexpr auto operator=(T rhs) -> std::enable_if_t< Trait< T >::value, TERSubset & >
Definition: TER.h:418
ripple::tecXCHAIN_PAYMENT_FAILED
@ tecXCHAIN_PAYMENT_FAILED
Definition: TER.h:327
ripple::temBAD_AMOUNT
@ temBAD_AMOUNT
Definition: TER.h:87
ripple::tecINSUFF_FEE
@ tecINSUFF_FEE
Definition: TER.h:280
ripple::temBAD_SEND_XRP_NO_DIRECT
@ temBAD_SEND_XRP_NO_DIRECT
Definition: TER.h:99
ripple::telBAD_PATH_COUNT
@ telBAD_PATH_COUNT
Definition: TER.h:53
ripple::temBAD_SIGNATURE
@ temBAD_SIGNATURE
Definition: TER.h:103
ripple::tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE
@ tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE
Definition: TER.h:319
ripple::temUNKNOWN
@ temUNKNOWN
Definition: TER.h:122
ripple::tecPATH_PARTIAL
@ tecPATH_PARTIAL
Definition: TER.h:260
ripple::tecXCHAIN_BAD_TRANSFER_ISSUE
@ tecXCHAIN_BAD_TRANSFER_ISSUE
Definition: TER.h:314
ripple::temREDUNDANT
@ temREDUNDANT
Definition: TER.h:110
ripple::tefFAILURE
@ tefFAILURE
Definition: TER.h:157
ripple::temBAD_FEE
@ temBAD_FEE
Definition: TER.h:90
ripple::TEFcodes
TEFcodes
Definition: TER.h:139
ripple::telCAN_NOT_QUEUE_BLOCKS
@ telCAN_NOT_QUEUE_BLOCKS
Definition: TER.h:60
ripple::tecNEED_MASTER_KEY
@ tecNEED_MASTER_KEY
Definition: TER.h:286
ripple::TERSubset::TERSubset
constexpr TERSubset(int rhs)
Definition: TER.h:389
ripple::transHuman
std::string transHuman(TER code)
Definition: TER.cpp:253
ripple::tecUNFUNDED_ADD
@ tecUNFUNDED_ADD
Definition: TER.h:261
ripple::tecDIR_FULL
@ tecDIR_FULL
Definition: TER.h:265
ripple::terNO_ACCOUNT
@ terNO_ACCOUNT
Definition: TER.h:207
ripple::tecTOO_SOON
@ tecTOO_SOON
Definition: TER.h:296
ripple::tefNOT_MULTI_SIGNING
@ tefNOT_MULTI_SIGNING
Definition: TER.h:172
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::transResultInfo
bool transResultInfo(TER code, std::string &token, std::string &text)
Definition: TER.cpp:229
ripple::tefNO_AUTH_REQUIRED
@ tefNO_AUTH_REQUIRED
Definition: TER.h:165
ripple::temINVALID_ACCOUNT_ID
@ temINVALID_ACCOUNT_ID
Definition: TER.h:117
ripple::tecXCHAIN_CREATE_ACCOUNT_DISABLED
@ tecXCHAIN_CREATE_ACCOUNT_DISABLED
Definition: TER.h:330
ripple::tecNFTOKEN_BUY_SELL_MISMATCH
@ tecNFTOKEN_BUY_SELL_MISMATCH
Definition: TER.h:300
ripple::tecNO_LINE_INSUF_RESERVE
@ tecNO_LINE_INSUF_RESERVE
Definition: TER.h:270
ripple::tecINSUFFICIENT_PAYMENT
@ tecINSUFFICIENT_PAYMENT
Definition: TER.h:305
ripple::tefPAST_SEQ
@ tefPAST_SEQ
Definition: TER.h:166
ripple::tecXCHAIN_SELF_COMMIT
@ tecXCHAIN_SELF_COMMIT
Definition: TER.h:328
ripple::terSUBMITTED
@ terSUBMITTED
Definition: TER.h:218
ripple::tecNO_LINE
@ tecNO_LINE
Definition: TER.h:279
ripple::temSEQ_AND_TICKET
@ temSEQ_AND_TICKET
Definition: TER.h:124
ripple::tecEXPIRED
@ tecEXPIRED
Definition: TER.h:292
ripple::temDISABLED
@ temDISABLED
Definition: TER.h:112
ripple::tecXCHAIN_REWARD_MISMATCH
@ tecXCHAIN_REWARD_MISMATCH
Definition: TER.h:321
ripple::tefALREADY
@ tefALREADY
Definition: TER.h:158
ripple::TERSubset::fromInt
static constexpr TERSubset fromInt(int from)
Definition: TER.h:395
ripple::terNO_AMM
@ terNO_AMM
Definition: TER.h:217
ripple::tecNO_ISSUER
@ tecNO_ISSUER
Definition: TER.h:277
ripple::isTelLocal
bool isTelLocal(TER x)
Definition: TER.h:609
ripple::tefTOO_BIG
@ tefTOO_BIG
Definition: TER.h:175
ripple::tecNO_SUITABLE_NFTOKEN_PAGE
@ tecNO_SUITABLE_NFTOKEN_PAGE
Definition: TER.h:299
ripple::tecHAS_OBLIGATIONS
@ tecHAS_OBLIGATIONS
Definition: TER.h:295
ripple::tecNO_PERMISSION
@ tecNO_PERMISSION
Definition: TER.h:283
ripple::tecMAX_SEQUENCE_REACHED
@ tecMAX_SEQUENCE_REACHED
Definition: TER.h:298
ripple::tefWRONG_PRIOR
@ tefWRONG_PRIOR
Definition: TER.h:167
ripple::temRIPPLE_EMPTY
@ temRIPPLE_EMPTY
Definition: TER.h:111
ripple::tecPATH_DRY
@ tecPATH_DRY
Definition: TER.h:272
ripple::telBAD_PUBLIC_KEY
@ telBAD_PUBLIC_KEY
Definition: TER.h:54
ripple::tecINSUFFICIENT_RESERVE
@ tecINSUFFICIENT_RESERVE
Definition: TER.h:285
ripple::TERSubset::TERSubset
constexpr TERSubset()
Definition: TER.h:382
ripple::terPRE_SEQ
@ terPRE_SEQ
Definition: TER.h:211
ripple::TERcodes
TERcodes
Definition: TER.h:182
optional
ripple::temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT
@ temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT
Definition: TER.h:133
ripple::tefBAD_AUTH_MASTER
@ tefBAD_AUTH_MASTER
Definition: TER.h:173
ripple::tecNO_ENTRY
@ tecNO_ENTRY
Definition: TER.h:284
ripple::temBAD_PATH_LOOP
@ temBAD_PATH_LOOP
Definition: TER.h:95
ripple::temMALFORMED
@ temMALFORMED
Definition: TER.h:85
ripple::TEMcodes
TEMcodes
Definition: TER.h:71
ripple::telWRONG_NETWORK
@ telWRONG_NETWORK
Definition: TER.h:64
ripple::temINVALID_COUNT
@ temINVALID_COUNT
Definition: TER.h:119
ripple::tefEXCEPTION
@ tefEXCEPTION
Definition: TER.h:163
ripple::telNO_DST_PARTIAL
@ telNO_DST_PARTIAL
Definition: TER.h:57
ripple::temBAD_TICK_SIZE
@ temBAD_TICK_SIZE
Definition: TER.h:116
ripple::tecNO_AUTH
@ tecNO_AUTH
Definition: TER.h:278
ripple::tecCLAIM
@ tecCLAIM
Definition: TER.h:259
ripple::temBAD_EXPIRATION
@ temBAD_EXPIRATION
Definition: TER.h:89
ripple::temBAD_SEND_XRP_LIMIT
@ temBAD_SEND_XRP_LIMIT
Definition: TER.h:97
ostream
ripple::telCAN_NOT_QUEUE_BALANCE
@ telCAN_NOT_QUEUE_BALANCE
Definition: TER.h:59
ripple::tecINSUF_RESERVE_OFFER
@ tecINSUF_RESERVE_OFFER
Definition: TER.h:267
ripple::temXCHAIN_BRIDGE_NONDOOR_OWNER
@ temXCHAIN_BRIDGE_NONDOOR_OWNER
Definition: TER.h:132
ripple::tesSUCCESS
@ tesSUCCESS
Definition: TER.h:233
ripple::tecXCHAIN_NO_SIGNERS_LIST
@ tecXCHAIN_NO_SIGNERS_LIST
Definition: TER.h:322
ripple::temBAD_NFTOKEN_TRANSFER_FEE
@ temBAD_NFTOKEN_TRANSFER_FEE
Definition: TER.h:125
ripple::isTemMalformed
bool isTemMalformed(TER x)
Definition: TER.h:615
ripple::temBAD_WEIGHT
@ temBAD_WEIGHT
Definition: TER.h:115
ripple::tecNO_DST
@ tecNO_DST
Definition: TER.h:268
ripple::temINVALID
@ temINVALID
Definition: TER.h:108
ripple::TERSubset::operator=
constexpr TERSubset & operator=(TERSubset const &rhs)=default
ripple::tecAMM_ACCOUNT
@ tecAMM_ACCOUNT
Definition: TER.h:312
ripple::telCAN_NOT_QUEUE_BLOCKED
@ telCAN_NOT_QUEUE_BLOCKED
Definition: TER.h:61
Json::Value
Represents a JSON value.
Definition: json_value.h:145
ripple::tefBAD_SIGNATURE
@ tefBAD_SIGNATURE
Definition: TER.h:170
ripple::tecCRYPTOCONDITION_ERROR
@ tecCRYPTOCONDITION_ERROR
Definition: TER.h:290
ripple::tecXCHAIN_INSUFF_CREATE_AMOUNT
@ tecXCHAIN_INSUFF_CREATE_AMOUNT
Definition: TER.h:324
string