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
142
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};
229
230//------------------------------------------------------------------------------
231
233 // Note: Exact number must stay stable. This code is stored by value
234 // in metadata for historic transactions.
235
236 // 0: S Success (success)
237 // Causes:
238 // - Success.
239 // Implications:
240 // - Applied
241 // - Forwarded
242 tesSUCCESS = 0
244
245//------------------------------------------------------------------------------
246
248 // Note: Exact numbers must stay stable. These codes are stored by
249 // value in metadata for historic transactions.
250
251 // 100 .. 255 C
252 // Claim fee only (ripple transaction with no good paths, pay to
253 // non-existent account, no path)
254 //
255 // Causes:
256 // - Success, but does not achieve optimal result.
257 // - Invalid transaction or no effect, but claim fee to use the sequence
258 // number.
259 //
260 // Implications:
261 // - Applied
262 // - Forwarded
263 //
264 // Only allowed as a return code of appliedTransaction when !tapRETRY.
265 // Otherwise, treated as terRETRY.
266 //
267 // DO NOT CHANGE THESE NUMBERS: They appear in ledger meta data.
268 tecCLAIM = 100,
270 tecUNFUNDED_ADD = 102, // Unused legacy code
306 tecHOOK_REJECTED [[maybe_unused]] = 153,
347};
348
349//------------------------------------------------------------------------------
350
351// For generic purposes, a free function that returns the value of a TE*codes.
352constexpr TERUnderlyingType
354{
355 return safe_cast<TERUnderlyingType>(v);
356}
357
358constexpr TERUnderlyingType
360{
361 return safe_cast<TERUnderlyingType>(v);
362}
363
364constexpr TERUnderlyingType
366{
367 return safe_cast<TERUnderlyingType>(v);
368}
369
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
388//------------------------------------------------------------------------------
389// Template class that is specific to selected ranges of error codes. The
390// Trait tells std::enable_if which ranges are allowed.
391template <template <typename> class Trait>
393{
395
396public:
397 // Constructors
399 {
400 }
401 constexpr TERSubset(TERSubset const& rhs) = default;
402 constexpr TERSubset(TERSubset&& rhs) = default;
403
404private:
405 constexpr explicit TERSubset(int rhs) : code_(rhs)
406 {
407 }
408
409public:
410 static constexpr TERSubset
411 fromInt(int from)
412 {
413 return TERSubset(from);
414 }
415
416 // Trait tells enable_if which types are allowed for construction.
417 template <
418 typename T,
419 typename = std::enable_if_t<
420 Trait<std::remove_cv_t<std::remove_reference_t<T>>>::value>>
421 constexpr TERSubset(T rhs) : code_(TERtoInt(rhs))
422 {
423 }
424
425 // Assignment
426 constexpr TERSubset&
427 operator=(TERSubset const& rhs) = default;
428 constexpr TERSubset&
429 operator=(TERSubset&& rhs) = default;
430
431 // Trait tells enable_if which types are allowed for assignment.
432 template <typename T>
433 constexpr auto
435 {
436 code_ = TERtoInt(rhs);
437 return *this;
438 }
439
440 // Conversion to bool.
441 explicit
442 operator bool() const
443 {
444 return code_ != tesSUCCESS;
445 }
446
447 // Conversion to Json::Value allows assignment to Json::Objects
448 // without casting.
449 operator Json::Value() const
450 {
451 return Json::Value{code_};
452 }
453
454 // Streaming operator.
456 operator<<(std::ostream& os, TERSubset const& rhs)
457 {
458 return os << rhs.code_;
459 }
460
461 // Return the underlying value. Not a member so similarly named free
462 // functions can do the same work for the enums.
463 //
464 // It's worth noting that an explicit conversion operator was considered
465 // and rejected. Consider this case, taken from Status.h
466 //
467 // class Status {
468 // int code_;
469 // public:
470 // Status (TER ter)
471 // : code_ (ter) {}
472 // }
473 //
474 // This code compiles with no errors or warnings if TER has an explicit
475 // (unnamed) conversion to int. To avoid silent conversions like these
476 // we provide (only) a named conversion.
477 friend constexpr TERUnderlyingType
479 {
480 return v.code_;
481 }
482};
483
484// Comparison operators.
485// Only enabled if both arguments return int if TERtiInt is called with them.
486template <typename L, typename R>
487constexpr auto
488operator==(L const& lhs, R const& rhs)
490 std::is_same<decltype(TERtoInt(lhs)), int>::value &&
491 std::is_same<decltype(TERtoInt(rhs)), int>::value,
492 bool>
493{
494 return TERtoInt(lhs) == TERtoInt(rhs);
495}
496
497template <typename L, typename R>
498constexpr auto
499operator!=(L const& lhs, R const& rhs)
501 std::is_same<decltype(TERtoInt(lhs)), int>::value &&
502 std::is_same<decltype(TERtoInt(rhs)), int>::value,
503 bool>
504{
505 return TERtoInt(lhs) != TERtoInt(rhs);
506}
507
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
552//------------------------------------------------------------------------------
553
554// Use traits to build a TERSubset that can convert from any of the TE*codes
555// enums *except* TECcodes: NotTEC
556
557// NOTE: NotTEC is useful for codes returned by preflight in transactors.
558// Preflight checks occur prior to signature checking. If preflight returned
559// a tec code, then a malicious user could submit a transaction with a very
560// large fee and have that fee charged against an account without using that
561// account's valid signature.
562template <typename FROM>
564{
565};
566template <>
568{
569};
570template <>
572{
573};
574template <>
576{
577};
578template <>
580{
581};
582template <>
584{
585};
586
588
589//------------------------------------------------------------------------------
590
591// Use traits to build a TERSubset that can convert from any of the TE*codes
592// enums as well as from NotTEC.
593template <typename FROM>
595{
596};
597template <>
599{
600};
601template <>
603{
604};
605template <>
607{
608};
609template <>
611{
612};
613template <>
615{
616};
617template <>
619{
620};
621template <>
623{
624};
625
626// TER allows all of the subsets.
628
629//------------------------------------------------------------------------------
630
631inline bool
633{
634 return ((x) >= telLOCAL_ERROR && (x) < temMALFORMED);
635}
636
637inline bool
639{
640 return ((x) >= temMALFORMED && (x) < tefFAILURE);
641}
642
643inline bool
645{
646 return ((x) >= tefFAILURE && (x) < terRETRY);
647}
648
649inline bool
651{
652 return ((x) >= terRETRY && (x) < tesSUCCESS);
653}
654
655inline bool
657{
658 return ((x) == tesSUCCESS);
659}
660
661inline bool
663{
664 return ((x) >= tecCLAIM);
665}
666
671
672bool
673transResultInfo(TER code, std::string& token, std::string& text);
674
676transToken(TER code);
677
679transHuman(TER code);
680
682transCode(std::string const& token);
683
684} // namespace ripple
685
686#endif
Represents a JSON value.
Definition: json_value.h:148
constexpr TERSubset()
Definition: TER.h:398
constexpr TERSubset(TERSubset const &rhs)=default
TERUnderlyingType code_
Definition: TER.h:394
constexpr TERSubset & operator=(TERSubset const &rhs)=default
constexpr TERSubset(T rhs)
Definition: TER.h:421
friend constexpr TERUnderlyingType TERtoInt(TERSubset v)
Definition: TER.h:478
constexpr TERSubset(int rhs)
Definition: TER.h:405
constexpr auto operator=(T rhs) -> std::enable_if_t< Trait< T >::value, TERSubset & >
Definition: TER.h:434
constexpr TERSubset(TERSubset &&rhs)=default
static constexpr TERSubset fromInt(int from)
Definition: TER.h:411
friend std::ostream & operator<<(std::ostream &os, TERSubset const &rhs)
Definition: TER.h:456
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:610
std::string transHuman(TER code)
Definition: TER.cpp:266
bool isTecClaim(TER x)
Definition: TER.h:662
bool isTelLocal(TER x)
Definition: TER.h:632
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
bool isTesSuccess(TER x)
Definition: TER.h:656
bool isTerRetry(TER x)
Definition: TER.h:650
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
int TERUnderlyingType
Definition: TER.h:38
bool operator>(STAmount const &lhs, STAmount const &rhs)
Definition: STAmount.h:604
std::string transToken(TER code)
Definition: TER.cpp:257
bool isTemMalformed(TER x)
Definition: TER.h:638
TECcodes
Definition: TER.h:247
@ tecNO_LINE_REDUNDANT
Definition: TER.h:280
@ tecNO_ENTRY
Definition: TER.h:293
@ tecCRYPTOCONDITION_ERROR
Definition: TER.h:299
@ tecNO_SUITABLE_NFTOKEN_PAGE
Definition: TER.h:308
@ tecNO_DST
Definition: TER.h:277
@ tecHOOK_REJECTED
Definition: TER.h:306
@ tecNO_LINE_INSUF_RESERVE
Definition: TER.h:279
@ tecNEED_MASTER_KEY
Definition: TER.h:295
@ tecINSUFF_FEE
Definition: TER.h:289
@ tecXCHAIN_SELF_COMMIT
Definition: TER.h:337
@ tecXCHAIN_WRONG_CHAIN
Definition: TER.h:329
@ tecXCHAIN_INSUFF_CREATE_AMOUNT
Definition: TER.h:333
@ tecXCHAIN_CREATE_ACCOUNT_DISABLED
Definition: TER.h:339
@ tecINSUF_RESERVE_LINE
Definition: TER.h:275
@ tecOBJECT_NOT_FOUND
Definition: TER.h:313
@ tecINSUF_RESERVE_OFFER
Definition: TER.h:276
@ tecNO_ISSUER
Definition: TER.h:286
@ tecUNFUNDED
Definition: TER.h:282
@ tecXCHAIN_NO_CLAIM_ID
Definition: TER.h:324
@ tecTOO_SOON
Definition: TER.h:305
@ tecXCHAIN_CREATE_ACCOUNT_NONXRP_ISSUE
Definition: TER.h:328
@ tecNO_TARGET
Definition: TER.h:291
@ tecDIR_FULL
Definition: TER.h:274
@ tecNO_REGULAR_KEY
Definition: TER.h:284
@ tecINCOMPLETE
Definition: TER.h:322
@ tecNFTOKEN_OFFER_TYPE_MISMATCH
Definition: TER.h:310
@ tecXCHAIN_PAYMENT_FAILED
Definition: TER.h:336
@ tecUNFUNDED_OFFER
Definition: TER.h:271
@ tecFROZEN
Definition: TER.h:290
@ tecXCHAIN_CLAIM_NO_QUORUM
Definition: TER.h:326
@ tecAMM_EMPTY
Definition: TER.h:319
@ tecUNFUNDED_ADD
Definition: TER.h:270
@ tecOWNERS
Definition: TER.h:285
@ tecKILLED
Definition: TER.h:303
@ tecXCHAIN_BAD_CLAIM_ID
Definition: TER.h:325
@ tecXCHAIN_PROOF_UNKNOWN_KEY
Definition: TER.h:327
@ tecDUPLICATE
Definition: TER.h:302
@ tecINSUFFICIENT_FUNDS
Definition: TER.h:312
@ tecNFTOKEN_BUY_SELL_MISMATCH
Definition: TER.h:309
@ tecXCHAIN_ACCOUNT_CREATE_PAST
Definition: TER.h:334
@ tecINTERNAL
Definition: TER.h:297
@ tecBAD_CREDENTIALS
Definition: TER.h:346
@ tecXCHAIN_BAD_TRANSFER_ISSUE
Definition: TER.h:323
@ tecNO_PERMISSION
Definition: TER.h:292
@ tecDST_TAG_NEEDED
Definition: TER.h:296
@ tecHAS_OBLIGATIONS
Definition: TER.h:304
@ tecINVARIANT_FAILED
Definition: TER.h:300
@ tecAMM_NOT_EMPTY
Definition: TER.h:320
@ tecOVERSIZE
Definition: TER.h:298
@ tecARRAY_TOO_LARGE
Definition: TER.h:344
@ tecXCHAIN_REWARD_MISMATCH
Definition: TER.h:330
@ tecCLAIM
Definition: TER.h:268
@ tecINVALID_UPDATE_TIME
Definition: TER.h:341
@ tecPATH_PARTIAL
Definition: TER.h:269
@ tecUNFUNDED_AMM
Definition: TER.h:315
@ tecAMM_ACCOUNT
Definition: TER.h:321
@ tecAMM_FAILED
Definition: TER.h:317
@ tecNO_LINE
Definition: TER.h:288
@ tecMAX_SEQUENCE_REACHED
Definition: TER.h:307
@ tecXCHAIN_SENDING_ACCOUNT_MISMATCH
Definition: TER.h:332
@ tecINSUFFICIENT_PAYMENT
Definition: TER.h:314
@ tecEMPTY_DID
Definition: TER.h:340
@ tecNO_ALTERNATIVE_KEY
Definition: TER.h:283
@ tecXCHAIN_BAD_PUBLIC_KEY_ACCOUNT_PAIR
Definition: TER.h:338
@ tecUNFUNDED_PAYMENT
Definition: TER.h:272
@ tecPATH_DRY
Definition: TER.h:281
@ tecXCHAIN_NO_SIGNERS_LIST
Definition: TER.h:331
@ tecAMM_INVALID_TOKENS
Definition: TER.h:318
@ tecAMM_BALANCE
Definition: TER.h:316
@ tecINSUFFICIENT_RESERVE
Definition: TER.h:294
@ tecARRAY_EMPTY
Definition: TER.h:343
@ tecXCHAIN_ACCOUNT_CREATE_TOO_MANY
Definition: TER.h:335
@ tecCANT_ACCEPT_OWN_NFTOKEN_OFFER
Definition: TER.h:311
@ tecFAILED_PROCESSING
Definition: TER.h:273
@ tecEXPIRED
Definition: TER.h:301
@ tecTOKEN_PAIR_NOT_FOUND
Definition: TER.h:342
@ tecNO_DST_INSUF_XRP
Definition: TER.h:278
@ tecNO_AUTH
Definition: TER.h:287
@ tecLOCKED
Definition: TER.h:345
TEScodes
Definition: TER.h:232
@ tesSUCCESS
Definition: TER.h:242
bool operator<(Slice const &lhs, Slice const &rhs) noexcept
Definition: Slice.h:223
constexpr TERUnderlyingType TERtoInt(TELcodes v)
Definition: TER.h:353
std::unordered_map< TERUnderlyingType, std::pair< char const *const, char const *const > > const & transResults()
Definition: TER.cpp:35
bool isTefFailure(TER x)
Definition: TER.h:644
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
@ 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:627
bool transResultInfo(TER code, std::string &token, std::string &text)
Definition: TER.cpp:242
bool operator>=(STAmount const &lhs, STAmount const &rhs)
Definition: STAmount.h:616
std::optional< TER > transCode(std::string const &token)
Definition: TER.cpp:275
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
@ temBAD_REGKEY
Definition: TER.h:98
@ temBAD_CURRENCY
Definition: TER.h:90
@ temBAD_TRANSFER_FEE
Definition: TER.h:143
@ 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