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 };
129 
130 //------------------------------------------------------------------------------
131 
133  // Note: Range is stable.
134  // Exact numbers are used in ripple-binary-codec:
135  // https://github.com/ripple/ripple-binary-codec/blob/master/src/enums/definitions.json
136  // Use tokens.
137 
138  // -199 .. -100: F
139  // Failure (sequence number previously used)
140  //
141  // Causes:
142  // - Transaction cannot succeed because of ledger state.
143  // - Unexpected ledger state.
144  // - C++ exception.
145  //
146  // Implications:
147  // - Not applied
148  // - Not forwarded
149  // - Could succeed in an imagined ledger.
150  tefFAILURE = -199,
158  tefNO_AUTH_REQUIRED, // Can't set auth if auth is not required.
171 };
172 
173 //------------------------------------------------------------------------------
174 
176  // Note: Range is stable.
177  // Exact numbers are used in ripple-binary-codec:
178  // https://github.com/ripple/ripple-binary-codec/blob/master/src/enums/definitions.json
179  // Use tokens.
180 
181  // -99 .. -1: R Retry
182  // sequence too high, no funds for txn fee, originating -account
183  // non-existent
184  //
185  // Cause:
186  // Prior application of another, possibly non-existent, transaction could
187  // allow this transaction to succeed.
188  //
189  // Implications:
190  // - Not applied
191  // - May be forwarded
192  // - Results indicating the txn was forwarded: terQUEUED
193  // - All others are not forwarded.
194  // - Might succeed later
195  // - Hold
196  // - Makes hole in sequence which jams transactions.
197  terRETRY = -99,
198  terFUNDS_SPENT, // DEPRECATED.
199  terINSUF_FEE_B, // Can't pay fee, therefore don't burden network.
200  terNO_ACCOUNT, // Can't pay fee, therefore don't burden network.
201  terNO_AUTH, // Not authorized to hold IOUs.
202  terNO_LINE, // Internal flag.
203  terOWNERS, // Can't succeed with non-zero owner count.
204  terPRE_SEQ, // Can't pay fee, no point in forwarding, so don't
205  // burden network.
206  terLAST, // DEPRECATED.
207  terNO_RIPPLE, // Rippling not allowed
208  terQUEUED, // Transaction is being held in TxQ until fee drops
209  terPRE_TICKET, // Ticket is not yet in ledger but might be on its way
210  terNO_AMM, // AMM doesn't exist for the asset pair
211 };
212 
213 //------------------------------------------------------------------------------
214 
216  // Note: Exact number must stay stable. This code is stored by value
217  // in metadata for historic transactions.
218 
219  // 0: S Success (success)
220  // Causes:
221  // - Success.
222  // Implications:
223  // - Applied
224  // - Forwarded
226 };
227 
228 //------------------------------------------------------------------------------
229 
231  // Note: Exact numbers must stay stable. These codes are stored by
232  // value in metadata for historic transactions.
233 
234  // 100 .. 255 C
235  // Claim fee only (ripple transaction with no good paths, pay to
236  // non-existent account, no path)
237  //
238  // Causes:
239  // - Success, but does not achieve optimal result.
240  // - Invalid transaction or no effect, but claim fee to use the sequence
241  // number.
242  //
243  // Implications:
244  // - Applied
245  // - Forwarded
246  //
247  // Only allowed as a return code of appliedTransaction when !tapRETRY.
248  // Otherwise, treated as terRETRY.
249  //
250  // DO NOT CHANGE THESE NUMBERS: They appear in ledger meta data.
251  tecCLAIM = 100,
253  tecUNFUNDED_ADD = 102, // Unused legacy code
257  tecDIR_FULL = 121,
260  tecNO_DST = 124,
264  tecPATH_DRY = 128,
265  tecUNFUNDED = 129,
268  tecOWNERS = 132,
270  tecNO_AUTH = 134,
271  tecNO_LINE = 135,
273  tecFROZEN = 137,
276  tecNO_ENTRY = 140,
280  tecINTERNAL = 144,
281  tecOVERSIZE = 145,
284  tecEXPIRED = 148,
286  tecKILLED = 150,
288  tecTOO_SOON = 152,
289  tecHOOK_ERROR [[maybe_unused]] = 153,
306 };
307 
308 //------------------------------------------------------------------------------
309 
310 // For generic purposes, a free function that returns the value of a TE*codes.
311 constexpr TERUnderlyingType
313 {
314  return safe_cast<TERUnderlyingType>(v);
315 }
316 
317 constexpr TERUnderlyingType
319 {
320  return safe_cast<TERUnderlyingType>(v);
321 }
322 
323 constexpr TERUnderlyingType
325 {
326  return safe_cast<TERUnderlyingType>(v);
327 }
328 
329 constexpr TERUnderlyingType
331 {
332  return safe_cast<TERUnderlyingType>(v);
333 }
334 
335 constexpr TERUnderlyingType
337 {
338  return safe_cast<TERUnderlyingType>(v);
339 }
340 
341 constexpr TERUnderlyingType
343 {
344  return safe_cast<TERUnderlyingType>(v);
345 }
346 
347 //------------------------------------------------------------------------------
348 // Template class that is specific to selected ranges of error codes. The
349 // Trait tells std::enable_if which ranges are allowed.
350 template <template <typename> class Trait>
352 {
354 
355 public:
356  // Constructors
357  constexpr TERSubset() : code_(tesSUCCESS)
358  {
359  }
360  constexpr TERSubset(TERSubset const& rhs) = default;
361  constexpr TERSubset(TERSubset&& rhs) = default;
362 
363 private:
364  constexpr explicit TERSubset(int rhs) : code_(rhs)
365  {
366  }
367 
368 public:
369  static constexpr TERSubset
370  fromInt(int from)
371  {
372  return TERSubset(from);
373  }
374 
375  // Trait tells enable_if which types are allowed for construction.
376  template <
377  typename T,
378  typename = std::enable_if_t<
379  Trait<std::remove_cv_t<std::remove_reference_t<T>>>::value>>
380  constexpr TERSubset(T rhs) : code_(TERtoInt(rhs))
381  {
382  }
383 
384  // Assignment
385  constexpr TERSubset&
386  operator=(TERSubset const& rhs) = default;
387  constexpr TERSubset&
388  operator=(TERSubset&& rhs) = default;
389 
390  // Trait tells enable_if which types are allowed for assignment.
391  template <typename T>
392  constexpr auto
394  {
395  code_ = TERtoInt(rhs);
396  return *this;
397  }
398 
399  // Conversion to bool.
400  explicit operator bool() const
401  {
402  return code_ != tesSUCCESS;
403  }
404 
405  // Conversion to Json::Value allows assignment to Json::Objects
406  // without casting.
407  operator Json::Value() const
408  {
409  return Json::Value{code_};
410  }
411 
412  // Streaming operator.
413  friend std::ostream&
415  {
416  return os << rhs.code_;
417  }
418 
419  // Return the underlying value. Not a member so similarly named free
420  // functions can do the same work for the enums.
421  //
422  // It's worth noting that an explicit conversion operator was considered
423  // and rejected. Consider this case, taken from Status.h
424  //
425  // class Status {
426  // int code_;
427  // public:
428  // Status (TER ter)
429  // : code_ (ter) {}
430  // }
431  //
432  // This code compiles with no errors or warnings if TER has an explicit
433  // (unnamed) conversion to int. To avoid silent conversions like these
434  // we provide (only) a named conversion.
435  friend constexpr TERUnderlyingType
437  {
438  return v.code_;
439  }
440 };
441 
442 // Comparison operators.
443 // Only enabled if both arguments return int if TERtiInt is called with them.
444 template <typename L, typename R>
445 constexpr auto
446 operator==(L const& lhs, R const& rhs) -> std::enable_if_t<
447  std::is_same<decltype(TERtoInt(lhs)), int>::value &&
448  std::is_same<decltype(TERtoInt(rhs)), int>::value,
449  bool>
450 {
451  return TERtoInt(lhs) == TERtoInt(rhs);
452 }
453 
454 template <typename L, typename R>
455 constexpr auto
456 operator!=(L const& lhs, R const& rhs) -> std::enable_if_t<
457  std::is_same<decltype(TERtoInt(lhs)), int>::value &&
458  std::is_same<decltype(TERtoInt(rhs)), int>::value,
459  bool>
460 {
461  return TERtoInt(lhs) != TERtoInt(rhs);
462 }
463 
464 template <typename L, typename R>
465 constexpr auto
466 operator<(L const& lhs, R const& rhs) -> std::enable_if_t<
467  std::is_same<decltype(TERtoInt(lhs)), int>::value &&
468  std::is_same<decltype(TERtoInt(rhs)), int>::value,
469  bool>
470 {
471  return TERtoInt(lhs) < TERtoInt(rhs);
472 }
473 
474 template <typename L, typename R>
475 constexpr auto
476 operator<=(L const& lhs, R const& rhs) -> std::enable_if_t<
477  std::is_same<decltype(TERtoInt(lhs)), int>::value &&
478  std::is_same<decltype(TERtoInt(rhs)), int>::value,
479  bool>
480 {
481  return TERtoInt(lhs) <= TERtoInt(rhs);
482 }
483 
484 template <typename L, typename R>
485 constexpr auto
486 operator>(L const& lhs, R const& rhs) -> std::enable_if_t<
487  std::is_same<decltype(TERtoInt(lhs)), int>::value &&
488  std::is_same<decltype(TERtoInt(rhs)), int>::value,
489  bool>
490 {
491  return TERtoInt(lhs) > TERtoInt(rhs);
492 }
493 
494 template <typename L, typename R>
495 constexpr auto
496 operator>=(L const& lhs, R const& rhs) -> std::enable_if_t<
497  std::is_same<decltype(TERtoInt(lhs)), int>::value &&
498  std::is_same<decltype(TERtoInt(rhs)), int>::value,
499  bool>
500 {
501  return TERtoInt(lhs) >= TERtoInt(rhs);
502 }
503 
504 //------------------------------------------------------------------------------
505 
506 // Use traits to build a TERSubset that can convert from any of the TE*codes
507 // enums *except* TECcodes: NotTEC
508 
509 // NOTE: NotTEC is useful for codes returned by preflight in transactors.
510 // Preflight checks occur prior to signature checking. If preflight returned
511 // a tec code, then a malicious user could submit a transaction with a very
512 // large fee and have that fee charged against an account without using that
513 // account's valid signature.
514 template <typename FROM>
516 {
517 };
518 template <>
520 {
521 };
522 template <>
524 {
525 };
526 template <>
528 {
529 };
530 template <>
532 {
533 };
534 template <>
536 {
537 };
538 
540 
541 //------------------------------------------------------------------------------
542 
543 // Use traits to build a TERSubset that can convert from any of the TE*codes
544 // enums as well as from NotTEC.
545 template <typename FROM>
547 {
548 };
549 template <>
551 {
552 };
553 template <>
555 {
556 };
557 template <>
559 {
560 };
561 template <>
563 {
564 };
565 template <>
567 {
568 };
569 template <>
571 {
572 };
573 template <>
575 {
576 };
577 
578 // TER allows all of the subsets.
580 
581 //------------------------------------------------------------------------------
582 
583 inline bool
585 {
586  return ((x) >= telLOCAL_ERROR && (x) < temMALFORMED);
587 }
588 
589 inline bool
591 {
592  return ((x) >= temMALFORMED && (x) < tefFAILURE);
593 }
594 
595 inline bool
597 {
598  return ((x) >= tefFAILURE && (x) < terRETRY);
599 }
600 
601 inline bool
603 {
604  return ((x) >= terRETRY && (x) < tesSUCCESS);
605 }
606 
607 inline bool
609 {
610  return ((x) == tesSUCCESS);
611 }
612 
613 inline bool
615 {
616  return ((x) >= tecCLAIM);
617 }
618 
619 bool
620 transResultInfo(TER code, std::string& token, std::string& text);
621 
623 transToken(TER code);
624 
626 transHuman(TER code);
627 
629 transCode(std::string const& token);
630 
631 } // namespace ripple
632 
633 #endif
ripple::tecUNFUNDED_OFFER
@ tecUNFUNDED_OFFER
Definition: TER.h:254
ripple::tefNO_TICKET
@ tefNO_TICKET
Definition: TER.h:169
ripple::terPRE_TICKET
@ terPRE_TICKET
Definition: TER.h:209
ripple::tecOBJECT_NOT_FOUND
@ tecOBJECT_NOT_FOUND
Definition: TER.h:296
std::is_same
ripple::tecFROZEN
@ tecFROZEN
Definition: TER.h:273
ripple::tecUNFUNDED_AMM
@ tecUNFUNDED_AMM
Definition: TER.h:298
std::false_type
ripple::tecNO_TARGET
@ tecNO_TARGET
Definition: TER.h:274
ripple::temBAD_SEND_XRP_MAX
@ temBAD_SEND_XRP_MAX
Definition: TER.h:98
ripple::tefINTERNAL
@ tefINTERNAL
Definition: TER.h:157
ripple::tecINVARIANT_FAILED
@ tecINVARIANT_FAILED
Definition: TER.h:283
ripple::tecINSUF_RESERVE_LINE
@ tecINSUF_RESERVE_LINE
Definition: TER.h:258
std::string
STL class.
ripple::temBAD_OFFER
@ temBAD_OFFER
Definition: TER.h:93
ripple::TERSubset::code_
TERUnderlyingType code_
Definition: TER.h:353
ripple::tefBAD_ADD_AUTH
@ tefBAD_ADD_AUTH
Definition: TER.h:152
ripple::terINSUF_FEE_B
@ terINSUF_FEE_B
Definition: TER.h:199
ripple::temBAD_CURRENCY
@ temBAD_CURRENCY
Definition: TER.h:88
ripple::TEScodes
TEScodes
Definition: TER.h:215
ripple::TERSubset::operator<<
friend std::ostream & operator<<(std::ostream &os, TERSubset const &rhs)
Definition: TER.h:414
ripple::terNO_LINE
@ terNO_LINE
Definition: TER.h:202
ripple::tecOWNERS
@ tecOWNERS
Definition: TER.h:268
ripple::isTesSuccess
bool isTesSuccess(TER x)
Definition: TER.h:608
ripple::telLOCAL_ERROR
@ telLOCAL_ERROR
Definition: TER.h:51
ripple::tecINSUFFICIENT_FUNDS
@ tecINSUFFICIENT_FUNDS
Definition: TER.h:295
ripple::tefINVARIANT_FAILED
@ tefINVARIANT_FAILED
Definition: TER.h:167
ripple::tecNO_REGULAR_KEY
@ tecNO_REGULAR_KEY
Definition: TER.h:267
ripple::telCAN_NOT_QUEUE_FEE
@ telCAN_NOT_QUEUE_FEE
Definition: TER.h:62
ripple::TECcodes
TECcodes
Definition: TER.h:230
ripple::temBAD_REGKEY
@ temBAD_REGKEY
Definition: TER.h:96
ripple::telBAD_DOMAIN
@ telBAD_DOMAIN
Definition: TER.h:52
ripple::tecHOOK_ERROR
@ tecHOOK_ERROR
Definition: TER.h:289
ripple::CanCvtToNotTEC
Definition: TER.h:515
ripple::tecDST_TAG_NEEDED
@ tecDST_TAG_NEEDED
Definition: TER.h:279
ripple::TERSubset::TERtoInt
constexpr friend TERUnderlyingType TERtoInt(TERSubset v)
Definition: TER.h:436
ripple::terFUNDS_SPENT
@ terFUNDS_SPENT
Definition: TER.h:198
ripple::temCANNOT_PREAUTH_SELF
@ temCANNOT_PREAUTH_SELF
Definition: TER.h:118
ripple::tecAMM_EMPTY
@ tecAMM_EMPTY
Definition: TER.h:302
ripple::transToken
std::string transToken(TER code)
Definition: TER.cpp:220
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::CanCvtToTER
Definition: TER.h:546
ripple::TERtoInt
constexpr TERUnderlyingType TERtoInt(TELcodes v)
Definition: TER.h:312
ripple::tecCANT_ACCEPT_OWN_NFTOKEN_OFFER
@ tecCANT_ACCEPT_OWN_NFTOKEN_OFFER
Definition: TER.h:294
ripple::terNO_RIPPLE
@ terNO_RIPPLE
Definition: TER.h:207
ripple::temBAD_ISSUER
@ temBAD_ISSUER
Definition: TER.h:91
ripple::tefCREATED
@ tefCREATED
Definition: TER.h:155
ripple::temBAD_TRANSFER_RATE
@ temBAD_TRANSFER_RATE
Definition: TER.h:105
ripple::tecINCOMPLETE
@ tecINCOMPLETE
Definition: TER.h:305
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:614
ripple::tefBAD_AUTH
@ tefBAD_AUTH
Definition: TER.h:153
ripple::tecAMM_FAILED
@ tecAMM_FAILED
Definition: TER.h:300
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:238
ripple::tecKILLED
@ tecKILLED
Definition: TER.h:286
ripple::temUNCERTAIN
@ temUNCERTAIN
Definition: TER.h:121
ripple::terQUEUED
@ terQUEUED
Definition: TER.h:208
ripple::isTerRetry
bool isTerRetry(TER x)
Definition: TER.h:602
ripple::TERSubset::TERSubset
constexpr TERSubset(T rhs)
Definition: TER.h:380
ripple::tefBAD_QUORUM
@ tefBAD_QUORUM
Definition: TER.h:164
ripple::tecOVERSIZE
@ tecOVERSIZE
Definition: TER.h:281
ripple::tecNO_DST_INSUF_XRP
@ tecNO_DST_INSUF_XRP
Definition: TER.h:261
ripple::temINVALID_FLAG
@ temINVALID_FLAG
Definition: TER.h:109
ripple::tecNFTOKEN_OFFER_TYPE_MISMATCH
@ tecNFTOKEN_OFFER_TYPE_MISMATCH
Definition: TER.h:293
ripple::tefBAD_LEDGER
@ tefBAD_LEDGER
Definition: TER.h:154
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:475
ripple::tecAMM_NOT_EMPTY
@ tecAMM_NOT_EMPTY
Definition: TER.h:303
ripple::tecNO_ALTERNATIVE_KEY
@ tecNO_ALTERNATIVE_KEY
Definition: TER.h:266
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:469
ripple::tefMAX_LEDGER
@ tefMAX_LEDGER
Definition: TER.h:162
std::enable_if_t
ripple::tefNFTOKEN_IS_NOT_TRANSFERABLE
@ tefNFTOKEN_IS_NOT_TRANSFERABLE
Definition: TER.h:170
ripple::operator<
bool operator<(CanonicalTXSet::Key const &lhs, CanonicalTXSet::Key const &rhs)
Definition: CanonicalTXSet.cpp:25
ripple::tefMASTER_DISABLED
@ tefMASTER_DISABLED
Definition: TER.h:161
std::ostream
STL class.
ripple::temBAD_LIMIT
@ temBAD_LIMIT
Definition: TER.h:92
ripple::terRETRY
@ terRETRY
Definition: TER.h:197
ripple::temBAD_SIGNER
@ temBAD_SIGNER
Definition: TER.h:113
ripple::tecDUPLICATE
@ tecDUPLICATE
Definition: TER.h:285
ripple::tecAMM_INVALID_TOKENS
@ tecAMM_INVALID_TOKENS
Definition: TER.h:301
ripple::temBAD_SEND_XRP_PATHS
@ temBAD_SEND_XRP_PATHS
Definition: TER.h:101
ripple::TERSubset
Definition: TER.h:351
ripple::terLAST
@ terLAST
Definition: TER.h:206
ripple::tecFAILED_PROCESSING
@ tecFAILED_PROCESSING
Definition: TER.h:256
ripple::isTefFailure
bool isTefFailure(TER x)
Definition: TER.h:596
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:299
ripple::terOWNERS
@ terOWNERS
Definition: TER.h:203
ripple::operator>=
bool operator>=(STAmount const &lhs, STAmount const &rhs)
Definition: STAmount.h:481
ripple::tecUNFUNDED
@ tecUNFUNDED
Definition: TER.h:265
ripple::TER
TERSubset< CanCvtToTER > TER
Definition: TER.h:579
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:201
ripple::telREQUIRES_NETWORK_ID
@ telREQUIRES_NETWORK_ID
Definition: TER.h:65
ripple::tecNO_LINE_REDUNDANT
@ tecNO_LINE_REDUNDANT
Definition: TER.h:263
ripple::tecUNFUNDED_PAYMENT
@ tecUNFUNDED_PAYMENT
Definition: TER.h:255
ripple::tecINTERNAL
@ tecINTERNAL
Definition: TER.h:280
ripple::TERSubset::operator=
constexpr auto operator=(T rhs) -> std::enable_if_t< Trait< T >::value, TERSubset & >
Definition: TER.h:393
ripple::temBAD_AMOUNT
@ temBAD_AMOUNT
Definition: TER.h:87
ripple::tecINSUFF_FEE
@ tecINSUFF_FEE
Definition: TER.h:272
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::temUNKNOWN
@ temUNKNOWN
Definition: TER.h:122
ripple::tecPATH_PARTIAL
@ tecPATH_PARTIAL
Definition: TER.h:252
ripple::temREDUNDANT
@ temREDUNDANT
Definition: TER.h:110
ripple::tefFAILURE
@ tefFAILURE
Definition: TER.h:150
ripple::temBAD_FEE
@ temBAD_FEE
Definition: TER.h:90
ripple::TEFcodes
TEFcodes
Definition: TER.h:132
ripple::telCAN_NOT_QUEUE_BLOCKS
@ telCAN_NOT_QUEUE_BLOCKS
Definition: TER.h:60
ripple::tecNEED_MASTER_KEY
@ tecNEED_MASTER_KEY
Definition: TER.h:278
ripple::TERSubset::TERSubset
constexpr TERSubset(int rhs)
Definition: TER.h:364
ripple::transHuman
std::string transHuman(TER code)
Definition: TER.cpp:229
ripple::tecUNFUNDED_ADD
@ tecUNFUNDED_ADD
Definition: TER.h:253
ripple::tecDIR_FULL
@ tecDIR_FULL
Definition: TER.h:257
ripple::terNO_ACCOUNT
@ terNO_ACCOUNT
Definition: TER.h:200
ripple::tecTOO_SOON
@ tecTOO_SOON
Definition: TER.h:288
ripple::tefNOT_MULTI_SIGNING
@ tefNOT_MULTI_SIGNING
Definition: TER.h:165
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:205
ripple::tefNO_AUTH_REQUIRED
@ tefNO_AUTH_REQUIRED
Definition: TER.h:158
ripple::temINVALID_ACCOUNT_ID
@ temINVALID_ACCOUNT_ID
Definition: TER.h:117
ripple::tecNFTOKEN_BUY_SELL_MISMATCH
@ tecNFTOKEN_BUY_SELL_MISMATCH
Definition: TER.h:292
ripple::tecNO_LINE_INSUF_RESERVE
@ tecNO_LINE_INSUF_RESERVE
Definition: TER.h:262
ripple::tecINSUFFICIENT_PAYMENT
@ tecINSUFFICIENT_PAYMENT
Definition: TER.h:297
ripple::tefPAST_SEQ
@ tefPAST_SEQ
Definition: TER.h:159
ripple::tecNO_LINE
@ tecNO_LINE
Definition: TER.h:271
ripple::temSEQ_AND_TICKET
@ temSEQ_AND_TICKET
Definition: TER.h:124
ripple::tecEXPIRED
@ tecEXPIRED
Definition: TER.h:284
ripple::temDISABLED
@ temDISABLED
Definition: TER.h:112
ripple::tefALREADY
@ tefALREADY
Definition: TER.h:151
ripple::TERSubset::fromInt
static constexpr TERSubset fromInt(int from)
Definition: TER.h:370
ripple::terNO_AMM
@ terNO_AMM
Definition: TER.h:210
ripple::tecNO_ISSUER
@ tecNO_ISSUER
Definition: TER.h:269
ripple::isTelLocal
bool isTelLocal(TER x)
Definition: TER.h:584
ripple::tefTOO_BIG
@ tefTOO_BIG
Definition: TER.h:168
ripple::tecNO_SUITABLE_NFTOKEN_PAGE
@ tecNO_SUITABLE_NFTOKEN_PAGE
Definition: TER.h:291
ripple::tecHAS_OBLIGATIONS
@ tecHAS_OBLIGATIONS
Definition: TER.h:287
ripple::tecNO_PERMISSION
@ tecNO_PERMISSION
Definition: TER.h:275
ripple::tecMAX_SEQUENCE_REACHED
@ tecMAX_SEQUENCE_REACHED
Definition: TER.h:290
ripple::tefWRONG_PRIOR
@ tefWRONG_PRIOR
Definition: TER.h:160
ripple::temRIPPLE_EMPTY
@ temRIPPLE_EMPTY
Definition: TER.h:111
ripple::tecPATH_DRY
@ tecPATH_DRY
Definition: TER.h:264
ripple::telBAD_PUBLIC_KEY
@ telBAD_PUBLIC_KEY
Definition: TER.h:54
ripple::tecINSUFFICIENT_RESERVE
@ tecINSUFFICIENT_RESERVE
Definition: TER.h:277
ripple::TERSubset::TERSubset
constexpr TERSubset()
Definition: TER.h:357
ripple::terPRE_SEQ
@ terPRE_SEQ
Definition: TER.h:204
ripple::TERcodes
TERcodes
Definition: TER.h:175
optional
ripple::tefBAD_AUTH_MASTER
@ tefBAD_AUTH_MASTER
Definition: TER.h:166
ripple::tecNO_ENTRY
@ tecNO_ENTRY
Definition: TER.h:276
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:156
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:270
ripple::tecCLAIM
@ tecCLAIM
Definition: TER.h:251
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:259
ripple::tesSUCCESS
@ tesSUCCESS
Definition: TER.h:225
ripple::temBAD_NFTOKEN_TRANSFER_FEE
@ temBAD_NFTOKEN_TRANSFER_FEE
Definition: TER.h:125
ripple::isTemMalformed
bool isTemMalformed(TER x)
Definition: TER.h:590
ripple::temBAD_WEIGHT
@ temBAD_WEIGHT
Definition: TER.h:115
ripple::tecNO_DST
@ tecNO_DST
Definition: TER.h:260
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:304
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:163
ripple::tecCRYPTOCONDITION_ERROR
@ tecCRYPTOCONDITION_ERROR
Definition: TER.h:282
string