@injectivelabs/exceptions 1.16.11 → 1.16.13-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/dist/cjs/exceptions/base.d.ts +2 -1
  2. package/dist/cjs/exceptions/base.js +1 -2
  3. package/dist/cjs/exceptions/exceptions/BitGetException.d.ts +1 -1
  4. package/dist/cjs/exceptions/exceptions/BitGetException.js +1 -1
  5. package/dist/cjs/exceptions/exceptions/CosmosWalletException.d.ts +1 -1
  6. package/dist/cjs/exceptions/exceptions/CosmosWalletException.js +1 -1
  7. package/dist/cjs/exceptions/exceptions/GrpcUnaryRequestException.d.ts +1 -1
  8. package/dist/cjs/exceptions/exceptions/HttpRequestException.d.ts +2 -1
  9. package/dist/cjs/exceptions/exceptions/LedgerCosmosException.d.ts +1 -1
  10. package/dist/cjs/exceptions/exceptions/LedgerCosmosException.js +1 -1
  11. package/dist/cjs/exceptions/exceptions/LedgerException.d.ts +1 -1
  12. package/dist/cjs/exceptions/exceptions/LedgerException.js +1 -1
  13. package/dist/cjs/exceptions/exceptions/MetamaskException.d.ts +1 -1
  14. package/dist/cjs/exceptions/exceptions/MetamaskException.js +1 -1
  15. package/dist/cjs/exceptions/exceptions/OkxWalletException.d.ts +1 -1
  16. package/dist/cjs/exceptions/exceptions/OkxWalletException.js +1 -1
  17. package/dist/cjs/exceptions/exceptions/RabbyWalletException.d.ts +1 -1
  18. package/dist/cjs/exceptions/exceptions/RabbyWalletException.js +1 -1
  19. package/dist/cjs/exceptions/exceptions/RainbowWalletException.d.ts +1 -1
  20. package/dist/cjs/exceptions/exceptions/RainbowWalletException.js +1 -1
  21. package/dist/cjs/exceptions/exceptions/TransactionException.d.ts +1 -1
  22. package/dist/cjs/exceptions/exceptions/TransactionException.js +1 -1
  23. package/dist/cjs/exceptions/exceptions/TrezorException.d.ts +1 -1
  24. package/dist/cjs/exceptions/exceptions/TrezorException.js +1 -1
  25. package/dist/cjs/exceptions/exceptions/TrustWalletException.d.ts +1 -1
  26. package/dist/cjs/exceptions/exceptions/TrustWalletException.js +1 -1
  27. package/dist/cjs/exceptions/exceptions/Web3Exception.d.ts +1 -1
  28. package/dist/cjs/exceptions/exceptions/Web3Exception.js +1 -1
  29. package/dist/cjs/exceptions/exceptions/index.d.ts +3 -3
  30. package/dist/cjs/exceptions/exceptions/index.js +6 -6
  31. package/dist/cjs/exceptions/messages.d.ts +2 -1
  32. package/dist/cjs/exceptions/types/codes.d.ts +437 -420
  33. package/dist/cjs/exceptions/types/codes.js +418 -435
  34. package/dist/cjs/exceptions/types/context.d.ts +21 -19
  35. package/dist/cjs/exceptions/types/context.js +18 -20
  36. package/dist/cjs/exceptions/types/modules.d.ts +64 -60
  37. package/dist/cjs/exceptions/types/modules.js +60 -64
  38. package/dist/cjs/exceptions/utils/maps.d.ts +1 -1
  39. package/dist/cjs/index.d.ts +1 -1
  40. package/dist/cjs/index.js +0 -1
  41. package/dist/cjs/types.d.ts +1 -1
  42. package/dist/cjs/utils.d.ts +2 -2
  43. package/dist/esm/exceptions/base.d.ts +2 -1
  44. package/dist/esm/exceptions/base.js +2 -3
  45. package/dist/esm/exceptions/exceptions/BitGetException.d.ts +1 -1
  46. package/dist/esm/exceptions/exceptions/BitGetException.js +1 -1
  47. package/dist/esm/exceptions/exceptions/CosmosWalletException.d.ts +1 -1
  48. package/dist/esm/exceptions/exceptions/CosmosWalletException.js +1 -1
  49. package/dist/esm/exceptions/exceptions/GrpcUnaryRequestException.d.ts +1 -1
  50. package/dist/esm/exceptions/exceptions/HttpRequestException.d.ts +2 -1
  51. package/dist/esm/exceptions/exceptions/LedgerCosmosException.d.ts +1 -1
  52. package/dist/esm/exceptions/exceptions/LedgerCosmosException.js +1 -1
  53. package/dist/esm/exceptions/exceptions/LedgerException.d.ts +1 -1
  54. package/dist/esm/exceptions/exceptions/LedgerException.js +1 -1
  55. package/dist/esm/exceptions/exceptions/MetamaskException.d.ts +1 -1
  56. package/dist/esm/exceptions/exceptions/MetamaskException.js +1 -1
  57. package/dist/esm/exceptions/exceptions/OkxWalletException.d.ts +1 -1
  58. package/dist/esm/exceptions/exceptions/OkxWalletException.js +1 -1
  59. package/dist/esm/exceptions/exceptions/RabbyWalletException.d.ts +1 -1
  60. package/dist/esm/exceptions/exceptions/RabbyWalletException.js +1 -1
  61. package/dist/esm/exceptions/exceptions/RainbowWalletException.d.ts +1 -1
  62. package/dist/esm/exceptions/exceptions/RainbowWalletException.js +1 -1
  63. package/dist/esm/exceptions/exceptions/TransactionException.d.ts +1 -1
  64. package/dist/esm/exceptions/exceptions/TransactionException.js +1 -1
  65. package/dist/esm/exceptions/exceptions/TrezorException.d.ts +1 -1
  66. package/dist/esm/exceptions/exceptions/TrezorException.js +1 -1
  67. package/dist/esm/exceptions/exceptions/TrustWalletException.d.ts +1 -1
  68. package/dist/esm/exceptions/exceptions/TrustWalletException.js +1 -1
  69. package/dist/esm/exceptions/exceptions/Web3Exception.d.ts +1 -1
  70. package/dist/esm/exceptions/exceptions/Web3Exception.js +1 -1
  71. package/dist/esm/exceptions/exceptions/index.d.ts +3 -3
  72. package/dist/esm/exceptions/exceptions/index.js +3 -3
  73. package/dist/esm/exceptions/messages.d.ts +2 -1
  74. package/dist/esm/exceptions/types/codes.d.ts +437 -420
  75. package/dist/esm/exceptions/types/codes.js +417 -434
  76. package/dist/esm/exceptions/types/context.d.ts +21 -19
  77. package/dist/esm/exceptions/types/context.js +18 -20
  78. package/dist/esm/exceptions/types/modules.d.ts +64 -60
  79. package/dist/esm/exceptions/types/modules.js +60 -64
  80. package/dist/esm/exceptions/utils/maps.d.ts +1 -1
  81. package/dist/esm/exceptions/utils/maps.js +1 -1
  82. package/dist/esm/index.d.ts +1 -1
  83. package/dist/esm/index.js +0 -1
  84. package/dist/esm/types.d.ts +1 -1
  85. package/dist/esm/utils.d.ts +2 -2
  86. package/package.json +2 -2
@@ -1,787 +1,770 @@
1
- export var GrpcErrorCode;
2
- (function (GrpcErrorCode) {
3
- GrpcErrorCode[GrpcErrorCode["OK"] = 0] = "OK";
4
- GrpcErrorCode[GrpcErrorCode["Canceled"] = 1] = "Canceled";
5
- GrpcErrorCode[GrpcErrorCode["Unknown"] = 2] = "Unknown";
6
- GrpcErrorCode[GrpcErrorCode["InvalidArgument"] = 3] = "InvalidArgument";
7
- GrpcErrorCode[GrpcErrorCode["DeadlineExceeded"] = 4] = "DeadlineExceeded";
8
- GrpcErrorCode[GrpcErrorCode["NotFound"] = 5] = "NotFound";
9
- GrpcErrorCode[GrpcErrorCode["AlreadyExists"] = 6] = "AlreadyExists";
10
- GrpcErrorCode[GrpcErrorCode["PermissionDenied"] = 7] = "PermissionDenied";
11
- GrpcErrorCode[GrpcErrorCode["ResourceExhausted"] = 8] = "ResourceExhausted";
12
- GrpcErrorCode[GrpcErrorCode["FailedPrecondition"] = 9] = "FailedPrecondition";
13
- GrpcErrorCode[GrpcErrorCode["Aborted"] = 10] = "Aborted";
14
- GrpcErrorCode[GrpcErrorCode["OutOfRange"] = 11] = "OutOfRange";
15
- GrpcErrorCode[GrpcErrorCode["Unimplemented"] = 12] = "Unimplemented";
16
- GrpcErrorCode[GrpcErrorCode["Internal"] = 13] = "Internal";
17
- GrpcErrorCode[GrpcErrorCode["Unavailable"] = 14] = "Unavailable";
18
- GrpcErrorCode[GrpcErrorCode["DataLoss"] = 15] = "DataLoss";
19
- GrpcErrorCode[GrpcErrorCode["Unauthenticated"] = 16] = "Unauthenticated";
20
- })(GrpcErrorCode || (GrpcErrorCode = {}));
1
+ export const GrpcErrorCode = {
2
+ OK: 0,
3
+ Canceled: 1,
4
+ Unknown: 2,
5
+ InvalidArgument: 3,
6
+ DeadlineExceeded: 4,
7
+ NotFound: 5,
8
+ AlreadyExists: 6,
9
+ PermissionDenied: 7,
10
+ ResourceExhausted: 8,
11
+ FailedPrecondition: 9,
12
+ Aborted: 10,
13
+ OutOfRange: 11,
14
+ Unimplemented: 12,
15
+ Internal: 13,
16
+ Unavailable: 14,
17
+ DataLoss: 15,
18
+ Unauthenticated: 16,
19
+ };
21
20
  export const grpcErrorCodeToErrorCode = (grpcErrorCode) => {
22
21
  return grpcErrorCode;
23
22
  };
24
- export var TransactionChainErrorModule;
25
- (function (TransactionChainErrorModule) {
26
- TransactionChainErrorModule["Auction"] = "auction";
27
- TransactionChainErrorModule["CosmosSdk"] = "sdk";
28
- TransactionChainErrorModule["Staking"] = "staking";
29
- TransactionChainErrorModule["Bank"] = "bank";
30
- TransactionChainErrorModule["Distribution"] = "distribution";
31
- TransactionChainErrorModule["Gov"] = "gov";
32
- TransactionChainErrorModule["Exchange"] = "exchange";
33
- TransactionChainErrorModule["Insurance"] = "insurance";
34
- TransactionChainErrorModule["Ocr"] = "ocr";
35
- TransactionChainErrorModule["Oracle"] = "oracle";
36
- TransactionChainErrorModule["Peggy"] = "peggy";
37
- TransactionChainErrorModule["TokenFactory"] = "tokenfactory";
38
- TransactionChainErrorModule["Wasmx"] = "wasmx";
39
- TransactionChainErrorModule["Wasm"] = "wasm";
40
- TransactionChainErrorModule["AuthZ"] = "authz";
41
- })(TransactionChainErrorModule || (TransactionChainErrorModule = {}));
42
- export var ChainCosmosErrorCode;
43
- (function (ChainCosmosErrorCode) {
23
+ export const TransactionChainErrorModule = {
24
+ Auction: 'auction',
25
+ CosmosSdk: 'sdk',
26
+ Staking: 'staking',
27
+ Bank: 'bank',
28
+ Distribution: 'distribution',
29
+ Gov: 'gov',
30
+ Exchange: 'exchange',
31
+ Insurance: 'insurance',
32
+ Ocr: 'ocr',
33
+ Oracle: 'oracle',
34
+ Peggy: 'peggy',
35
+ TokenFactory: 'tokenfactory',
36
+ Wasmx: 'wasmx',
37
+ Wasm: 'wasm',
38
+ AuthZ: 'authz',
39
+ };
40
+ export const ChainCosmosErrorCode = {
44
41
  // ErrTxDecode is returned if we cannot parse a transaction
45
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrTxDecode"] = 2] = "ErrTxDecode";
42
+ ErrTxDecode: 2,
46
43
  // ErrInvalidSequence is used the sequence number (nonce) is incorrect for the signature
47
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrInvalidSequence"] = 3] = "ErrInvalidSequence";
44
+ ErrInvalidSequence: 3,
48
45
  // ErrUnauthorized is used whenever a request without sufficient authorization is handled.
49
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrUnauthorized"] = 4] = "ErrUnauthorized";
46
+ ErrUnauthorized: 4,
50
47
  // ErrInsufficientFunds is used when the account cannot pay requested amount.
51
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrInsufficientFunds"] = 5] = "ErrInsufficientFunds";
48
+ ErrInsufficientFunds: 5,
52
49
  // ErrUnknownRequest to doc
53
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrUnknownRequest"] = 6] = "ErrUnknownRequest";
50
+ ErrUnknownRequest: 6,
54
51
  // ErrInvalidAddress to doc
55
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrInvalidAddress"] = 7] = "ErrInvalidAddress";
52
+ ErrInvalidAddress: 7,
56
53
  // ErrInvalidPubKey to doc
57
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrInvalidPubKey"] = 8] = "ErrInvalidPubKey";
54
+ ErrInvalidPubKey: 8,
58
55
  // ErrUnknownAddress to doc
59
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrUnknownAddress"] = 9] = "ErrUnknownAddress";
56
+ ErrUnknownAddress: 9,
60
57
  // ErrInvalidCoins to doc
61
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrInvalidCoins"] = 10] = "ErrInvalidCoins";
58
+ ErrInvalidCoins: 10,
62
59
  // ErrOutOfGas to doc
63
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrOutOfGas"] = 11] = "ErrOutOfGas";
60
+ ErrOutOfGas: 11,
64
61
  // ErrMemoTooLarge to doc
65
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrMemoTooLarge"] = 12] = "ErrMemoTooLarge";
62
+ ErrMemoTooLarge: 12,
66
63
  // ErrInsufficientFee to doc
67
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrInsufficientFee"] = 13] = "ErrInsufficientFee";
64
+ ErrInsufficientFee: 13,
68
65
  // ErrTooManySignatures to doc
69
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrTooManySignatures"] = 14] = "ErrTooManySignatures";
66
+ ErrTooManySignatures: 14,
70
67
  // ErrNoSignatures to doc
71
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrNoSignatures"] = 15] = "ErrNoSignatures";
68
+ ErrNoSignatures: 15,
72
69
  // ErrJSONMarshal defines an ABCI typed JSON marshalling error
73
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrJSONMarshal"] = 16] = "ErrJSONMarshal";
70
+ ErrJSONMarshal: 16,
74
71
  // ErrJSONUnmarshal defines an ABCI typed JSON unmarshalling error
75
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrJSONUnmarshal"] = 17] = "ErrJSONUnmarshal";
72
+ ErrJSONUnmarshal: 17,
76
73
  // ErrInvalidRequest defines an ABCI typed error where the request contains invalid data.
77
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrInvalidRequest"] = 18] = "ErrInvalidRequest";
74
+ ErrInvalidRequest: 18,
78
75
  // ErrTxInMempoolCache defines an ABCI typed error where a tx already exists in the mempool.
79
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrTxInMempoolCache"] = 19] = "ErrTxInMempoolCache";
76
+ ErrTxInMempoolCache: 19,
80
77
  // ErrMempoolIsFull defines an ABCI typed error where the mempool is full.
81
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrMempoolIsFull"] = 20] = "ErrMempoolIsFull";
78
+ ErrMempoolIsFull: 20,
82
79
  // ErrTxTooLarge defines an ABCI typed error where tx is too large.
83
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrTxTooLarge"] = 21] = "ErrTxTooLarge";
80
+ ErrTxTooLarge: 21,
84
81
  // ErrKeyNotFound defines an error when the key doesn't exist
85
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrKeyNotFound"] = 22] = "ErrKeyNotFound";
82
+ ErrKeyNotFound: 22,
86
83
  // ErrWrongPassword defines an error when the key password is invalid.
87
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrWrongPassword"] = 23] = "ErrWrongPassword";
84
+ ErrWrongPassword: 23,
88
85
  // ErrorInvalidSigner defines an error when the tx intended signer does not match the given signer.
89
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrorInvalidSigner"] = 24] = "ErrorInvalidSigner";
86
+ ErrorInvalidSigner: 24,
90
87
  // ErrorInvalidGasAdjustment defines an error for an invalid gas adjustment
91
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrorInvalidGasAdjustment"] = 25] = "ErrorInvalidGasAdjustment";
88
+ ErrorInvalidGasAdjustment: 25,
92
89
  // ErrInvalidHeight defines an error for an invalid height
93
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrInvalidHeight"] = 26] = "ErrInvalidHeight";
90
+ ErrInvalidHeight: 26,
94
91
  // ErrInvalidVersion defines a general error for an invalid version
95
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrInvalidVersion"] = 27] = "ErrInvalidVersion";
96
- // ErrInvalidChainID defines an error when the chain-id is invalid.
97
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrInvalidChainID"] = 28] = "ErrInvalidChainID";
92
+ ErrInvalidVersion: 27,
93
+ // ErrInvalidChainID defines an error for an invalid chain ID
94
+ ErrInvalidChainID: 28,
98
95
  // ErrInvalidType defines an error an invalid type.
99
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrInvalidType"] = 29] = "ErrInvalidType";
96
+ ErrInvalidType: 29,
100
97
  // ErrTxTimeoutHeight defines an error for when a tx is rejected out due to an explicitly set timeout height.
101
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrTxTimeoutHeight"] = 30] = "ErrTxTimeoutHeight";
98
+ ErrTxTimeoutHeight: 30,
102
99
  // ErrUnknownExtensionOptions defines an error for unknown extension options.
103
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrUnknownExtensionOptions"] = 31] = "ErrUnknownExtensionOptions";
100
+ ErrUnknownExtensionOptions: 31,
104
101
  // ErrWrongSequence defines an error where the account sequence defined in the signer info doesn't match the account's actual sequence number.
105
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrWrongSequence"] = 32] = "ErrWrongSequence";
102
+ ErrWrongSequence: 32,
106
103
  // ErrPackAny defines an error when packing a protobuf message to Any fails.
107
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrPackAny"] = 33] = "ErrPackAny";
104
+ ErrPackAny: 33,
108
105
  // ErrUnpackAny defines an error when unpacking a protobuf message from Any fails.
109
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrUnpackAny"] = 34] = "ErrUnpackAny";
106
+ ErrUnpackAny: 34,
110
107
  // ErrLogic defines an internal logic error, e.g. an invariant or assertion that is violated. It is a programmer error, not a user-facing error.
111
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrLogic"] = 35] = "ErrLogic";
108
+ ErrLogic: 35,
112
109
  // ErrConflict defines a conflict error, e.g. when two goroutines try to access the same resource and one of them fails.
113
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrConflict"] = 36] = "ErrConflict";
110
+ ErrConflict: 36,
114
111
  // ErrNotSupported is returned when we call a branch of a code which is currently not supported.
115
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrNotSupported"] = 37] = "ErrNotSupported";
112
+ ErrNotSupported: 37,
116
113
  // ErrNotFound defines an error when requested entity doesn't exist in the state.
117
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrNotFound"] = 38] = "ErrNotFound";
114
+ ErrNotFound: 38,
118
115
  // ErrIO should be used to wrap internal errors caused by external operation. Examples: not DB domain error, file writing etc...
119
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrIO"] = 39] = "ErrIO";
116
+ ErrIO: 39,
120
117
  // ErrAppConfig defines an error occurred if min-gas-prices field in BaseConfig is empty.
121
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrAppConfig"] = 40] = "ErrAppConfig";
118
+ ErrAppConfig: 40,
122
119
  // ErrInvalidGasLimit defines an error when an invalid GasWanted value is supplied.
123
- ChainCosmosErrorCode[ChainCosmosErrorCode["ErrInvalidGasLimit"] = 41] = "ErrInvalidGasLimit";
124
- })(ChainCosmosErrorCode || (ChainCosmosErrorCode = {}));
125
- export var ChainExchangeModuleErrorCode;
126
- (function (ChainExchangeModuleErrorCode) {
120
+ ErrInvalidGasLimit: 41,
121
+ };
122
+ export const ChainExchangeModuleErrorCode = {
127
123
  // failed to validate order
128
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrOrderInvalid"] = 1] = "ErrOrderInvalid";
124
+ ErrOrderInvalid: 1,
129
125
  // spot market not found
130
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrSpotMarketNotFound"] = 2] = "ErrSpotMarketNotFound";
126
+ ErrSpotMarketNotFound: 2,
131
127
  // spot market exists
132
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrSpotMarketExists"] = 3] = "ErrSpotMarketExists";
128
+ ErrSpotMarketExists: 3,
133
129
  // struct field error
134
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrBadField"] = 4] = "ErrBadField";
130
+ ErrBadField: 4,
135
131
  // failed to validate market
136
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrMarketInvalid"] = 5] = "ErrMarketInvalid";
132
+ ErrMarketInvalid: 5,
137
133
  // subaccount has insufficient deposits
138
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInsufficientDeposit"] = 6] = "ErrInsufficientDeposit";
134
+ ErrInsufficientDeposit: 6,
139
135
  // unrecognized order type
140
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrUnrecognizedOrderType"] = 7] = "ErrUnrecognizedOrderType";
136
+ ErrUnrecognizedOrderType: 7,
141
137
  // position quantity insufficient for order
142
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInsufficientPositionQuantity"] = 8] = "ErrInsufficientPositionQuantity";
138
+ ErrInsufficientPositionQuantity: 8,
143
139
  // order hash is not valid
144
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrOrderHashInvalid"] = 9] = "ErrOrderHashInvalid";
140
+ ErrOrderHashInvalid: 9,
145
141
  // subaccount id is not valid
146
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrBadSubaccountID"] = 10] = "ErrBadSubaccountID";
142
+ ErrBadSubaccountID: 10,
147
143
  // invalid ticker
148
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidTicker"] = 11] = "ErrInvalidTicker";
144
+ ErrInvalidTicker: 11,
149
145
  // invalid base denom
150
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidBaseDenom"] = 12] = "ErrInvalidBaseDenom";
146
+ ErrInvalidBaseDenom: 12,
151
147
  // invalid quote denom
152
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidQuoteDenom"] = 13] = "ErrInvalidQuoteDenom";
148
+ ErrInvalidQuoteDenom: 13,
153
149
  // invalid oracle
154
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidOracle"] = 14] = "ErrInvalidOracle";
150
+ ErrInvalidOracle: 14,
155
151
  // invalid expiry
156
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidExpiry"] = 15] = "ErrInvalidExpiry";
152
+ ErrInvalidExpiry: 15,
157
153
  // invalid price
158
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidPrice"] = 16] = "ErrInvalidPrice";
154
+ ErrInvalidPrice: 16,
159
155
  // invalid quantity
160
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidQuantity"] = 17] = "ErrInvalidQuantity";
156
+ ErrInvalidQuantity: 17,
161
157
  // unsupported oracle type
162
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrUnsupportedOracleType"] = 18] = "ErrUnsupportedOracleType";
158
+ ErrUnsupportedOracleType: 18,
163
159
  // order doesnt exist
164
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrOrderDoesntExist"] = 19] = "ErrOrderDoesntExist";
160
+ ErrOrderDoesntExist: 19,
165
161
  // spot limit orderbook fill invalid
166
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrOrderbookFillInvalid"] = 20] = "ErrOrderbookFillInvalid";
162
+ ErrOrderbookFillInvalid: 20,
167
163
  // perpetual market exists
168
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrPerpetualMarketExists"] = 21] = "ErrPerpetualMarketExists";
164
+ ErrPerpetualMarketExists: 21,
169
165
  // expiry futures market exists
170
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrExpiryFuturesMarketExists"] = 22] = "ErrExpiryFuturesMarketExists";
166
+ ErrExpiryFuturesMarketExists: 22,
171
167
  // expiry futures market expired
172
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrExpiryFuturesMarketExpired"] = 23] = "ErrExpiryFuturesMarketExpired";
168
+ ErrExpiryFuturesMarketExpired: 23,
173
169
  // no liquidity on the orderbook!
174
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrNoLiquidity"] = 24] = "ErrNoLiquidity";
170
+ ErrNoLiquidity: 24,
175
171
  // Orderbook liquidity cannot satisfy current worst price
176
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrSlippageExceedsWorstPrice"] = 25] = "ErrSlippageExceedsWorstPrice";
172
+ ErrSlippageExceedsWorstPrice: 25,
177
173
  // Order has insufficient margin
178
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInsufficientOrderMargin"] = 26] = "ErrInsufficientOrderMargin";
174
+ ErrInsufficientOrderMargin: 26,
179
175
  // Derivative market not found
180
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrDerivativeMarketNotFound"] = 27] = "ErrDerivativeMarketNotFound";
176
+ ErrDerivativeMarketNotFound: 27,
181
177
  // Position not found
182
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrPositionNotFound"] = 28] = "ErrPositionNotFound";
178
+ ErrPositionNotFound: 28,
183
179
  // Position direction does not oppose the reduce-only order
184
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidReduceOnlyPositionDirection"] = 29] = "ErrInvalidReduceOnlyPositionDirection";
180
+ ErrInvalidReduceOnlyPositionDirection: 29,
185
181
  // Price Surpasses Bankruptcy Price
186
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrPriceSurpassesBankruptcyPrice"] = 30] = "ErrPriceSurpassesBankruptcyPrice";
182
+ ErrPriceSurpassesBankruptcyPrice: 30,
187
183
  // Position not liquidable
188
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrPositionNotLiquidable"] = 31] = "ErrPositionNotLiquidable";
184
+ ErrPositionNotLiquidable: 31,
189
185
  // invalid trigger price
190
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidTriggerPrice"] = 32] = "ErrInvalidTriggerPrice";
186
+ ErrInvalidTriggerPrice: 32,
191
187
  // invalid oracle type
192
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidOracleType"] = 33] = "ErrInvalidOracleType";
188
+ ErrInvalidOracleType: 33,
193
189
  // invalid minimum price tick size
194
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidPriceTickSize"] = 34] = "ErrInvalidPriceTickSize";
190
+ ErrInvalidPriceTickSize: 34,
195
191
  // invalid minimum quantity tick size
196
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidQuantityTickSize"] = 35] = "ErrInvalidQuantityTickSize";
192
+ ErrInvalidQuantityTickSize: 35,
197
193
  // invalid minimum order margin
198
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidMargin"] = 36] = "ErrInvalidMargin";
194
+ ErrInvalidMargin: 36,
199
195
  // Exceeds order side count
200
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrExceedsOrderSideCount"] = 37] = "ErrExceedsOrderSideCount";
196
+ ErrExceedsOrderSideCount: 37,
201
197
  // Subaccount cannot place a market order when a market order in the same market was already placed in same block
202
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrMarketOrderAlreadyExists"] = 38] = "ErrMarketOrderAlreadyExists";
198
+ ErrMarketOrderAlreadyExists: 38,
203
199
  // cannot place a conditional market order when a conditional market order in same relative direction already exists
204
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrConditionalMarketOrderAlreadyExists"] = 39] = "ErrConditionalMarketOrderAlreadyExists";
200
+ ErrConditionalMarketOrderAlreadyExists: 39,
205
201
  // An equivalent market launch proposal already exists.
206
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrMarketLaunchProposalAlreadyExists"] = 40] = "ErrMarketLaunchProposalAlreadyExists";
202
+ ErrMarketLaunchProposalAlreadyExists: 40,
207
203
  // Invalid Market Status
208
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidMarketStatus"] = 41] = "ErrInvalidMarketStatus";
204
+ ErrInvalidMarketStatus: 41,
209
205
  // base denom cannot be same with quote denom
210
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrSameDenoms"] = 42] = "ErrSameDenoms";
206
+ ErrSameDenoms: 42,
211
207
  // oracle base cannot be same with oracle quote
212
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrSameOracles"] = 43] = "ErrSameOracles";
208
+ ErrSameOracles: 43,
213
209
  // MakerFeeRate does not match TakerFeeRate requirements
214
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrFeeRatesRelation"] = 44] = "ErrFeeRatesRelation";
210
+ ErrFeeRatesRelation: 44,
215
211
  // MaintenanceMarginRatio cannot be greater than InitialMarginRatio
216
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrMarginsRelation"] = 45] = "ErrMarginsRelation";
212
+ ErrMarginsRelation: 45,
217
213
  // OracleScaleFactor cannot be greater than MaxOracleScaleFactor
218
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrExceedsMaxOracleScaleFactor"] = 46] = "ErrExceedsMaxOracleScaleFactor";
214
+ ErrExceedsMaxOracleScaleFactor: 46,
219
215
  // Spot exchange is not enabled yet
220
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrSpotExchangeNotEnabled"] = 47] = "ErrSpotExchangeNotEnabled";
216
+ ErrSpotExchangeNotEnabled: 47,
221
217
  // Derivatives exchange is not enabled yet
222
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrDerivativesExchangeNotEnabled"] = 48] = "ErrDerivativesExchangeNotEnabled";
218
+ ErrDerivativesExchangeNotEnabled: 48,
223
219
  // Oracle price delta exceeds threshold
224
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrOraclePriceDeltaExceedsThreshold"] = 49] = "ErrOraclePriceDeltaExceedsThreshold";
220
+ ErrOraclePriceDeltaExceedsThreshold: 49,
225
221
  // Invalid hourly interest rate
226
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidHourlyInterestRate"] = 50] = "ErrInvalidHourlyInterestRate";
222
+ ErrInvalidHourlyInterestRate: 50,
227
223
  // Invalid hourly funding rate cap
228
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidHourlyFundingRateCap"] = 51] = "ErrInvalidHourlyFundingRateCap";
224
+ ErrInvalidHourlyFundingRateCap: 51,
229
225
  // Only perpetual markets can update funding parameters
230
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidMarketFundingParamUpdate"] = 52] = "ErrInvalidMarketFundingParamUpdate";
226
+ ErrInvalidMarketFundingParamUpdate: 52,
231
227
  // Invalid trading reward campaign
232
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidTradingRewardCampaign"] = 53] = "ErrInvalidTradingRewardCampaign";
228
+ ErrInvalidTradingRewardCampaign: 53,
233
229
  // Invalid fee discount schedule
234
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidFeeDiscountSchedule"] = 54] = "ErrInvalidFeeDiscountSchedule";
230
+ ErrInvalidFeeDiscountSchedule: 54,
235
231
  // invalid liquidation order
236
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidLiquidationOrder"] = 55] = "ErrInvalidLiquidationOrder";
232
+ ErrInvalidLiquidationOrder: 55,
237
233
  // Unknown error happened for campaign distributions
238
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrTradingRewardCampaignDistributionError"] = 56] = "ErrTradingRewardCampaignDistributionError";
234
+ ErrTradingRewardCampaignDistributionError: 56,
239
235
  // Invalid trading reward points update
240
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidTradingRewardsPendingPointsUpdate"] = 57] = "ErrInvalidTradingRewardsPendingPointsUpdate";
236
+ ErrInvalidTradingRewardsPendingPointsUpdate: 57,
241
237
  // Invalid batch msg update
242
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidBatchMsgUpdate"] = 58] = "ErrInvalidBatchMsgUpdate";
238
+ ErrInvalidBatchMsgUpdate: 58,
243
239
  // Post-only order exceeds top of book price
244
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrExceedsTopOfBookPrice"] = 59] = "ErrExceedsTopOfBookPrice";
240
+ ErrExceedsTopOfBookPrice: 59,
245
241
  // Order type not supported for given message
246
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidOrderTypeForMessage"] = 60] = "ErrInvalidOrderTypeForMessage";
242
+ ErrInvalidOrderTypeForMessage: 60,
247
243
  // Sender must match dmm account
248
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidDMMSender"] = 61] = "ErrInvalidDMMSender";
244
+ ErrInvalidDMMSender: 61,
249
245
  // already opted out of rewards
250
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrAlreadyOptedOutOfRewards"] = 62] = "ErrAlreadyOptedOutOfRewards";
246
+ ErrAlreadyOptedOutOfRewards: 62,
251
247
  // Invalid margin ratio
252
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidMarginRatio"] = 63] = "ErrInvalidMarginRatio";
248
+ ErrInvalidMarginRatio: 63,
253
249
  // Provided funds are below minimum
254
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrBelowMinimalContribution"] = 64] = "ErrBelowMinimalContribution";
250
+ ErrBelowMinimalContribution: 64,
255
251
  // Position is below initial margin requirement
256
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrLowPositionMargin"] = 65] = "ErrLowPositionMargin";
252
+ ErrLowPositionMargin: 65,
257
253
  // Pool has non-positive total lp token supply
258
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidTotalSupply"] = 66] = "ErrInvalidTotalSupply";
254
+ ErrInvalidTotalSupply: 66,
259
255
  // Passed lp token burn amount is greater than total lp token supply
260
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidLpTokenBurnAmount"] = 67] = "ErrInvalidLpTokenBurnAmount";
256
+ ErrInvalidLpTokenBurnAmount: 67,
261
257
  // unsupported action
262
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrUnsupportedAction"] = 68] = "ErrUnsupportedAction";
258
+ ErrUnsupportedAction: 68,
263
259
  // position quantity cannot be negative
264
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrNegativePositionQuantity"] = 69] = "ErrNegativePositionQuantity";
260
+ ErrNegativePositionQuantity: 69,
265
261
  // binary options market exists
266
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrBinaryOptionsMarketExists"] = 70] = "ErrBinaryOptionsMarketExists";
262
+ ErrBinaryOptionsMarketExists: 70,
267
263
  // binary options market not found
268
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrBinaryOptionsMarketNotFound"] = 71] = "ErrBinaryOptionsMarketNotFound";
264
+ ErrBinaryOptionsMarketNotFound: 71,
269
265
  // invalid settlement
270
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidSettlement"] = 72] = "ErrInvalidSettlement";
266
+ ErrInvalidSettlement: 72,
271
267
  // account doesnt exist
272
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrAccountDoesntExist"] = 73] = "ErrAccountDoesntExist";
268
+ ErrAccountDoesntExist: 73,
273
269
  // sender should be a market admin
274
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrSenderIsNotAnAdmin"] = 74] = "ErrSenderIsNotAnAdmin";
270
+ ErrSenderIsNotAnAdmin: 74,
275
271
  // market is already scheduled to settle
276
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrMarketAlreadyScheduledToSettle"] = 75] = "ErrMarketAlreadyScheduledToSettle";
272
+ ErrMarketAlreadyScheduledToSettle: 75,
277
273
  // market not found
278
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrGenericMarketNotFound"] = 76] = "ErrGenericMarketNotFound";
274
+ ErrGenericMarketNotFound: 76,
279
275
  // denom decimal cannot be below 1 or above max scale factor
280
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidDenomDecimal"] = 77] = "ErrInvalidDenomDecimal";
276
+ ErrInvalidDenomDecimal: 77,
281
277
  // state is invalid
282
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidState"] = 78] = "ErrInvalidState";
278
+ ErrInvalidState: 78,
283
279
  // transient orders up to cancellation not supported
284
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrTransientOrdersUpToCancelNotSupported"] = 79] = "ErrTransientOrdersUpToCancelNotSupported";
280
+ ErrTransientOrdersUpToCancelNotSupported: 79,
285
281
  // invalid trade
286
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidTrade"] = 80] = "ErrInvalidTrade";
282
+ ErrInvalidTrade: 80,
287
283
  // no margin locked in subaccount
288
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrNoMarginLocked"] = 81] = "ErrNoMarginLocked";
284
+ ErrNoMarginLocked: 81,
289
285
  // Invalid access level to perform action
290
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidAccessLevel"] = 82] = "ErrInvalidAccessLevel";
286
+ ErrInvalidAccessLevel: 82,
291
287
  // Invalid address
292
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidAddress"] = 83] = "ErrInvalidAddress";
288
+ ErrInvalidAddress: 83,
293
289
  // Invalid argument
294
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidArgument"] = 84] = "ErrInvalidArgument";
290
+ ErrInvalidArgument: 84,
295
291
  // Invalid funds direction
296
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidFundsDirection"] = 85] = "ErrInvalidFundsDirection";
292
+ ErrInvalidFundsDirection: 85,
297
293
  // No funds provided
298
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrNoFundsProvided"] = 86] = "ErrNoFundsProvided";
294
+ ErrNoFundsProvided: 86,
299
295
  // Invalid signature
300
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidSignature"] = 87] = "ErrInvalidSignature";
296
+ ErrInvalidSignature: 87,
301
297
  // no funds to unlock
302
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrNoFundsToUnlock"] = 88] = "ErrNoFundsToUnlock";
298
+ ErrNoFundsToUnlock: 88,
303
299
  // No msgs provided
304
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrNoMsgsProvided"] = 89] = "ErrNoMsgsProvided";
300
+ ErrNoMsgsProvided: 89,
305
301
  // No msg provided
306
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrNoMsgProvided"] = 90] = "ErrNoMsgProvided";
302
+ ErrNoMsgProvided: 90,
307
303
  // Invalid amount
308
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidAmount"] = 91] = "ErrInvalidAmount";
304
+ ErrInvalidAmount: 91,
309
305
  // The current feature has been disabled
310
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrFeatureDisabled"] = 92] = "ErrFeatureDisabled";
306
+ ErrFeatureDisabled: 92,
311
307
  // Order has too much margin
312
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrTooMuchOrderMargin"] = 93] = "ErrTooMuchOrderMargin";
308
+ ErrTooMuchOrderMargin: 93,
313
309
  // Order has too much margin
314
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrBadSubaccountNonce"] = 94] = "ErrBadSubaccountNonce";
315
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInsufficientFunds"] = 95] = "ErrInsufficientFunds";
310
+ ErrBadSubaccountNonce: 94,
311
+ ErrInsufficientFunds: 95,
316
312
  // Exchange is in post-only mode
317
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrPostOnlyMode"] = 96] = "ErrPostOnlyMode";
313
+ ErrPostOnlyMode: 96,
318
314
  // client order id already exists
319
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrClientOrderIdAlreadyExists"] = 97] = "ErrClientOrderIdAlreadyExists";
315
+ ErrClientOrderIdAlreadyExists: 97,
320
316
  // client order id is invalid. Max length is 36 chars
321
- ChainExchangeModuleErrorCode[ChainExchangeModuleErrorCode["ErrInvalidCid"] = 98] = "ErrInvalidCid";
322
- })(ChainExchangeModuleErrorCode || (ChainExchangeModuleErrorCode = {}));
323
- export var ChainAuctionErrorCodes;
324
- (function (ChainAuctionErrorCodes) {
317
+ ErrInvalidCid: 98,
318
+ };
319
+ export const ChainAuctionErrorCodes = {
325
320
  // invalid bid denom
326
- ChainAuctionErrorCodes[ChainAuctionErrorCodes["ErrBidInvalid"] = 1] = "ErrBidInvalid";
321
+ ErrBidInvalid: 1,
327
322
  // invalid bid round
328
- ChainAuctionErrorCodes[ChainAuctionErrorCodes["ErrBidRound"] = 2] = "ErrBidRound";
329
- })(ChainAuctionErrorCodes || (ChainAuctionErrorCodes = {}));
330
- export var ChainAuthZErrorCodes;
331
- (function (ChainAuthZErrorCodes) {
323
+ ErrBidRound: 2,
324
+ };
325
+ export const ChainAuthZErrorCodes = {
332
326
  // ErrNoAuthorizationFound error if there is no authorization found given a grant key
333
- ChainAuthZErrorCodes[ChainAuthZErrorCodes["ErrNoAuthorizationFound"] = 2] = "ErrNoAuthorizationFound";
327
+ ErrNoAuthorizationFound: 2,
334
328
  // ErrInvalidExpirationTime error if the set expiration time is in the past
335
- ChainAuthZErrorCodes[ChainAuthZErrorCodes["ErrInvalidExpirationTime"] = 3] = "ErrInvalidExpirationTime";
329
+ ErrInvalidExpirationTime: 3,
336
330
  // ErrUnknownAuthorizationType error for unknown authorization type
337
- ChainAuthZErrorCodes[ChainAuthZErrorCodes["ErrUnknownAuthorizationType"] = 4] = "ErrUnknownAuthorizationType";
331
+ ErrUnknownAuthorizationType: 4,
338
332
  // ErrNoGrantKeyFound error if the requested grant key does not exist
339
- ChainAuthZErrorCodes[ChainAuthZErrorCodes["ErrNoGrantKeyFound"] = 5] = "ErrNoGrantKeyFound";
333
+ ErrNoGrantKeyFound: 5,
340
334
  // ErrAuthorizationExpired error if the authorization has expired
341
- ChainAuthZErrorCodes[ChainAuthZErrorCodes["ErrAuthorizationExpired"] = 6] = "ErrAuthorizationExpired";
335
+ ErrAuthorizationExpired: 6,
342
336
  // ErrGranteeIsGranter error if the grantee and the granter are the same
343
- ChainAuthZErrorCodes[ChainAuthZErrorCodes["ErrGranteeIsGranter"] = 7] = "ErrGranteeIsGranter";
337
+ ErrGranteeIsGranter: 7,
344
338
  // ErrAuthorizationNumOfSigners error if an authorization message does not have only one signer
345
- ChainAuthZErrorCodes[ChainAuthZErrorCodes["ErrAuthorizationNumOfSigners"] = 9] = "ErrAuthorizationNumOfSigners";
339
+ ErrAuthorizationNumOfSigners: 9,
346
340
  // ErrNegativeMaxTokens error if the max tokens is negative
347
- ChainAuthZErrorCodes[ChainAuthZErrorCodes["ErrNegativeMaxTokens"] = 12] = "ErrNegativeMaxTokens";
348
- })(ChainAuthZErrorCodes || (ChainAuthZErrorCodes = {}));
349
- export var ChainInsuranceErrorCodes;
350
- (function (ChainInsuranceErrorCodes) {
341
+ ErrNegativeMaxTokens: 12,
342
+ };
343
+ export const ChainInsuranceErrorCodes = {
351
344
  // insurance fund already exists
352
- ChainInsuranceErrorCodes[ChainInsuranceErrorCodes["ErrInsuranceFundAlreadyExists"] = 1] = "ErrInsuranceFundAlreadyExists";
345
+ ErrInsuranceFundAlreadyExists: 1,
353
346
  // insurance fund not found
354
- ChainInsuranceErrorCodes[ChainInsuranceErrorCodes["ErrInsuranceFundNotFound"] = 2] = "ErrInsuranceFundNotFound";
347
+ ErrInsuranceFundNotFound: 2,
355
348
  // redemption already exists
356
- ChainInsuranceErrorCodes[ChainInsuranceErrorCodes["ErrRedemptionAlreadyExists"] = 3] = "ErrRedemptionAlreadyExists";
349
+ ErrRedemptionAlreadyExists: 3,
357
350
  // invalid deposit amount
358
- ChainInsuranceErrorCodes[ChainInsuranceErrorCodes["ErrInvalidDepositAmount"] = 4] = "ErrInvalidDepositAmount";
351
+ ErrInvalidDepositAmount: 4,
359
352
  // invalid deposit denom
360
- ChainInsuranceErrorCodes[ChainInsuranceErrorCodes["ErrInvalidDepositDenom"] = 5] = "ErrInvalidDepositDenom";
353
+ ErrInvalidDepositDenom: 5,
361
354
  // insurance payout exceeds deposits
362
- ChainInsuranceErrorCodes[ChainInsuranceErrorCodes["ErrPayoutTooLarge"] = 6] = "ErrPayoutTooLarge";
355
+ ErrPayoutTooLarge: 6,
363
356
  // invalid ticker
364
- ChainInsuranceErrorCodes[ChainInsuranceErrorCodes["ErrInvalidTicker"] = 7] = "ErrInvalidTicker";
357
+ ErrInvalidTicker: 7,
365
358
  // invalid quote denom
366
- ChainInsuranceErrorCodes[ChainInsuranceErrorCodes["ErrInvalidQuoteDenom"] = 8] = "ErrInvalidQuoteDenom";
359
+ ErrInvalidQuoteDenom: 8,
367
360
  // invalid oracle
368
- ChainInsuranceErrorCodes[ChainInsuranceErrorCodes["ErrInvalidOracle"] = 9] = "ErrInvalidOracle";
361
+ ErrInvalidOracle: 9,
369
362
  // invalid expiration time
370
- ChainInsuranceErrorCodes[ChainInsuranceErrorCodes["ErrInvalidExpirationTime"] = 10] = "ErrInvalidExpirationTime";
363
+ ErrInvalidExpirationTime: 10,
371
364
  // invalid marketID
372
- ChainInsuranceErrorCodes[ChainInsuranceErrorCodes["ErrInvalidMarketID"] = 11] = "ErrInvalidMarketID";
365
+ ErrInvalidMarketID: 11,
373
366
  // invalid share denom
374
- ChainInsuranceErrorCodes[ChainInsuranceErrorCodes["ErrInvalidShareDenom"] = 12] = "ErrInvalidShareDenom";
375
- })(ChainInsuranceErrorCodes || (ChainInsuranceErrorCodes = {}));
376
- export var ChainOcrErrorCodes;
377
- (function (ChainOcrErrorCodes) {
367
+ ErrInvalidShareDenom: 12,
368
+ };
369
+ export const ChainOcrErrorCodes = {
378
370
  // stale report
379
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrStaleReport"] = 1] = "ErrStaleReport";
371
+ ErrStaleReport: 1,
380
372
  // incomplete proposal
381
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrIncompleteProposal"] = 2] = "ErrIncompleteProposal";
373
+ ErrIncompleteProposal: 2,
382
374
  // repeated oracle address
383
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrRepeatedAddress"] = 3] = "ErrRepeatedAddress";
375
+ ErrRepeatedAddress: 3,
384
376
  // too many signers
385
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrTooManySigners"] = 4] = "ErrTooManySigners";
377
+ ErrTooManySigners: 4,
386
378
  // incorrect config
387
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrIncorrectConfig"] = 5] = "ErrIncorrectConfig";
379
+ ErrIncorrectConfig: 5,
388
380
  // config digest doesn't match
389
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrConfigDigestNotMatch"] = 6] = "ErrConfigDigestNotMatch";
381
+ ErrConfigDigestNotMatch: 6,
390
382
  // wrong number of signatures
391
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrWrongNumberOfSignatures"] = 7] = "ErrWrongNumberOfSignatures";
383
+ ErrWrongNumberOfSignatures: 7,
392
384
  // incorrect signature
393
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrIncorrectSignature"] = 8] = "ErrIncorrectSignature";
385
+ ErrIncorrectSignature: 8,
394
386
  // no transmitter specified
395
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrNoTransmitter"] = 9] = "ErrNoTransmitter";
387
+ ErrNoTransmitter: 9,
396
388
  // incorrect transmission data
397
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrIncorrectTransmissionData"] = 10] = "ErrIncorrectTransmissionData";
389
+ ErrIncorrectTransmissionData: 10,
398
390
  // no transmissions found
399
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrNoTransmissionsFound"] = 11] = "ErrNoTransmissionsFound";
391
+ ErrNoTransmissionsFound: 11,
400
392
  // median value is out of bounds
401
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrMedianValueOutOfBounds"] = 12] = "ErrMedianValueOutOfBounds";
393
+ ErrMedianValueOutOfBounds: 12,
402
394
  // LINK denom doesn't match
403
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrIncorrectRewardPoolDenom"] = 13] = "ErrIncorrectRewardPoolDenom";
395
+ ErrIncorrectRewardPoolDenom: 13,
404
396
  // Reward Pool doesn't exist
405
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrNoRewardPool"] = 14] = "ErrNoRewardPool";
397
+ ErrNoRewardPool: 14,
406
398
  // wrong number of payees and transmitters
407
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrInvalidPayees"] = 15] = "ErrInvalidPayees";
399
+ ErrInvalidPayees: 15,
408
400
  // action is restricted to the module admin
409
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrModuleAdminRestricted"] = 16] = "ErrModuleAdminRestricted";
401
+ ErrModuleAdminRestricted: 16,
410
402
  // feed already exists
411
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrFeedAlreadyExists"] = 17] = "ErrFeedAlreadyExists";
403
+ ErrFeedAlreadyExists: 17,
412
404
  // feed doesnt exists
413
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrFeedDoesntExists"] = 19] = "ErrFeedDoesntExists";
405
+ ErrFeedDoesntExists: 19,
414
406
  // action is admin-restricted
415
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrAdminRestricted"] = 20] = "ErrAdminRestricted";
407
+ ErrAdminRestricted: 20,
416
408
  // insufficient reward pool
417
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrInsufficientRewardPool"] = 21] = "ErrInsufficientRewardPool";
409
+ ErrInsufficientRewardPool: 21,
418
410
  // payee already set
419
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrPayeeAlreadySet"] = 22] = "ErrPayeeAlreadySet";
411
+ ErrPayeeAlreadySet: 22,
420
412
  // action is payee-restricted
421
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrPayeeRestricted"] = 23] = "ErrPayeeRestricted";
413
+ ErrPayeeRestricted: 23,
422
414
  // feed config not found
423
- ChainOcrErrorCodes[ChainOcrErrorCodes["ErrFeedConfigNotFound"] = 24] = "ErrFeedConfigNotFound";
424
- })(ChainOcrErrorCodes || (ChainOcrErrorCodes = {}));
425
- export var ChainOracleErrorCodes;
426
- (function (ChainOracleErrorCodes) {
415
+ ErrFeedConfigNotFound: 24,
416
+ };
417
+ export const ChainOracleErrorCodes = {
427
418
  // relayer address is empty
428
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrEmptyRelayerAddr"] = 1] = "ErrEmptyRelayerAddr";
419
+ ErrEmptyRelayerAddr: 1,
429
420
  // bad rates count
430
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrBadRatesCount"] = 2] = "ErrBadRatesCount";
421
+ ErrBadRatesCount: 2,
431
422
  // bad resolve times
432
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrBadResolveTimesCount"] = 3] = "ErrBadResolveTimesCount";
423
+ ErrBadResolveTimesCount: 3,
433
424
  // bad request ID
434
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrBadRequestIDsCount"] = 4] = "ErrBadRequestIDsCount";
425
+ ErrBadRequestIDsCount: 4,
435
426
  // relayer not authorized
436
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrRelayerNotAuthorized"] = 5] = "ErrRelayerNotAuthorized";
427
+ ErrRelayerNotAuthorized: 5,
437
428
  // bad price feed base count
438
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrBadPriceFeedBaseCount"] = 6] = "ErrBadPriceFeedBaseCount";
429
+ ErrBadPriceFeedBaseCount: 6,
439
430
  // bad price feed quote count
440
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrBadPriceFeedQuoteCount"] = 7] = "ErrBadPriceFeedQuoteCount";
431
+ ErrBadPriceFeedQuoteCount: 7,
441
432
  // unsupported oracle type
442
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrUnsupportedOracleType"] = 8] = "ErrUnsupportedOracleType";
433
+ ErrUnsupportedOracleType: 8,
443
434
  // bad messages count
444
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrBadMessagesCount"] = 9] = "ErrBadMessagesCount";
435
+ ErrBadMessagesCount: 9,
445
436
  // bad Coinbase message
446
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrBadCoinbaseMessage"] = 10] = "ErrBadCoinbaseMessage";
437
+ ErrBadCoinbaseMessage: 10,
447
438
  // bad Ethereum signature
448
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrInvalidEthereumSignature"] = 11] = "ErrInvalidEthereumSignature";
439
+ ErrInvalidEthereumSignature: 11,
449
440
  // bad Coinbase message timestamp
450
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrBadCoinbaseMessageTimestamp"] = 12] = "ErrBadCoinbaseMessageTimestamp";
441
+ ErrBadCoinbaseMessageTimestamp: 12,
451
442
  // Coinbase price not found
452
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrCoinbasePriceNotFound"] = 13] = "ErrCoinbasePriceNotFound";
443
+ ErrCoinbasePriceNotFound: 13,
453
444
  // Prices must be positive
454
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrBadPrice"] = 14] = "ErrBadPrice";
445
+ ErrBadPrice: 14,
455
446
  // Prices must be less than 10 million.
456
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrPriceTooLarge"] = 15] = "ErrPriceTooLarge";
447
+ ErrPriceTooLarge: 15,
457
448
  // Invalid Band IBC Request
458
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrInvalidBandIBCRequest"] = 16] = "ErrInvalidBandIBCRequest";
449
+ ErrInvalidBandIBCRequest: 16,
459
450
  // sample error
460
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrSample"] = 17] = "ErrSample";
451
+ ErrSample: 17,
461
452
  // invalid packet timeout
462
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrInvalidPacketTimeout"] = 18] = "ErrInvalidPacketTimeout";
453
+ ErrInvalidPacketTimeout: 18,
463
454
  // invalid symbols count
464
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrBadSymbolsCount"] = 19] = "ErrBadSymbolsCount";
455
+ ErrBadSymbolsCount: 19,
465
456
  // could not claim port capability
466
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrBadIBCPortBind"] = 20] = "ErrBadIBCPortBind";
457
+ ErrBadIBCPortBind: 20,
467
458
  // invalid IBC Port ID
468
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrInvalidPortID"] = 21] = "ErrInvalidPortID";
459
+ ErrInvalidPortID: 21,
469
460
  // invalid IBC Channel ID
470
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrInvalidChannelID"] = 22] = "ErrInvalidChannelID";
461
+ ErrInvalidChannelID: 22,
471
462
  // invalid Band IBC request interval
472
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrBadRequestInterval"] = 23] = "ErrBadRequestInterval";
463
+ ErrBadRequestInterval: 23,
473
464
  // Invalid Band IBC Update Request Proposal
474
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrInvalidBandIBCUpdateRequest"] = 24] = "ErrInvalidBandIBCUpdateRequest";
465
+ ErrInvalidBandIBCUpdateRequest: 24,
475
466
  // Band IBC Oracle Request not found
476
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrBandIBCRequestNotFound"] = 25] = "ErrBandIBCRequestNotFound";
467
+ ErrBandIBCRequestNotFound: 25,
477
468
  // Base Info is empty
478
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrEmptyBaseInfo"] = 26] = "ErrEmptyBaseInfo";
469
+ ErrEmptyBaseInfo: 26,
479
470
  // provider is empty
480
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrEmptyProvider"] = 27] = "ErrEmptyProvider";
471
+ ErrEmptyProvider: 27,
481
472
  // invalid provider name
482
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrInvalidProvider"] = 28] = "ErrInvalidProvider";
473
+ ErrInvalidProvider: 28,
483
474
  // invalid symbol
484
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrInvalidSymbol"] = 29] = "ErrInvalidSymbol";
475
+ ErrInvalidSymbol: 29,
485
476
  // relayer already exists
486
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrRelayerAlreadyExists"] = 30] = "ErrRelayerAlreadyExists";
477
+ ErrRelayerAlreadyExists: 30,
487
478
  // provider price not found
488
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrProviderPriceNotFound"] = 31] = "ErrProviderPriceNotFound";
479
+ ErrProviderPriceNotFound: 31,
489
480
  // invalid oracle request
490
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrInvalidOracleRequest"] = 32] = "ErrInvalidOracleRequest";
481
+ ErrInvalidOracleRequest: 32,
491
482
  // no price for oracle was found
492
- ChainOracleErrorCodes[ChainOracleErrorCodes["ErrOraclePriceNotFound"] = 33] = "ErrOraclePriceNotFound";
493
- })(ChainOracleErrorCodes || (ChainOracleErrorCodes = {}));
494
- export var ChainPeggyErrorCodes;
495
- (function (ChainPeggyErrorCodes) {
483
+ ErrOraclePriceNotFound: 33,
484
+ };
485
+ export const ChainPeggyErrorCodes = {
496
486
  // internal
497
- ChainPeggyErrorCodes[ChainPeggyErrorCodes["ErrInternal"] = 1] = "ErrInternal";
487
+ ErrInternal: 1,
498
488
  // duplicate
499
- ChainPeggyErrorCodes[ChainPeggyErrorCodes["ErrDuplicate"] = 2] = "ErrDuplicate";
489
+ ErrDuplicate: 2,
500
490
  // invalid
501
- ChainPeggyErrorCodes[ChainPeggyErrorCodes["ErrInvalid"] = 3] = "ErrInvalid";
491
+ ErrInvalid: 3,
502
492
  // timeout
503
- ChainPeggyErrorCodes[ChainPeggyErrorCodes["ErrTimeout"] = 4] = "ErrTimeout";
493
+ ErrTimeout: 4,
504
494
  // unknown
505
- ChainPeggyErrorCodes[ChainPeggyErrorCodes["ErrUnknown"] = 5] = "ErrUnknown";
495
+ ErrUnknown: 5,
506
496
  // empty
507
- ChainPeggyErrorCodes[ChainPeggyErrorCodes["ErrEmpty"] = 6] = "ErrEmpty";
497
+ ErrEmpty: 6,
508
498
  // outdated
509
- ChainPeggyErrorCodes[ChainPeggyErrorCodes["ErrOutdated"] = 7] = "ErrOutdated";
499
+ ErrOutdated: 7,
510
500
  // unsupported
511
- ChainPeggyErrorCodes[ChainPeggyErrorCodes["ErrUnsupported"] = 8] = "ErrUnsupported";
501
+ ErrUnsupported: 8,
512
502
  // non contiguous event nonce
513
- ChainPeggyErrorCodes[ChainPeggyErrorCodes["ErrNonContiguousEventNonce"] = 9] = "ErrNonContiguousEventNonce";
503
+ ErrNonContiguousEventNonce: 9,
514
504
  // no unbatched txs found
515
- ChainPeggyErrorCodes[ChainPeggyErrorCodes["ErrNoUnbatchedTxsFound"] = 10] = "ErrNoUnbatchedTxsFound";
505
+ ErrNoUnbatchedTxsFound: 10,
516
506
  // can not set orchestrator addresses more than once
517
- ChainPeggyErrorCodes[ChainPeggyErrorCodes["ErrResetDelegateKeys"] = 11] = "ErrResetDelegateKeys";
507
+ ErrResetDelegateKeys: 11,
518
508
  // supply cannot exceed max ERC20 value
519
- ChainPeggyErrorCodes[ChainPeggyErrorCodes["ErrSupplyOverflow"] = 12] = "ErrSupplyOverflow";
509
+ ErrSupplyOverflow: 12,
520
510
  // invalid ethereum sender on claim
521
- ChainPeggyErrorCodes[ChainPeggyErrorCodes["ErrInvalidEthSender"] = 13] = "ErrInvalidEthSender";
511
+ ErrInvalidEthSender: 13,
522
512
  // invalid ethereum destination
523
- ChainPeggyErrorCodes[ChainPeggyErrorCodes["ErrInvalidEthDestination"] = 14] = "ErrInvalidEthDestination";
524
- })(ChainPeggyErrorCodes || (ChainPeggyErrorCodes = {}));
525
- export var ChainTokenFactoryErrorCodes;
526
- (function (ChainTokenFactoryErrorCodes) {
513
+ ErrInvalidEthDestination: 14,
514
+ };
515
+ export const ChainTokenFactoryErrorCodes = {
527
516
  // attempting to create a denom that already exists (has bank metadata)
528
- ChainTokenFactoryErrorCodes[ChainTokenFactoryErrorCodes["ErrDenomExists"] = 2] = "ErrDenomExists";
517
+ ErrDenomExists: 2,
529
518
  // unauthorized account
530
- ChainTokenFactoryErrorCodes[ChainTokenFactoryErrorCodes["ErrUnauthorized"] = 3] = "ErrUnauthorized";
519
+ ErrUnauthorized: 3,
531
520
  // invalid denom
532
- ChainTokenFactoryErrorCodes[ChainTokenFactoryErrorCodes["ErrInvalidDenom"] = 4] = "ErrInvalidDenom";
521
+ ErrInvalidDenom: 4,
533
522
  // invalid creator
534
- ChainTokenFactoryErrorCodes[ChainTokenFactoryErrorCodes["ErrInvalidCreator"] = 5] = "ErrInvalidCreator";
523
+ ErrInvalidCreator: 5,
535
524
  // invalid authority metadata
536
- ChainTokenFactoryErrorCodes[ChainTokenFactoryErrorCodes["ErrInvalidAuthorityMetadata"] = 6] = "ErrInvalidAuthorityMetadata";
525
+ ErrInvalidAuthorityMetadata: 6,
537
526
  // invalid genesis
538
- ChainTokenFactoryErrorCodes[ChainTokenFactoryErrorCodes["ErrInvalidGenesis"] = 7] = "ErrInvalidGenesis";
527
+ ErrInvalidGenesis: 7,
539
528
  // subdenom too long, max length is %d bytes
540
- ChainTokenFactoryErrorCodes[ChainTokenFactoryErrorCodes["ErrSubdenomTooLong"] = 8] = "ErrSubdenomTooLong";
529
+ ErrSubdenomTooLong: 8,
541
530
  // subdenom too short, min length is %d bytes
542
- ChainTokenFactoryErrorCodes[ChainTokenFactoryErrorCodes["ErrSubdenomTooShort"] = 9] = "ErrSubdenomTooShort";
531
+ ErrSubdenomTooShort: 9,
543
532
  // nested subdenom too short, each one should have at least %d bytes
544
- ChainTokenFactoryErrorCodes[ChainTokenFactoryErrorCodes["ErrSubdenomNestedTooShort"] = 10] = "ErrSubdenomNestedTooShort";
533
+ ErrSubdenomNestedTooShort: 10,
545
534
  // creator too long, max length is %d bytes
546
- ChainTokenFactoryErrorCodes[ChainTokenFactoryErrorCodes["ErrCreatorTooLong"] = 11] = "ErrCreatorTooLong";
535
+ ErrCreatorTooLong: 11,
547
536
  // denom does not exist
548
- ChainTokenFactoryErrorCodes[ChainTokenFactoryErrorCodes["ErrDenomDoesNotExist"] = 12] = "ErrDenomDoesNotExist";
537
+ ErrDenomDoesNotExist: 12,
549
538
  // amount has to be positive
550
- ChainTokenFactoryErrorCodes[ChainTokenFactoryErrorCodes["ErrAmountNotPositive"] = 13] = "ErrAmountNotPositive";
551
- })(ChainTokenFactoryErrorCodes || (ChainTokenFactoryErrorCodes = {}));
552
- export var ChainWasmXErrorCodes;
553
- (function (ChainWasmXErrorCodes) {
539
+ ErrAmountNotPositive: 13,
540
+ };
541
+ export const ChainWasmXErrorCodes = {
554
542
  // invalid gas limit
555
- ChainWasmXErrorCodes[ChainWasmXErrorCodes["ErrInvalidGasLimit"] = 1] = "ErrInvalidGasLimit";
543
+ ErrInvalidGasLimit: 1,
556
544
  // invalid gas price
557
- ChainWasmXErrorCodes[ChainWasmXErrorCodes["ErrInvalidGasPrice"] = 2] = "ErrInvalidGasPrice";
545
+ ErrInvalidGasPrice: 2,
558
546
  // invalid contract address
559
- ChainWasmXErrorCodes[ChainWasmXErrorCodes["ErrInvalidContractAddress"] = 3] = "ErrInvalidContractAddress";
547
+ ErrInvalidContractAddress: 3,
560
548
  // contract already registered
561
- ChainWasmXErrorCodes[ChainWasmXErrorCodes["ErrAlreadyRegistered"] = 4] = "ErrAlreadyRegistered";
549
+ ErrAlreadyRegistered: 4,
562
550
  // duplicate contract
563
- ChainWasmXErrorCodes[ChainWasmXErrorCodes["ErrDuplicateContract"] = 5] = "ErrDuplicateContract";
551
+ ErrDuplicateContract: 5,
564
552
  // no contract addresses found
565
- ChainWasmXErrorCodes[ChainWasmXErrorCodes["ErrNoContractAddresses"] = 6] = "ErrNoContractAddresses";
553
+ ErrNoContractAddresses: 6,
566
554
  // invalid code id
567
- ChainWasmXErrorCodes[ChainWasmXErrorCodes["ErrInvalidCodeId"] = 7] = "ErrInvalidCodeId";
568
- })(ChainWasmXErrorCodes || (ChainWasmXErrorCodes = {}));
569
- export var ChainStakingErrorCodes;
570
- (function (ChainStakingErrorCodes) {
555
+ ErrInvalidCodeId: 7,
556
+ };
557
+ export const ChainStakingErrorCodes = {
571
558
  // "empty validator address"
572
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrEmptyValidatorAddr"] = 2] = "ErrEmptyValidatorAddr";
559
+ ErrEmptyValidatorAddr: 2,
573
560
  // "validator does not exist"
574
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrNoValidatorFound"] = 3] = "ErrNoValidatorFound";
561
+ ErrNoValidatorFound: 3,
575
562
  // "validator already exist for this operator address; must use new validator operator address"
576
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrValidatorOwnerExists"] = 4] = "ErrValidatorOwnerExists";
563
+ ErrValidatorOwnerExists: 4,
577
564
  // "validator already exist for this pubkey; must use new validator pubkey"
578
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrValidatorPubKeyExists"] = 5] = "ErrValidatorPubKeyExists";
565
+ ErrValidatorPubKeyExists: 5,
579
566
  // "validator pubkey type is not supported"
580
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrValidatorPubKeyTypeNotSupported"] = 6] = "ErrValidatorPubKeyTypeNotSupported";
567
+ ErrValidatorPubKeyTypeNotSupported: 6,
581
568
  // "validator for this address is currently jailed"
582
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrValidatorJailed"] = 7] = "ErrValidatorJailed";
569
+ ErrValidatorJailed: 7,
583
570
  // "failed to remove validator"
584
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrBadRemoveValidator"] = 8] = "ErrBadRemoveValidator";
571
+ ErrBadRemoveValidator: 8,
585
572
  // "commission must be positive"
586
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrCommissionNegative"] = 9] = "ErrCommissionNegative";
573
+ ErrCommissionNegative: 9,
587
574
  // "commission cannot be more than 100%"
588
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrCommissionHuge"] = 10] = "ErrCommissionHuge";
575
+ ErrCommissionHuge: 10,
589
576
  // "commission cannot be more than the max rate"
590
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrCommissionGTMaxRate"] = 11] = "ErrCommissionGTMaxRate";
577
+ ErrCommissionGTMaxRate: 11,
591
578
  // "commission cannot be changed more than once in 24h"
592
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrCommissionUpdateTime"] = 12] = "ErrCommissionUpdateTime";
579
+ ErrCommissionUpdateTime: 12,
593
580
  // "commission change rate must be positive"
594
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrCommissionChangeRateNegative"] = 13] = "ErrCommissionChangeRateNegative";
581
+ ErrCommissionChangeRateNegative: 13,
595
582
  // "commission change rate cannot be more than the max rate"
596
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrCommissionChangeRateGTMaxRate"] = 14] = "ErrCommissionChangeRateGTMaxRate";
583
+ ErrCommissionChangeRateGTMaxRate: 14,
597
584
  // "commission cannot be changed more than max change rate"
598
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrCommissionGTMaxChangeRate"] = 15] = "ErrCommissionGTMaxChangeRate";
585
+ ErrCommissionGTMaxChangeRate: 15,
599
586
  // "validator's self delegation must be greater than their minimum self delegation"
600
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrSelfDelegationBelowMinimum"] = 16] = "ErrSelfDelegationBelowMinimum";
587
+ ErrSelfDelegationBelowMinimum: 16,
601
588
  // "minimum self delegation cannot be decrease"
602
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrMinSelfDelegationDecreased"] = 17] = "ErrMinSelfDelegationDecreased";
589
+ ErrMinSelfDelegationDecreased: 17,
603
590
  // "empty delegator address"
604
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrEmptyDelegatorAddr"] = 18] = "ErrEmptyDelegatorAddr";
591
+ ErrEmptyDelegatorAddr: 18,
605
592
  // "no delegation for (address, validator) tuple"
606
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrNoDelegation"] = 19] = "ErrNoDelegation";
593
+ ErrNoDelegation: 19,
607
594
  // "delegator does not exist with address"
608
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrBadDelegatorAddr"] = 20] = "ErrBadDelegatorAddr";
595
+ ErrBadDelegatorAddr: 20,
609
596
  // "delegator does not contain delegation"
610
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrNoDelegatorForAddress"] = 21] = "ErrNoDelegatorForAddress";
597
+ ErrNoDelegatorForAddress: 21,
611
598
  // "insufficient delegation shares"
612
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrInsufficientShares"] = 22] = "ErrInsufficientShares";
599
+ ErrInsufficientShares: 22,
613
600
  // "cannot delegate to an empty validator"
614
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrDelegationValidatorEmpty"] = 23] = "ErrDelegationValidatorEmpty";
601
+ ErrDelegationValidatorEmpty: 23,
615
602
  // "not enough delegation shares"
616
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrNotEnoughDelegationShares"] = 24] = "ErrNotEnoughDelegationShares";
603
+ ErrNotEnoughDelegationShares: 24,
617
604
  // "entry not mature"
618
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrNotMature"] = 25] = "ErrNotMature";
605
+ ErrNotMature: 25,
619
606
  // "no unbonding delegation found"
620
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrNoUnbondingDelegation"] = 26] = "ErrNoUnbondingDelegation";
607
+ ErrNoUnbondingDelegation: 26,
621
608
  // "too many unbonding delegation entries for (delegator, validator) tuple"
622
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrMaxUnbondingDelegationEntries"] = 27] = "ErrMaxUnbondingDelegationEntries";
609
+ ErrMaxUnbondingDelegationEntries: 27,
623
610
  // "no redelegation found"
624
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrNoRedelegation"] = 28] = "ErrNoRedelegation";
611
+ ErrNoRedelegation: 28,
625
612
  // "cannot redelegate to the same validator"
626
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrSelfRedelegation"] = 29] = "ErrSelfRedelegation";
613
+ ErrSelfRedelegation: 29,
627
614
  // "too few tokens to redelegate (truncates to zero tokens)"
628
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrTinyRedelegationAmount"] = 30] = "ErrTinyRedelegationAmount";
615
+ ErrTinyRedelegationAmount: 30,
629
616
  // "redelegation destination validator not found"
630
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrBadRedelegationDst"] = 31] = "ErrBadRedelegationDst";
617
+ ErrBadRedelegationDst: 31,
631
618
  // "redelegation to this validator already in progress; first redelegation to this validator must complete before next redelegation"
632
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrTransitiveRedelegation"] = 32] = "ErrTransitiveRedelegation";
619
+ ErrTransitiveRedelegation: 32,
633
620
  // "too many redelegation entries for (delegator, src-validator, dst-validator) tuple"
634
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrMaxRedelegationEntries"] = 33] = "ErrMaxRedelegationEntries";
621
+ ErrMaxRedelegationEntries: 33,
635
622
  // "cannot delegate to validators with invalid (zero) ex-rate"
636
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrDelegatorShareExRateInvalid"] = 34] = "ErrDelegatorShareExRateInvalid";
623
+ ErrDelegatorShareExRateInvalid: 34,
637
624
  // "both shares amount and shares percent provided"
638
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrBothShareMsgsGiven"] = 35] = "ErrBothShareMsgsGiven";
625
+ ErrBothShareMsgsGiven: 35,
639
626
  // "neither shares amount nor shares percent provided"
640
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrNeitherShareMsgsGiven"] = 36] = "ErrNeitherShareMsgsGiven";
627
+ ErrNeitherShareMsgsGiven: 36,
641
628
  // "invalid historical info"
642
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrInvalidHistoricalInfo"] = 37] = "ErrInvalidHistoricalInfo";
629
+ ErrInvalidHistoricalInfo: 37,
643
630
  // "no historical info found"
644
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrNoHistoricalInfo"] = 38] = "ErrNoHistoricalInfo";
631
+ ErrNoHistoricalInfo: 38,
645
632
  // "empty validator public key"
646
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrEmptyValidatorPubKey"] = 39] = "ErrEmptyValidatorPubKey";
633
+ ErrEmptyValidatorPubKey: 39,
647
634
  // "commission cannot be less than min rate"
648
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrCommissionLTMinRate"] = 40] = "ErrCommissionLTMinRate";
635
+ ErrCommissionLTMinRate: 40,
649
636
  // "unbonding operation not found"
650
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrUnbondingNotFound"] = 41] = "ErrUnbondingNotFound";
637
+ ErrUnbondingNotFound: 41,
651
638
  // "cannot un-hold unbonding operation that is not on hold"
652
- ChainStakingErrorCodes[ChainStakingErrorCodes["ErrUnbondingOnHoldRefCountNegative"] = 42] = "ErrUnbondingOnHoldRefCountNegative";
653
- })(ChainStakingErrorCodes || (ChainStakingErrorCodes = {}));
654
- export var ChainGovErrorCodes;
655
- (function (ChainGovErrorCodes) {
639
+ ErrUnbondingOnHoldRefCountNegative: 42,
640
+ };
641
+ export const ChainGovErrorCodes = {
656
642
  // "unknown proposal"
657
- ChainGovErrorCodes[ChainGovErrorCodes["ErrUnknownProposal"] = 2] = "ErrUnknownProposal";
643
+ ErrUnknownProposal: 2,
658
644
  // "inactive proposal"
659
- ChainGovErrorCodes[ChainGovErrorCodes["ErrInactiveProposal"] = 3] = "ErrInactiveProposal";
645
+ ErrInactiveProposal: 3,
660
646
  // "proposal already active)
661
- ChainGovErrorCodes[ChainGovErrorCodes["ErrAlreadyActiveProposal"] = 4] = "ErrAlreadyActiveProposal";
647
+ ErrAlreadyActiveProposal: 4,
662
648
  // "invalid proposal content"
663
- ChainGovErrorCodes[ChainGovErrorCodes["ErrInvalidProposalContent"] = 5] = "ErrInvalidProposalContent";
649
+ ErrInvalidProposalContent: 5,
664
650
  // "invalid proposal type"
665
- ChainGovErrorCodes[ChainGovErrorCodes["ErrInvalidProposalType"] = 6] = "ErrInvalidProposalType";
651
+ ErrInvalidProposalType: 6,
666
652
  // "invalid vote option"
667
- ChainGovErrorCodes[ChainGovErrorCodes["ErrInvalidVote"] = 7] = "ErrInvalidVote";
653
+ ErrInvalidVote: 7,
668
654
  // "invalid genesis state"
669
- ChainGovErrorCodes[ChainGovErrorCodes["ErrInvalidGenesis"] = 8] = "ErrInvalidGenesis";
655
+ ErrInvalidGenesis: 8,
670
656
  // "no handler exists for proosal type")
671
- ChainGovErrorCodes[ChainGovErrorCodes["ErrNoProposalHandlerExists"] = 9] = "ErrNoProposalHandlerExists";
657
+ ErrNoProposalHandlerExists: 9,
672
658
  // "proposal message not recognized by router")
673
- ChainGovErrorCodes[ChainGovErrorCodes["ErrUnroutableProposalMsg"] = 10] = "ErrUnroutableProposalMsg";
659
+ ErrUnroutableProposalMsg: 10,
674
660
  // "no messages proposed"
675
- ChainGovErrorCodes[ChainGovErrorCodes["ErrNoProposalMsgs"] = 11] = "ErrNoProposalMsgs";
661
+ ErrNoProposalMsgs: 11,
676
662
  // "invalid proposal message"
677
- ChainGovErrorCodes[ChainGovErrorCodes["ErrInvalidProposalMsg"] = 12] = "ErrInvalidProposalMsg";
663
+ ErrInvalidProposalMsg: 12,
678
664
  // "expected gov account as ony signer for proposal message")
679
- ChainGovErrorCodes[ChainGovErrorCodes["ErrInvalidSigner"] = 13] = "ErrInvalidSigner";
665
+ ErrInvalidSigner: 13,
680
666
  // "signal message is invalid"
681
- ChainGovErrorCodes[ChainGovErrorCodes["ErrInvalidSignalMsg"] = 14] = "ErrInvalidSignalMsg";
667
+ ErrInvalidSignalMsg: 14,
682
668
  // "metadata too long"
683
- ChainGovErrorCodes[ChainGovErrorCodes["ErrMetadataTooLong"] = 15] = "ErrMetadataTooLong";
669
+ ErrMetadataTooLong: 15,
684
670
  // "minimum deposit is too smal")
685
- ChainGovErrorCodes[ChainGovErrorCodes["ErrMinDepositTooSmall"] = 16] = "ErrMinDepositTooSmall";
671
+ ErrMinDepositTooSmall: 16,
686
672
  // "proposal is not found"
687
- ChainGovErrorCodes[ChainGovErrorCodes["ErrProposalNotFound"] = 17] = "ErrProposalNotFound";
673
+ ErrProposalNotFound: 17,
688
674
  // "invalid proposer"
689
- ChainGovErrorCodes[ChainGovErrorCodes["ErrInvalidProposer"] = 18] = "ErrInvalidProposer";
675
+ ErrInvalidProposer: 18,
690
676
  // "no deposits found"
691
- ChainGovErrorCodes[ChainGovErrorCodes["ErrNoDeposits"] = 19] = "ErrNoDeposits";
677
+ ErrNoDeposits: 19,
692
678
  // "voting period already ende")
693
- ChainGovErrorCodes[ChainGovErrorCodes["ErrVotingPeriodEnded"] = 20] = "ErrVotingPeriodEnded";
679
+ ErrVotingPeriodEnded: 20,
694
680
  // "invalid proposal"
695
- ChainGovErrorCodes[ChainGovErrorCodes["ErrInvalidProposal"] = 21] = "ErrInvalidProposal";
696
- })(ChainGovErrorCodes || (ChainGovErrorCodes = {}));
697
- export var ChainDistributionErrorCodes;
698
- (function (ChainDistributionErrorCodes) {
681
+ ErrInvalidProposal: 21,
682
+ };
683
+ export const ChainDistributionErrorCodes = {
699
684
  // "delegator address is empty"
700
- ChainDistributionErrorCodes[ChainDistributionErrorCodes["ErrEmptyDelegatorAddr"] = 2] = "ErrEmptyDelegatorAddr";
685
+ ErrEmptyDelegatorAddr: 2,
701
686
  // "withdraw address is empty"
702
- ChainDistributionErrorCodes[ChainDistributionErrorCodes["ErrEmptyWithdrawAddr"] = 3] = "ErrEmptyWithdrawAddr";
687
+ ErrEmptyWithdrawAddr: 3,
703
688
  // "validator address is empty"
704
- ChainDistributionErrorCodes[ChainDistributionErrorCodes["ErrEmptyValidatorAddr"] = 4] = "ErrEmptyValidatorAddr";
689
+ ErrEmptyValidatorAddr: 4,
705
690
  // "no delegation distribution info"
706
- ChainDistributionErrorCodes[ChainDistributionErrorCodes["ErrEmptyDelegationDistInfo"] = 5] = "ErrEmptyDelegationDistInfo";
691
+ ErrEmptyDelegationDistInfo: 5,
707
692
  // "no validator distribution info"
708
- ChainDistributionErrorCodes[ChainDistributionErrorCodes["ErrNoValidatorDistInfo"] = 6] = "ErrNoValidatorDistInfo";
693
+ ErrNoValidatorDistInfo: 6,
709
694
  // "no validator commission to withdraw"
710
- ChainDistributionErrorCodes[ChainDistributionErrorCodes["ErrNoValidatorCommission"] = 7] = "ErrNoValidatorCommission";
695
+ ErrNoValidatorCommission: 7,
711
696
  // "set withdraw address disabled"
712
- ChainDistributionErrorCodes[ChainDistributionErrorCodes["ErrSetWithdrawAddrDisabled"] = 8] = "ErrSetWithdrawAddrDisabled";
697
+ ErrSetWithdrawAddrDisabled: 8,
713
698
  // "community pool does not have sufficient coins to distribute"
714
- ChainDistributionErrorCodes[ChainDistributionErrorCodes["ErrBadDistribution"] = 9] = "ErrBadDistribution";
699
+ ErrBadDistribution: 9,
715
700
  // "invalid community pool spend proposal amount"
716
- ChainDistributionErrorCodes[ChainDistributionErrorCodes["ErrInvalidProposalAmount"] = 10] = "ErrInvalidProposalAmount";
701
+ ErrInvalidProposalAmount: 10,
717
702
  // "invalid community pool spend proposal recipient"
718
- ChainDistributionErrorCodes[ChainDistributionErrorCodes["ErrEmptyProposalRecipient"] = 11] = "ErrEmptyProposalRecipient";
703
+ ErrEmptyProposalRecipient: 11,
719
704
  // "validator does not exist"
720
- ChainDistributionErrorCodes[ChainDistributionErrorCodes["ErrNoValidatorExists"] = 12] = "ErrNoValidatorExists";
705
+ ErrNoValidatorExists: 12,
721
706
  // "delegation does not exist"
722
- ChainDistributionErrorCodes[ChainDistributionErrorCodes["ErrNoDelegationExists"] = 13] = "ErrNoDelegationExists";
723
- })(ChainDistributionErrorCodes || (ChainDistributionErrorCodes = {}));
724
- export var ChainBankErrorCodes;
725
- (function (ChainBankErrorCodes) {
707
+ ErrNoDelegationExists: 13,
708
+ };
709
+ export const ChainBankErrorCodes = {
726
710
  // "no inputs to send transaction"
727
- ChainBankErrorCodes[ChainBankErrorCodes["ErrNoInputs"] = 2] = "ErrNoInputs";
711
+ ErrNoInputs: 2,
728
712
  // "no outputs to send transaction"
729
- ChainBankErrorCodes[ChainBankErrorCodes["ErrNoOutputs"] = 3] = "ErrNoOutputs";
713
+ ErrNoOutputs: 3,
730
714
  // "sum inputs != sum outputs"
731
- ChainBankErrorCodes[ChainBankErrorCodes["ErrInputOutputMismatch"] = 4] = "ErrInputOutputMismatch";
715
+ ErrInputOutputMismatch: 4,
732
716
  // "send transactions are disabled"
733
- ChainBankErrorCodes[ChainBankErrorCodes["ErrSendDisabled"] = 5] = "ErrSendDisabled";
717
+ ErrSendDisabled: 5,
734
718
  // "client denom metadata not found"
735
- ChainBankErrorCodes[ChainBankErrorCodes["ErrDenomMetadataNotFound"] = 6] = "ErrDenomMetadataNotFound";
719
+ ErrDenomMetadataNotFound: 6,
736
720
  // "invalid key"
737
- ChainBankErrorCodes[ChainBankErrorCodes["ErrInvalidKey"] = 7] = "ErrInvalidKey";
721
+ ErrInvalidKey: 7,
738
722
  // "duplicate entry"
739
- ChainBankErrorCodes[ChainBankErrorCodes["ErrDuplicateEntry"] = 8] = "ErrDuplicateEntry";
723
+ ErrDuplicateEntry: 8,
740
724
  // "multiple senders not allowed"
741
- ChainBankErrorCodes[ChainBankErrorCodes["ErrMultipleSenders"] = 9] = "ErrMultipleSenders";
742
- })(ChainBankErrorCodes || (ChainBankErrorCodes = {}));
743
- export var ChainWasmErrorCodes;
744
- (function (ChainWasmErrorCodes) {
725
+ ErrMultipleSenders: 9,
726
+ };
727
+ export const ChainWasmErrorCodes = {
745
728
  // ErrCreateFailed error for wasm code that has already been uploaded or failed
746
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrCreateFailed"] = 2] = "ErrCreateFailed";
729
+ ErrCreateFailed: 2,
747
730
  // ErrAccountExists error for a contract account that already exists
748
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrAccountExists"] = 3] = "ErrAccountExists";
731
+ ErrAccountExists: 3,
749
732
  // ErrInstantiateFailed error for rust instantiate contract failure
750
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrInstantiateFailed"] = 4] = "ErrInstantiateFailed";
733
+ ErrInstantiateFailed: 4,
751
734
  // ErrExecuteFailed error for rust execution contract failure
752
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrExecuteFailed"] = 5] = "ErrExecuteFailed";
735
+ ErrExecuteFailed: 5,
753
736
  // ErrGasLimit error for out of gas
754
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrGasLimit"] = 6] = "ErrGasLimit";
737
+ ErrGasLimit: 6,
755
738
  // ErrInvalidGenesis error for invalid genesis file syntax
756
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrInvalidGenesis"] = 7] = "ErrInvalidGenesis";
739
+ ErrInvalidGenesis: 7,
757
740
  // ErrNotFound error for an entry not found in the store
758
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrNotFound"] = 8] = "ErrNotFound";
741
+ ErrNotFound: 8,
759
742
  // ErrQueryFailed error for rust smart query contract failure
760
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrQueryFailed"] = 9] = "ErrQueryFailed";
743
+ ErrQueryFailed: 9,
761
744
  // ErrInvalidMsg error when we cannot process the error returned from the contract
762
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrInvalidMsg"] = 10] = "ErrInvalidMsg";
745
+ ErrInvalidMsg: 10,
763
746
  // ErrMigrationFailed error for rust execution contract failure
764
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrMigrationFailed"] = 11] = "ErrMigrationFailed";
747
+ ErrMigrationFailed: 11,
765
748
  // ErrEmpty error for empty content
766
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrEmpty"] = 12] = "ErrEmpty";
749
+ ErrEmpty: 12,
767
750
  // ErrLimit error for content that exceeds a limit
768
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrLimit"] = 13] = "ErrLimit";
751
+ ErrLimit: 13,
769
752
  // ErrInvalid error for content that is invalid in this context
770
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrInvalid"] = 14] = "ErrInvalid";
753
+ ErrInvalid: 14,
771
754
  // ErrDuplicate error for content that exists
772
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrDuplicate"] = 15] = "ErrDuplicate";
755
+ ErrDuplicate: 15,
773
756
  // ErrMaxIBCChannels error for maximum number of ibc channels reached
774
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrMaxIBCChannels"] = 16] = "ErrMaxIBCChannels";
757
+ ErrMaxIBCChannels: 16,
775
758
  // ErrUnsupportedForContract error when a capability is used that is not supported for/ by this contract
776
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrUnsupportedForContract"] = 17] = "ErrUnsupportedForContract";
759
+ ErrUnsupportedForContract: 17,
777
760
  // ErrPinContractFailed error for pinning contract failures
778
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrPinContractFailed"] = 18] = "ErrPinContractFailed";
761
+ ErrPinContractFailed: 18,
779
762
  // ErrUnpinContractFailed error for unpinning contract failures
780
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrUnpinContractFailed"] = 19] = "ErrUnpinContractFailed";
763
+ ErrUnpinContractFailed: 19,
781
764
  // ErrUnknownMsg error by a message handler to show that it is not responsible for this message type
782
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrUnknownMsg"] = 20] = "ErrUnknownMsg";
765
+ ErrUnknownMsg: 20,
783
766
  // ErrInvalidEvent error if an attribute/event from the contract is invalid
784
- ChainWasmErrorCodes[ChainWasmErrorCodes["ErrInvalidEvent"] = 21] = "ErrInvalidEvent";
785
- })(ChainWasmErrorCodes || (ChainWasmErrorCodes = {}));
767
+ ErrInvalidEvent: 21,
768
+ };
786
769
  export const UnspecifiedErrorCode = -1;
787
770
  export const GRPC_REQUEST_FAILED = GrpcErrorCode.Unavailable;