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