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