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,
363};
364
365//------------------------------------------------------------------------------
366
367// For generic purposes, a free function that returns the value of a TE*codes.
368constexpr TERUnderlyingType
370{
371 return safe_cast<TERUnderlyingType>(v);
372}
373
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
404//------------------------------------------------------------------------------
405// Template class that is specific to selected ranges of error codes. The
406// Trait tells std::enable_if which ranges are allowed.
407template <template <typename> class Trait>
409{
411
412public:
413 // Constructors
415 {
416 }
417 constexpr TERSubset(TERSubset const& rhs) = default;
418 constexpr TERSubset(TERSubset&& rhs) = default;
419
420private:
421 constexpr explicit TERSubset(int rhs) : code_(rhs)
422 {
423 }
424
425public:
426 static constexpr TERSubset
427 fromInt(int from)
428 {
429 return TERSubset(from);
430 }
431
432 // Trait tells enable_if which types are allowed for construction.
433 template <
434 typename T,
435 typename = std::enable_if_t<
436 Trait<std::remove_cv_t<std::remove_reference_t<T>>>::value>>
437 constexpr TERSubset(T rhs) : code_(TERtoInt(rhs))
438 {
439 }
440
441 // Assignment
442 constexpr TERSubset&
443 operator=(TERSubset const& rhs) = default;
444 constexpr TERSubset&
445 operator=(TERSubset&& rhs) = default;
446
447 // Trait tells enable_if which types are allowed for assignment.
448 template <typename T>
449 constexpr auto
451 {
452 code_ = TERtoInt(rhs);
453 return *this;
454 }
455
456 // Conversion to bool.
457 explicit
458 operator bool() const
459 {
460 return code_ != tesSUCCESS;
461 }
462
463 // Conversion to Json::Value allows assignment to Json::Objects
464 // without casting.
465 operator Json::Value() const
466 {
467 return Json::Value{code_};
468 }
469
470 // Streaming operator.
472 operator<<(std::ostream& os, TERSubset const& rhs)
473 {
474 return os << rhs.code_;
475 }
476
477 // Return the underlying value. Not a member so similarly named free
478 // functions can do the same work for the enums.
479 //
480 // It's worth noting that an explicit conversion operator was considered
481 // and rejected. Consider this case, taken from Status.h
482 //
483 // class Status {
484 // int code_;
485 // public:
486 // Status (TER ter)
487 // : code_ (ter) {}
488 // }
489 //
490 // This code compiles with no errors or warnings if TER has an explicit
491 // (unnamed) conversion to int. To avoid silent conversions like these
492 // we provide (only) a named conversion.
493 friend constexpr TERUnderlyingType
495 {
496 return v.code_;
497 }
498};
499
500// Comparison operators.
501// Only enabled if both arguments return int if TERtiInt is called with them.
502template <typename L, typename R>
503constexpr auto
504operator==(L const& lhs, R const& rhs)
506 std::is_same<decltype(TERtoInt(lhs)), int>::value &&
507 std::is_same<decltype(TERtoInt(rhs)), int>::value,
508 bool>
509{
510 return TERtoInt(lhs) == TERtoInt(rhs);
511}
512
513template <typename L, typename R>
514constexpr auto
515operator!=(L const& lhs, R const& rhs)
517 std::is_same<decltype(TERtoInt(lhs)), int>::value &&
518 std::is_same<decltype(TERtoInt(rhs)), int>::value,
519 bool>
520{
521 return TERtoInt(lhs) != TERtoInt(rhs);
522}
523
524template <typename L, typename R>
525constexpr auto
526operator<(L const& lhs, R const& rhs)
528 std::is_same<decltype(TERtoInt(lhs)), int>::value &&
529 std::is_same<decltype(TERtoInt(rhs)), int>::value,
530 bool>
531{
532 return TERtoInt(lhs) < TERtoInt(rhs);
533}
534
535template <typename L, typename R>
536constexpr auto
537operator<=(L const& lhs, R const& rhs)
539 std::is_same<decltype(TERtoInt(lhs)), int>::value &&
540 std::is_same<decltype(TERtoInt(rhs)), int>::value,
541 bool>
542{
543 return TERtoInt(lhs) <= TERtoInt(rhs);
544}
545
546template <typename L, typename R>
547constexpr auto
548operator>(L const& lhs, R const& rhs)
550 std::is_same<decltype(TERtoInt(lhs)), int>::value &&
551 std::is_same<decltype(TERtoInt(rhs)), int>::value,
552 bool>
553{
554 return TERtoInt(lhs) > TERtoInt(rhs);
555}
556
557template <typename L, typename R>
558constexpr auto
559operator>=(L const& lhs, R const& rhs)
561 std::is_same<decltype(TERtoInt(lhs)), int>::value &&
562 std::is_same<decltype(TERtoInt(rhs)), int>::value,
563 bool>
564{
565 return TERtoInt(lhs) >= TERtoInt(rhs);
566}
567
568//------------------------------------------------------------------------------
569
570// Use traits to build a TERSubset that can convert from any of the TE*codes
571// enums *except* TECcodes: NotTEC
572
573// NOTE: NotTEC is useful for codes returned by preflight in transactors.
574// Preflight checks occur prior to signature checking. If preflight returned
575// a tec code, then a malicious user could submit a transaction with a very
576// large fee and have that fee charged against an account without using that
577// account's valid signature.
578template <typename FROM>
580{
581};
582template <>
584{
585};
586template <>
588{
589};
590template <>
592{
593};
594template <>
596{
597};
598template <>
600{
601};
602
604
605//------------------------------------------------------------------------------
606
607// Use traits to build a TERSubset that can convert from any of the TE*codes
608// enums as well as from NotTEC.
609template <typename FROM>
611{
612};
613template <>
615{
616};
617template <>
619{
620};
621template <>
623{
624};
625template <>
627{
628};
629template <>
631{
632};
633template <>
635{
636};
637template <>
639{
640};
641
642// TER allows all of the subsets.
644
645//------------------------------------------------------------------------------
646
647inline bool
648isTelLocal(TER x) noexcept
649{
650 return (x >= telLOCAL_ERROR && x < temMALFORMED);
651}
652
653inline bool
655{
656 return (x >= temMALFORMED && x < tefFAILURE);
657}
658
659inline bool
660isTefFailure(TER x) noexcept
661{
662 return (x >= tefFAILURE && x < terRETRY);
663}
664
665inline bool
666isTerRetry(TER x) noexcept
667{
668 return (x >= terRETRY && x < tesSUCCESS);
669}
670
671inline bool
672isTesSuccess(TER x) noexcept
673{
674 return (x == tesSUCCESS);
675}
676
677inline bool
678isTecClaim(TER x) noexcept
679{
680 return ((x) >= tecCLAIM);
681}
682
687
688bool
689transResultInfo(TER code, std::string& token, std::string& text);
690
692transToken(TER code);
693
695transHuman(TER code);
696
698transCode(std::string const& token);
699
700} // namespace ripple
701
702#endif
Represents a JSON value.
Definition: json_value.h:150
constexpr TERSubset()
Definition: TER.h:414
constexpr TERSubset(TERSubset const &rhs)=default
TERUnderlyingType code_
Definition: TER.h:410
constexpr TERSubset & operator=(TERSubset const &rhs)=default
constexpr TERSubset(T rhs)
Definition: TER.h:437
friend constexpr TERUnderlyingType TERtoInt(TERSubset v)
Definition: TER.h:494
constexpr TERSubset(int rhs)
Definition: TER.h:421
constexpr auto operator=(T rhs) -> std::enable_if_t< Trait< T >::value, TERSubset & >
Definition: TER.h:450
constexpr TERSubset(TERSubset &&rhs)=default
static constexpr TERSubset fromInt(int from)
Definition: TER.h:427
friend std::ostream & operator<<(std::ostream &os, TERSubset const &rhs)
Definition: TER.h:472
constexpr TERSubset & operator=(TERSubset &&rhs)=default
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: algorithm.h:26
bool operator<=(STAmount const &lhs, STAmount const &rhs)
Definition: STAmount.h:629
std::string transHuman(TER code)
Definition: TER.cpp:271
bool operator!=(Buffer const &lhs, Buffer const &rhs) noexcept
Definition: Buffer.h:231
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:660
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:262
TECcodes
Definition: TER.h:249
@ tecNO_LINE_REDUNDANT
Definition: TER.h:293
@ 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
@ 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:666
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:672
constexpr TERUnderlyingType TERtoInt(TELcodes v)
Definition: TER.h:369
bool isTemMalformed(TER x) noexcept
Definition: TER.h:654
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:643
bool transResultInfo(TER code, std::string &token, std::string &text)
Definition: TER.cpp:247
bool operator>=(STAmount const &lhs, STAmount const &rhs)
Definition: STAmount.h:635
bool isTecClaim(TER x) noexcept
Definition: TER.h:678
bool isTelLocal(TER x) noexcept
Definition: TER.h:648
std::optional< TER > transCode(std::string const &token)
Definition: TER.cpp:280
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