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 terNO_DELEGATE_PERMISSION, // Delegate does not have permission
231};
232
233//------------------------------------------------------------------------------
234
236 // Note: Exact number must stay stable. This code is stored by value
237 // in metadata for historic transactions.
238
239 // 0: S Success (success)
240 // Causes:
241 // - Success.
242 // Implications:
243 // - Applied
244 // - Forwarded
245 tesSUCCESS = 0
247
248//------------------------------------------------------------------------------
249
251 // Note: Exact numbers must stay stable. These codes are stored by
252 // value in metadata for historic transactions.
253
254 // 100 .. 255 C
255 // Claim fee only (ripple transaction with no good paths, pay to
256 // non-existent account, no path)
257 //
258 // Causes:
259 // - Success, but does not achieve optimal result.
260 // - Invalid transaction or no effect, but claim fee to use the sequence
261 // number.
262 //
263 // Implications:
264 // - Applied
265 // - Forwarded
266 //
267 // Only allowed as a return code of appliedTransaction when !tapRETRY.
268 // Otherwise, treated as terRETRY.
269 //
270 // DO NOT CHANGE THESE NUMBERS: They appear in ledger meta data.
271 //
272 // Note:
273 // tecNO_ENTRY is often used interchangeably with tecOBJECT_NOT_FOUND.
274 // While there does not seem to be a clear rule which to use when, the
275 // following guidance will help to keep errors consistent with the
276 // majority of (but not all) transaction types:
277 // - tecNO_ENTRY : cannot find the primary ledger object on which the
278 // transaction is being attempted
279 // - tecOBJECT_NOT_FOUND : cannot find the additional object(s) needed to
280 // complete the transaction
281
282 tecCLAIM = 100,
284 tecUNFUNDED_ADD = 102, // Unused legacy code
320 tecHOOK_REJECTED [[maybe_unused]] = 153,
365 // DEPRECATED: This error code tecNO_DELEGATE_PERMISSION is reserved for
366 // backward compatibility with historical data on non-prod networks, can be
367 // reclaimed after those networks reset.
369};
370
371//------------------------------------------------------------------------------
372
373// For generic purposes, a free function that returns the value of a TE*codes.
374constexpr TERUnderlyingType
376{
377 return safe_cast<TERUnderlyingType>(v);
378}
379
380constexpr TERUnderlyingType
382{
383 return safe_cast<TERUnderlyingType>(v);
384}
385
386constexpr TERUnderlyingType
388{
389 return safe_cast<TERUnderlyingType>(v);
390}
391
392constexpr TERUnderlyingType
394{
395 return safe_cast<TERUnderlyingType>(v);
396}
397
398constexpr TERUnderlyingType
400{
401 return safe_cast<TERUnderlyingType>(v);
402}
403
404constexpr TERUnderlyingType
406{
407 return safe_cast<TERUnderlyingType>(v);
408}
409
410//------------------------------------------------------------------------------
411// Template class that is specific to selected ranges of error codes. The
412// Trait tells std::enable_if which ranges are allowed.
413template <template <typename> class Trait>
415{
417
418public:
419 // Constructors
421 {
422 }
423 constexpr TERSubset(TERSubset const& rhs) = default;
424 constexpr TERSubset(TERSubset&& rhs) = default;
425
426private:
427 constexpr explicit TERSubset(int rhs) : code_(rhs)
428 {
429 }
430
431public:
432 static constexpr TERSubset
433 fromInt(int from)
434 {
435 return TERSubset(from);
436 }
437
438 // Trait tells enable_if which types are allowed for construction.
439 template <
440 typename T,
441 typename = std::enable_if_t<
442 Trait<std::remove_cv_t<std::remove_reference_t<T>>>::value>>
443 constexpr TERSubset(T rhs) : code_(TERtoInt(rhs))
444 {
445 }
446
447 // Assignment
448 constexpr TERSubset&
449 operator=(TERSubset const& rhs) = default;
450 constexpr TERSubset&
451 operator=(TERSubset&& rhs) = default;
452
453 // Trait tells enable_if which types are allowed for assignment.
454 template <typename T>
455 constexpr auto
457 {
458 code_ = TERtoInt(rhs);
459 return *this;
460 }
461
462 // Conversion to bool.
463 explicit
464 operator bool() const
465 {
466 return code_ != tesSUCCESS;
467 }
468
469 // Conversion to Json::Value allows assignment to Json::Objects
470 // without casting.
471 operator Json::Value() const
472 {
473 return Json::Value{code_};
474 }
475
476 // Streaming operator.
478 operator<<(std::ostream& os, TERSubset const& rhs)
479 {
480 return os << rhs.code_;
481 }
482
483 // Return the underlying value. Not a member so similarly named free
484 // functions can do the same work for the enums.
485 //
486 // It's worth noting that an explicit conversion operator was considered
487 // and rejected. Consider this case, taken from Status.h
488 //
489 // class Status {
490 // int code_;
491 // public:
492 // Status (TER ter)
493 // : code_ (ter) {}
494 // }
495 //
496 // This code compiles with no errors or warnings if TER has an explicit
497 // (unnamed) conversion to int. To avoid silent conversions like these
498 // we provide (only) a named conversion.
499 friend constexpr TERUnderlyingType
501 {
502 return v.code_;
503 }
504};
505
506// Comparison operators.
507// Only enabled if both arguments return int if TERtiInt is called with them.
508template <typename L, typename R>
509constexpr auto
510operator==(L const& lhs, R const& rhs)
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
519template <typename L, typename R>
520constexpr auto
521operator!=(L const& lhs, R const& rhs)
523 std::is_same<decltype(TERtoInt(lhs)), int>::value &&
524 std::is_same<decltype(TERtoInt(rhs)), int>::value,
525 bool>
526{
527 return TERtoInt(lhs) != TERtoInt(rhs);
528}
529
530template <typename L, typename R>
531constexpr auto
532operator<(L const& lhs, R const& rhs)
534 std::is_same<decltype(TERtoInt(lhs)), int>::value &&
535 std::is_same<decltype(TERtoInt(rhs)), int>::value,
536 bool>
537{
538 return TERtoInt(lhs) < TERtoInt(rhs);
539}
540
541template <typename L, typename R>
542constexpr auto
543operator<=(L const& lhs, R const& rhs)
545 std::is_same<decltype(TERtoInt(lhs)), int>::value &&
546 std::is_same<decltype(TERtoInt(rhs)), int>::value,
547 bool>
548{
549 return TERtoInt(lhs) <= TERtoInt(rhs);
550}
551
552template <typename L, typename R>
553constexpr auto
554operator>(L const& lhs, R const& rhs)
556 std::is_same<decltype(TERtoInt(lhs)), int>::value &&
557 std::is_same<decltype(TERtoInt(rhs)), int>::value,
558 bool>
559{
560 return TERtoInt(lhs) > TERtoInt(rhs);
561}
562
563template <typename L, typename R>
564constexpr auto
565operator>=(L const& lhs, R const& rhs)
567 std::is_same<decltype(TERtoInt(lhs)), int>::value &&
568 std::is_same<decltype(TERtoInt(rhs)), int>::value,
569 bool>
570{
571 return TERtoInt(lhs) >= TERtoInt(rhs);
572}
573
574//------------------------------------------------------------------------------
575
576// Use traits to build a TERSubset that can convert from any of the TE*codes
577// enums *except* TECcodes: NotTEC
578
579// NOTE: NotTEC is useful for codes returned by preflight in transactors.
580// Preflight checks occur prior to signature checking. If preflight returned
581// a tec code, then a malicious user could submit a transaction with a very
582// large fee and have that fee charged against an account without using that
583// account's valid signature.
584template <typename FROM>
586{
587};
588template <>
590{
591};
592template <>
594{
595};
596template <>
598{
599};
600template <>
602{
603};
604template <>
606{
607};
608
610
611//------------------------------------------------------------------------------
612
613// Use traits to build a TERSubset that can convert from any of the TE*codes
614// enums as well as from NotTEC.
615template <typename FROM>
617{
618};
619template <>
621{
622};
623template <>
625{
626};
627template <>
629{
630};
631template <>
633{
634};
635template <>
637{
638};
639template <>
641{
642};
643template <>
645{
646};
647
648// TER allows all of the subsets.
650
651//------------------------------------------------------------------------------
652
653inline bool
654isTelLocal(TER x) noexcept
655{
656 return (x >= telLOCAL_ERROR && x < temMALFORMED);
657}
658
659inline bool
661{
662 return (x >= temMALFORMED && x < tefFAILURE);
663}
664
665inline bool
666isTefFailure(TER x) noexcept
667{
668 return (x >= tefFAILURE && x < terRETRY);
669}
670
671inline bool
672isTerRetry(TER x) noexcept
673{
674 return (x >= terRETRY && x < tesSUCCESS);
675}
676
677inline bool
678isTesSuccess(TER x) noexcept
679{
680 // Makes use of TERSubset::operator bool()
681 return !(x);
682}
683
684inline bool
685isTecClaim(TER x) noexcept
686{
687 return ((x) >= tecCLAIM);
688}
689
694
695bool
696transResultInfo(TER code, std::string& token, std::string& text);
697
699transToken(TER code);
700
702transHuman(TER code);
703
705transCode(std::string const& token);
706
707} // namespace ripple
708
709#endif
Represents a JSON value.
Definition json_value.h:149
constexpr TERSubset()
Definition TER.h:420
constexpr TERSubset(TERSubset const &rhs)=default
TERUnderlyingType code_
Definition TER.h:416
constexpr TERSubset & operator=(TERSubset const &rhs)=default
constexpr TERSubset(T rhs)
Definition TER.h:443
friend constexpr TERUnderlyingType TERtoInt(TERSubset v)
Definition TER.h:500
constexpr TERSubset(int rhs)
Definition TER.h:427
constexpr auto operator=(T rhs) -> std::enable_if_t< Trait< T >::value, TERSubset & >
Definition TER.h:456
constexpr TERSubset(TERSubset &&rhs)=default
static constexpr TERSubset fromInt(int from)
Definition TER.h:433
friend std::ostream & operator<<(std::ostream &os, TERSubset const &rhs)
Definition TER.h:478
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:666
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:250
@ tecNO_LINE_REDUNDANT
Definition TER.h:294
@ tecNO_DELEGATE_PERMISSION
Definition TER.h:368
@ tecNO_ENTRY
Definition TER.h:307
@ tecCRYPTOCONDITION_ERROR
Definition TER.h:313
@ tecPSEUDO_ACCOUNT
Definition TER.h:363
@ tecNO_SUITABLE_NFTOKEN_PAGE
Definition TER.h:322
@ tecNO_DST
Definition TER.h:291
@ tecHOOK_REJECTED
Definition TER.h:320
@ tecNO_LINE_INSUF_RESERVE
Definition TER.h:293
@ tecNEED_MASTER_KEY
Definition TER.h:309
@ tecINSUFF_FEE
Definition TER.h:303
@ tecXCHAIN_SELF_COMMIT
Definition TER.h:351
@ tecXCHAIN_WRONG_CHAIN
Definition TER.h:343
@ tecLIMIT_EXCEEDED
Definition TER.h:362
@ tecXCHAIN_INSUFF_CREATE_AMOUNT
Definition TER.h:347
@ tecXCHAIN_CREATE_ACCOUNT_DISABLED
Definition TER.h:353
@ tecINSUF_RESERVE_LINE
Definition TER.h:289
@ tecOBJECT_NOT_FOUND
Definition TER.h:327
@ tecINSUF_RESERVE_OFFER
Definition TER.h:290
@ tecNO_ISSUER
Definition TER.h:300
@ tecUNFUNDED
Definition TER.h:296
@ tecXCHAIN_NO_CLAIM_ID
Definition TER.h:338
@ tecTOO_SOON
Definition TER.h:319
@ tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE
Definition TER.h:342
@ tecNO_TARGET
Definition TER.h:305
@ tecDIR_FULL
Definition TER.h:288
@ tecNO_REGULAR_KEY
Definition TER.h:298
@ tecINCOMPLETE
Definition TER.h:336
@ tecNFTOKEN_OFFER_TYPE_MISMATCH
Definition TER.h:324
@ tecXCHAIN_PAYMENT_FAILED
Definition TER.h:350
@ tecUNFUNDED_OFFER
Definition TER.h:285
@ tecFROZEN
Definition TER.h:304
@ tecXCHAIN_CLAIM_NO_QUORUM
Definition TER.h:340
@ tecAMM_EMPTY
Definition TER.h:333
@ tecUNFUNDED_ADD
Definition TER.h:284
@ tecOWNERS
Definition TER.h:299
@ tecKILLED
Definition TER.h:317
@ tecXCHAIN_BAD_CLAIM_ID
Definition TER.h:339
@ tecXCHAIN_PROOF_UNKNOWN_KEY
Definition TER.h:341
@ tecDUPLICATE
Definition TER.h:316
@ tecINSUFFICIENT_FUNDS
Definition TER.h:326
@ tecNFTOKEN_BUY_SELL_MISMATCH
Definition TER.h:323
@ tecXCHAIN_ACCOUNT_CREATE_PAST
Definition TER.h:348
@ tecINTERNAL
Definition TER.h:311
@ tecBAD_CREDENTIALS
Definition TER.h:360
@ tecXCHAIN_BAD_TRANSFER_ISSUE
Definition TER.h:337
@ tecNO_PERMISSION
Definition TER.h:306
@ tecDST_TAG_NEEDED
Definition TER.h:310
@ tecPRECISION_LOSS
Definition TER.h:364
@ tecHAS_OBLIGATIONS
Definition TER.h:318
@ tecINVARIANT_FAILED
Definition TER.h:314
@ tecAMM_NOT_EMPTY
Definition TER.h:334
@ tecOVERSIZE
Definition TER.h:312
@ tecARRAY_TOO_LARGE
Definition TER.h:358
@ tecWRONG_ASSET
Definition TER.h:361
@ tecXCHAIN_REWARD_MISMATCH
Definition TER.h:344
@ tecCLAIM
Definition TER.h:282
@ tecINVALID_UPDATE_TIME
Definition TER.h:355
@ tecPATH_PARTIAL
Definition TER.h:283
@ tecUNFUNDED_AMM
Definition TER.h:329
@ tecAMM_ACCOUNT
Definition TER.h:335
@ tecAMM_FAILED
Definition TER.h:331
@ tecNO_LINE
Definition TER.h:302
@ tecMAX_SEQUENCE_REACHED
Definition TER.h:321
@ tecXCHAIN_SENDING_ACCOUNT_MISMATCH
Definition TER.h:346
@ tecINSUFFICIENT_PAYMENT
Definition TER.h:328
@ tecEMPTY_DID
Definition TER.h:354
@ tecNO_ALTERNATIVE_KEY
Definition TER.h:297
@ tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR
Definition TER.h:352
@ tecUNFUNDED_PAYMENT
Definition TER.h:286
@ tecPATH_DRY
Definition TER.h:295
@ tecXCHAIN_NO_SIGNERS_LIST
Definition TER.h:345
@ tecAMM_INVALID_TOKENS
Definition TER.h:332
@ tecAMM_BALANCE
Definition TER.h:330
@ tecINSUFFICIENT_RESERVE
Definition TER.h:308
@ tecARRAY_EMPTY
Definition TER.h:357
@ tecXCHAIN_ACCOUNT_CREATE_TOO_MANY
Definition TER.h:349
@ tecCANT_ACCEPT_OWN_NFTOKEN_OFFER
Definition TER.h:325
@ tecFAILED_PROCESSING
Definition TER.h:287
@ tecEXPIRED
Definition TER.h:315
@ tecTOKEN_PAIR_NOT_FOUND
Definition TER.h:356
@ tecNO_DST_INSUF_XRP
Definition TER.h:292
@ tecNO_AUTH
Definition TER.h:301
@ tecLOCKED
Definition TER.h:359
bool isTerRetry(TER x) noexcept
Definition TER.h:672
TEScodes
Definition TER.h:235
@ tesSUCCESS
Definition TER.h:245
bool operator<(Slice const &lhs, Slice const &rhs) noexcept
Definition Slice.h:223
bool isTesSuccess(TER x) noexcept
Definition TER.h:678
constexpr TERUnderlyingType TERtoInt(TELcodes v)
Definition TER.h:375
bool isTemMalformed(TER x) noexcept
Definition TER.h:660
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_DELEGATE_PERMISSION
Definition TER.h:230
@ terNO_LINE
Definition TER.h:219
TERSubset< CanCvtToTER > TER
Definition TER.h:649
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:685
bool isTelLocal(TER x) noexcept
Definition TER.h:654
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