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