@kamino-finance/metavault-sdk 0.1.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/README.md +251 -0
- package/dist/@codegen/metavault/accounts/GlobalConfig.d.ts +46 -0
- package/dist/@codegen/metavault/accounts/GlobalConfig.d.ts.map +1 -0
- package/dist/@codegen/metavault/accounts/GlobalConfig.js +138 -0
- package/dist/@codegen/metavault/accounts/GlobalConfig.js.map +1 -0
- package/dist/@codegen/metavault/accounts/VaultState.d.ts +116 -0
- package/dist/@codegen/metavault/accounts/VaultState.d.ts.map +1 -0
- package/dist/@codegen/metavault/accounts/VaultState.js +277 -0
- package/dist/@codegen/metavault/accounts/VaultState.js.map +1 -0
- package/dist/@codegen/metavault/accounts/index.d.ts +5 -0
- package/dist/@codegen/metavault/accounts/index.d.ts.map +1 -0
- package/dist/@codegen/metavault/accounts/index.js +8 -0
- package/dist/@codegen/metavault/accounts/index.js.map +1 -0
- package/dist/@codegen/metavault/errors/anchor.d.ts +435 -0
- package/dist/@codegen/metavault/errors/anchor.d.ts.map +1 -0
- package/dist/@codegen/metavault/errors/anchor.js +767 -0
- package/dist/@codegen/metavault/errors/anchor.js.map +1 -0
- package/dist/@codegen/metavault/errors/custom.d.ts +507 -0
- package/dist/@codegen/metavault/errors/custom.d.ts.map +1 -0
- package/dist/@codegen/metavault/errors/custom.js +893 -0
- package/dist/@codegen/metavault/errors/custom.js.map +1 -0
- package/dist/@codegen/metavault/errors/index.d.ts +6 -0
- package/dist/@codegen/metavault/errors/index.d.ts.map +1 -0
- package/dist/@codegen/metavault/errors/index.js +86 -0
- package/dist/@codegen/metavault/errors/index.js.map +1 -0
- package/dist/@codegen/metavault/instructions/addVaultToken.d.ts +27 -0
- package/dist/@codegen/metavault/instructions/addVaultToken.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/addVaultToken.js +76 -0
- package/dist/@codegen/metavault/instructions/addVaultToken.js.map +1 -0
- package/dist/@codegen/metavault/instructions/buy.d.ts +40 -0
- package/dist/@codegen/metavault/instructions/buy.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/buy.js +84 -0
- package/dist/@codegen/metavault/instructions/buy.js.map +1 -0
- package/dist/@codegen/metavault/instructions/buyProportional.d.ts +29 -0
- package/dist/@codegen/metavault/instructions/buyProportional.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/buyProportional.js +70 -0
- package/dist/@codegen/metavault/instructions/buyProportional.js.map +1 -0
- package/dist/@codegen/metavault/instructions/finishRebalance.d.ts +7 -0
- package/dist/@codegen/metavault/instructions/finishRebalance.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/finishRebalance.js +16 -0
- package/dist/@codegen/metavault/instructions/finishRebalance.js.map +1 -0
- package/dist/@codegen/metavault/instructions/giveUpPendingFees.d.ts +21 -0
- package/dist/@codegen/metavault/instructions/giveUpPendingFees.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/giveUpPendingFees.js +68 -0
- package/dist/@codegen/metavault/instructions/giveUpPendingFees.js.map +1 -0
- package/dist/@codegen/metavault/instructions/index.d.ts +39 -0
- package/dist/@codegen/metavault/instructions/index.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/index.js +42 -0
- package/dist/@codegen/metavault/instructions/index.js.map +1 -0
- package/dist/@codegen/metavault/instructions/initGlobalConfig.d.ts +11 -0
- package/dist/@codegen/metavault/instructions/initGlobalConfig.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/initGlobalConfig.js +22 -0
- package/dist/@codegen/metavault/instructions/initGlobalConfig.js.map +1 -0
- package/dist/@codegen/metavault/instructions/initVault.d.ts +32 -0
- package/dist/@codegen/metavault/instructions/initVault.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/initVault.js +79 -0
- package/dist/@codegen/metavault/instructions/initVault.js.map +1 -0
- package/dist/@codegen/metavault/instructions/initializeSharesMetadata.d.ts +29 -0
- package/dist/@codegen/metavault/instructions/initializeSharesMetadata.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/initializeSharesMetadata.js +78 -0
- package/dist/@codegen/metavault/instructions/initializeSharesMetadata.js.map +1 -0
- package/dist/@codegen/metavault/instructions/rebalanceSwap.d.ts +31 -0
- package/dist/@codegen/metavault/instructions/rebalanceSwap.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/rebalanceSwap.js +77 -0
- package/dist/@codegen/metavault/instructions/rebalanceSwap.js.map +1 -0
- package/dist/@codegen/metavault/instructions/sell.d.ts +38 -0
- package/dist/@codegen/metavault/instructions/sell.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/sell.js +84 -0
- package/dist/@codegen/metavault/instructions/sell.js.map +1 -0
- package/dist/@codegen/metavault/instructions/sellProportional.d.ts +29 -0
- package/dist/@codegen/metavault/instructions/sellProportional.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/sellProportional.js +70 -0
- package/dist/@codegen/metavault/instructions/sellProportional.js.map +1 -0
- package/dist/@codegen/metavault/instructions/startRebalance.d.ts +21 -0
- package/dist/@codegen/metavault/instructions/startRebalance.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/startRebalance.js +68 -0
- package/dist/@codegen/metavault/instructions/startRebalance.js.map +1 -0
- package/dist/@codegen/metavault/instructions/stopRebalance.d.ts +8 -0
- package/dist/@codegen/metavault/instructions/stopRebalance.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/stopRebalance.js +23 -0
- package/dist/@codegen/metavault/instructions/stopRebalance.js.map +1 -0
- package/dist/@codegen/metavault/instructions/updateAdmin.d.ts +8 -0
- package/dist/@codegen/metavault/instructions/updateAdmin.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/updateAdmin.js +23 -0
- package/dist/@codegen/metavault/instructions/updateAdmin.js.map +1 -0
- package/dist/@codegen/metavault/instructions/updateGlobalConfig.d.ts +22 -0
- package/dist/@codegen/metavault/instructions/updateGlobalConfig.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/updateGlobalConfig.js +71 -0
- package/dist/@codegen/metavault/instructions/updateGlobalConfig.js.map +1 -0
- package/dist/@codegen/metavault/instructions/updateGlobalConfigAdmin.d.ts +8 -0
- package/dist/@codegen/metavault/instructions/updateGlobalConfigAdmin.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/updateGlobalConfigAdmin.js +23 -0
- package/dist/@codegen/metavault/instructions/updateGlobalConfigAdmin.js.map +1 -0
- package/dist/@codegen/metavault/instructions/updateSharesMetadata.d.ts +26 -0
- package/dist/@codegen/metavault/instructions/updateSharesMetadata.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/updateSharesMetadata.js +77 -0
- package/dist/@codegen/metavault/instructions/updateSharesMetadata.js.map +1 -0
- package/dist/@codegen/metavault/instructions/updateVaultConfig.d.ts +23 -0
- package/dist/@codegen/metavault/instructions/updateVaultConfig.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/updateVaultConfig.js +73 -0
- package/dist/@codegen/metavault/instructions/updateVaultConfig.js.map +1 -0
- package/dist/@codegen/metavault/instructions/withdrawPendingFees.d.ts +12 -0
- package/dist/@codegen/metavault/instructions/withdrawPendingFees.d.ts.map +1 -0
- package/dist/@codegen/metavault/instructions/withdrawPendingFees.js +27 -0
- package/dist/@codegen/metavault/instructions/withdrawPendingFees.js.map +1 -0
- package/dist/@codegen/metavault/programId.d.ts +4 -0
- package/dist/@codegen/metavault/programId.d.ts.map +1 -0
- package/dist/@codegen/metavault/programId.js +9 -0
- package/dist/@codegen/metavault/programId.js.map +1 -0
- package/dist/@codegen/metavault/types/RebalanceState.d.ts +31 -0
- package/dist/@codegen/metavault/types/RebalanceState.d.ts.map +1 -0
- package/dist/@codegen/metavault/types/RebalanceState.js +72 -0
- package/dist/@codegen/metavault/types/RebalanceState.js.map +1 -0
- package/dist/@codegen/metavault/types/ScopeConfiguration.d.ts +51 -0
- package/dist/@codegen/metavault/types/ScopeConfiguration.d.ts.map +1 -0
- package/dist/@codegen/metavault/types/ScopeConfiguration.js +94 -0
- package/dist/@codegen/metavault/types/ScopeConfiguration.js.map +1 -0
- package/dist/@codegen/metavault/types/UpdateGlobalConfigMode.d.ts +115 -0
- package/dist/@codegen/metavault/types/UpdateGlobalConfigMode.d.ts.map +1 -0
- package/dist/@codegen/metavault/types/UpdateGlobalConfigMode.js +223 -0
- package/dist/@codegen/metavault/types/UpdateGlobalConfigMode.js.map +1 -0
- package/dist/@codegen/metavault/types/VaultConfigField.d.ts +261 -0
- package/dist/@codegen/metavault/types/VaultConfigField.d.ts.map +1 -0
- package/dist/@codegen/metavault/types/VaultConfigField.js +516 -0
- package/dist/@codegen/metavault/types/VaultConfigField.js.map +1 -0
- package/dist/@codegen/metavault/types/VaultToken.d.ts +174 -0
- package/dist/@codegen/metavault/types/VaultToken.d.ts.map +1 -0
- package/dist/@codegen/metavault/types/VaultToken.js +262 -0
- package/dist/@codegen/metavault/types/VaultToken.js.map +1 -0
- package/dist/@codegen/metavault/types/index.d.ts +15 -0
- package/dist/@codegen/metavault/types/index.d.ts.map +1 -0
- package/dist/@codegen/metavault/types/index.js +47 -0
- package/dist/@codegen/metavault/types/index.js.map +1 -0
- package/dist/@codegen/metavault/utils/borsh.d.ts +49 -0
- package/dist/@codegen/metavault/utils/borsh.d.ts.map +1 -0
- package/dist/@codegen/metavault/utils/borsh.js +598 -0
- package/dist/@codegen/metavault/utils/borsh.js.map +1 -0
- package/dist/@codegen/metavault/utils/borshAddress.d.ts +4 -0
- package/dist/@codegen/metavault/utils/borshAddress.d.ts.map +1 -0
- package/dist/@codegen/metavault/utils/borshAddress.js +30 -0
- package/dist/@codegen/metavault/utils/borshAddress.js.map +1 -0
- package/dist/@codegen/metavault/utils/index.d.ts +2 -0
- package/dist/@codegen/metavault/utils/index.d.ts.map +1 -0
- package/dist/@codegen/metavault/utils/index.js +18 -0
- package/dist/@codegen/metavault/utils/index.js.map +1 -0
- package/dist/classes/index.d.ts +4 -0
- package/dist/classes/index.d.ts.map +1 -0
- package/dist/classes/index.js +20 -0
- package/dist/classes/index.js.map +1 -0
- package/dist/classes/metaVault.d.ts +42 -0
- package/dist/classes/metaVault.d.ts.map +1 -0
- package/dist/classes/metaVault.js +105 -0
- package/dist/classes/metaVault.js.map +1 -0
- package/dist/classes/metaVaultClient.d.ts +45 -0
- package/dist/classes/metaVaultClient.d.ts.map +1 -0
- package/dist/classes/metaVaultClient.js +435 -0
- package/dist/classes/metaVaultClient.js.map +1 -0
- package/dist/classes/metaVaultTypes.d.ts +26 -0
- package/dist/classes/metaVaultTypes.d.ts.map +1 -0
- package/dist/classes/metaVaultTypes.js +3 -0
- package/dist/classes/metaVaultTypes.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/lib.d.ts +8 -0
- package/dist/lib.d.ts.map +1 -0
- package/dist/lib.js +26 -0
- package/dist/lib.js.map +1 -0
- package/dist/utils/constants.d.ts +18 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/constants.js +21 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +20 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/remainingAccounts.d.ts +31 -0
- package/dist/utils/remainingAccounts.d.ts.map +1 -0
- package/dist/utils/remainingAccounts.js +62 -0
- package/dist/utils/remainingAccounts.js.map +1 -0
- package/dist/utils/seeds.d.ts +9 -0
- package/dist/utils/seeds.d.ts.map +1 -0
- package/dist/utils/seeds.js +60 -0
- package/dist/utils/seeds.js.map +1 -0
- package/package.json +54 -0
- package/src/@codegen/metavault/accounts/GlobalConfig.ts +158 -0
- package/src/@codegen/metavault/accounts/VaultState.ts +350 -0
- package/src/@codegen/metavault/accounts/index.ts +4 -0
- package/src/@codegen/metavault/errors/anchor.ts +773 -0
- package/src/@codegen/metavault/errors/custom.ts +902 -0
- package/src/@codegen/metavault/errors/index.ts +68 -0
- package/src/@codegen/metavault/instructions/addVaultToken.ts +76 -0
- package/src/@codegen/metavault/instructions/buy.ts +90 -0
- package/src/@codegen/metavault/instructions/buyProportional.ts +72 -0
- package/src/@codegen/metavault/instructions/finishRebalance.ts +35 -0
- package/src/@codegen/metavault/instructions/giveUpPendingFees.ts +62 -0
- package/src/@codegen/metavault/instructions/index.ts +62 -0
- package/src/@codegen/metavault/instructions/initGlobalConfig.ts +45 -0
- package/src/@codegen/metavault/instructions/initVault.ts +84 -0
- package/src/@codegen/metavault/instructions/initializeSharesMetadata.ts +80 -0
- package/src/@codegen/metavault/instructions/rebalanceSwap.ts +81 -0
- package/src/@codegen/metavault/instructions/sell.ts +90 -0
- package/src/@codegen/metavault/instructions/sellProportional.ts +72 -0
- package/src/@codegen/metavault/instructions/startRebalance.ts +62 -0
- package/src/@codegen/metavault/instructions/stopRebalance.ts +43 -0
- package/src/@codegen/metavault/instructions/updateAdmin.ts +43 -0
- package/src/@codegen/metavault/instructions/updateGlobalConfig.ts +64 -0
- package/src/@codegen/metavault/instructions/updateGlobalConfigAdmin.ts +43 -0
- package/src/@codegen/metavault/instructions/updateSharesMetadata.ts +76 -0
- package/src/@codegen/metavault/instructions/updateVaultConfig.ts +67 -0
- package/src/@codegen/metavault/instructions/withdrawPendingFees.ts +51 -0
- package/src/@codegen/metavault/programId.ts +9 -0
- package/src/@codegen/metavault/types/RebalanceState.ts +54 -0
- package/src/@codegen/metavault/types/ScopeConfiguration.ts +86 -0
- package/src/@codegen/metavault/types/UpdateGlobalConfigMode.ts +246 -0
- package/src/@codegen/metavault/types/VaultConfigField.ts +601 -0
- package/src/@codegen/metavault/types/VaultToken.ts +301 -0
- package/src/@codegen/metavault/types/index.ts +70 -0
- package/src/@codegen/metavault/utils/borsh.ts +749 -0
- package/src/@codegen/metavault/utils/borshAddress.ts +43 -0
- package/src/@codegen/metavault/utils/index.ts +1 -0
- package/src/classes/index.ts +3 -0
- package/src/classes/metaVault.ts +269 -0
- package/src/classes/metaVaultClient.ts +863 -0
- package/src/classes/metaVaultTypes.ts +31 -0
- package/src/idl/metavault.json +1728 -0
- package/src/index.ts +1 -0
- package/src/lib.ts +7 -0
- package/src/utils/constants.ts +22 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/remainingAccounts.ts +84 -0
- package/src/utils/seeds.ts +76 -0
|
@@ -0,0 +1,902 @@
|
|
|
1
|
+
export type CustomError =
|
|
2
|
+
| DepositAmountsZero
|
|
3
|
+
| SharesIssuedAmountDoesNotMatch
|
|
4
|
+
| WithdrawAmountBelowMinimum
|
|
5
|
+
| VaultTokenAlreadyExists
|
|
6
|
+
| TokenNotEnabledInVault
|
|
7
|
+
| AdminAuthorityIncorrect
|
|
8
|
+
| BaseVaultAuthorityIncorrect
|
|
9
|
+
| BaseVaultAuthorityBumpIncorrect
|
|
10
|
+
| SharesMintDecimalsIncorrect
|
|
11
|
+
| SharesMintIncorrect
|
|
12
|
+
| InitialAccountingIncorrect
|
|
13
|
+
| BPSValueTooBig
|
|
14
|
+
| DepositAmountBelowMinimum
|
|
15
|
+
| VaultTokensSpaceExhausted
|
|
16
|
+
| TokensDepositedAmountDoesNotMatch
|
|
17
|
+
| UserReceivedAmountDoesNotMatch
|
|
18
|
+
| SharesBurnedAmountDoesNotMatch
|
|
19
|
+
| DepositAmountsZeroShares
|
|
20
|
+
| WithdrawResultsInZeroShares
|
|
21
|
+
| CannotWithdrawZeroShares
|
|
22
|
+
| ManagementFeeGreaterThanMaxAllowed
|
|
23
|
+
| VaultAUMZero
|
|
24
|
+
| VaultSharesZero
|
|
25
|
+
| MinWithdrawAmountTooBig
|
|
26
|
+
| DepositAmountGreaterThanRequestedAmount
|
|
27
|
+
| WithdrawAmountLessThanWithdrawalFee
|
|
28
|
+
| DepositAmountLessThanDepositFee
|
|
29
|
+
| CannotWithdrawZeroLamports
|
|
30
|
+
| NoUpgradeAuthority
|
|
31
|
+
| BPSFeeGreaterThanMaxAllowed
|
|
32
|
+
| LamportsFeeGreaterThanMaxAllowed
|
|
33
|
+
| InvalidScopePriceAccount
|
|
34
|
+
| InvalidScopePrice
|
|
35
|
+
| InvalidOracleConfig
|
|
36
|
+
| InvalidTwapConfig
|
|
37
|
+
| TokenPriceNotSet
|
|
38
|
+
| CannotGiveUpMoreFeesThanPending
|
|
39
|
+
| DepositProportionalHasIncorrectTokens
|
|
40
|
+
| CannotDepositProportionalWithEmptyVault
|
|
41
|
+
| DepositProportionalExceedsUserMaximumAmounts
|
|
42
|
+
| MustDepositProportionalAtLeastOneLamports
|
|
43
|
+
| MustDepositProportionalMoreThanMinimumVaultFactor
|
|
44
|
+
| VaultBalanceDoesNotMatch
|
|
45
|
+
| OneSidedLiquidityDisabled
|
|
46
|
+
| InvalidWeightsSum
|
|
47
|
+
| WeightsArrayLengthMismatch
|
|
48
|
+
| RebalanceAlreadyActive
|
|
49
|
+
| InvalidRebalanceDuration
|
|
50
|
+
| VaultAlreadyRebalanced
|
|
51
|
+
| RebalanceNotActive
|
|
52
|
+
| RebalanceNotComplete
|
|
53
|
+
| TokenAlreadySettled
|
|
54
|
+
| InvalidSwapDirection
|
|
55
|
+
| SwapAmountExceedsDeficit
|
|
56
|
+
| WithdrawAumExceedTotal
|
|
57
|
+
| WithdrawSharesExceedIssued
|
|
58
|
+
| SlippageExceeded
|
|
59
|
+
| MinDepositAmountTooBig
|
|
60
|
+
| PerformanceFeeGreaterThanMaxAllowed
|
|
61
|
+
| CannotGiveUpZeroFees
|
|
62
|
+
| TimestampConversionFailed
|
|
63
|
+
| InvalidDutchAuctionBounds
|
|
64
|
+
| SharesSupplyInconsistent
|
|
65
|
+
|
|
66
|
+
export class DepositAmountsZero extends Error {
|
|
67
|
+
static readonly code = 7000
|
|
68
|
+
readonly code = 7000
|
|
69
|
+
readonly name = "DepositAmountsZero"
|
|
70
|
+
readonly msg = "Cannot deposit zero tokens"
|
|
71
|
+
|
|
72
|
+
constructor(readonly logs?: string[]) {
|
|
73
|
+
super("7000: Cannot deposit zero tokens")
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export class SharesIssuedAmountDoesNotMatch extends Error {
|
|
78
|
+
static readonly code = 7001
|
|
79
|
+
readonly code = 7001
|
|
80
|
+
readonly name = "SharesIssuedAmountDoesNotMatch"
|
|
81
|
+
readonly msg = "Post check failed on share issued"
|
|
82
|
+
|
|
83
|
+
constructor(readonly logs?: string[]) {
|
|
84
|
+
super("7001: Post check failed on share issued")
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export class WithdrawAmountBelowMinimum extends Error {
|
|
89
|
+
static readonly code = 7002
|
|
90
|
+
readonly code = 7002
|
|
91
|
+
readonly name = "WithdrawAmountBelowMinimum"
|
|
92
|
+
readonly msg = "Withdrawn amount is below minimum"
|
|
93
|
+
|
|
94
|
+
constructor(readonly logs?: string[]) {
|
|
95
|
+
super("7002: Withdrawn amount is below minimum")
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export class VaultTokenAlreadyExists extends Error {
|
|
100
|
+
static readonly code = 7003
|
|
101
|
+
readonly code = 7003
|
|
102
|
+
readonly name = "VaultTokenAlreadyExists"
|
|
103
|
+
readonly msg = "ReserveAlreadyExists"
|
|
104
|
+
|
|
105
|
+
constructor(readonly logs?: string[]) {
|
|
106
|
+
super("7003: ReserveAlreadyExists")
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export class TokenNotEnabledInVault extends Error {
|
|
111
|
+
static readonly code = 7004
|
|
112
|
+
readonly code = 7004
|
|
113
|
+
readonly name = "TokenNotEnabledInVault"
|
|
114
|
+
readonly msg = "TokenNotEnabledInVault"
|
|
115
|
+
|
|
116
|
+
constructor(readonly logs?: string[]) {
|
|
117
|
+
super("7004: TokenNotEnabledInVault")
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export class AdminAuthorityIncorrect extends Error {
|
|
122
|
+
static readonly code = 7005
|
|
123
|
+
readonly code = 7005
|
|
124
|
+
readonly name = "AdminAuthorityIncorrect"
|
|
125
|
+
readonly msg = "AdminAuthorityIncorrect"
|
|
126
|
+
|
|
127
|
+
constructor(readonly logs?: string[]) {
|
|
128
|
+
super("7005: AdminAuthorityIncorrect")
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export class BaseVaultAuthorityIncorrect extends Error {
|
|
133
|
+
static readonly code = 7006
|
|
134
|
+
readonly code = 7006
|
|
135
|
+
readonly name = "BaseVaultAuthorityIncorrect"
|
|
136
|
+
readonly msg = "BaseVaultAuthorityIncorrect"
|
|
137
|
+
|
|
138
|
+
constructor(readonly logs?: string[]) {
|
|
139
|
+
super("7006: BaseVaultAuthorityIncorrect")
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export class BaseVaultAuthorityBumpIncorrect extends Error {
|
|
144
|
+
static readonly code = 7007
|
|
145
|
+
readonly code = 7007
|
|
146
|
+
readonly name = "BaseVaultAuthorityBumpIncorrect"
|
|
147
|
+
readonly msg = "BaseVaultAuthorityBumpIncorrect"
|
|
148
|
+
|
|
149
|
+
constructor(readonly logs?: string[]) {
|
|
150
|
+
super("7007: BaseVaultAuthorityBumpIncorrect")
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export class SharesMintDecimalsIncorrect extends Error {
|
|
155
|
+
static readonly code = 7008
|
|
156
|
+
readonly code = 7008
|
|
157
|
+
readonly name = "SharesMintDecimalsIncorrect"
|
|
158
|
+
readonly msg = "SharesMintDecimalsIncorrect"
|
|
159
|
+
|
|
160
|
+
constructor(readonly logs?: string[]) {
|
|
161
|
+
super("7008: SharesMintDecimalsIncorrect")
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export class SharesMintIncorrect extends Error {
|
|
166
|
+
static readonly code = 7009
|
|
167
|
+
readonly code = 7009
|
|
168
|
+
readonly name = "SharesMintIncorrect"
|
|
169
|
+
readonly msg = "SharesMintIncorrect"
|
|
170
|
+
|
|
171
|
+
constructor(readonly logs?: string[]) {
|
|
172
|
+
super("7009: SharesMintIncorrect")
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export class InitialAccountingIncorrect extends Error {
|
|
177
|
+
static readonly code = 7010
|
|
178
|
+
readonly code = 7010
|
|
179
|
+
readonly name = "InitialAccountingIncorrect"
|
|
180
|
+
readonly msg = "InitialAccountingIncorrect"
|
|
181
|
+
|
|
182
|
+
constructor(readonly logs?: string[]) {
|
|
183
|
+
super("7010: InitialAccountingIncorrect")
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export class BPSValueTooBig extends Error {
|
|
188
|
+
static readonly code = 7011
|
|
189
|
+
readonly code = 7011
|
|
190
|
+
readonly name = "BPSValueTooBig"
|
|
191
|
+
readonly msg = "BPS value is greater than 10000"
|
|
192
|
+
|
|
193
|
+
constructor(readonly logs?: string[]) {
|
|
194
|
+
super("7011: BPS value is greater than 10000")
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export class DepositAmountBelowMinimum extends Error {
|
|
199
|
+
static readonly code = 7012
|
|
200
|
+
readonly code = 7012
|
|
201
|
+
readonly name = "DepositAmountBelowMinimum"
|
|
202
|
+
readonly msg = "Deposited amount is below minimum"
|
|
203
|
+
|
|
204
|
+
constructor(readonly logs?: string[]) {
|
|
205
|
+
super("7012: Deposited amount is below minimum")
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export class VaultTokensSpaceExhausted extends Error {
|
|
210
|
+
static readonly code = 7013
|
|
211
|
+
readonly code = 7013
|
|
212
|
+
readonly name = "VaultTokensSpaceExhausted"
|
|
213
|
+
readonly msg = "Vault have no space for new reserves"
|
|
214
|
+
|
|
215
|
+
constructor(readonly logs?: string[]) {
|
|
216
|
+
super("7013: Vault have no space for new reserves")
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export class TokensDepositedAmountDoesNotMatch extends Error {
|
|
221
|
+
static readonly code = 7014
|
|
222
|
+
readonly code = 7014
|
|
223
|
+
readonly name = "TokensDepositedAmountDoesNotMatch"
|
|
224
|
+
readonly msg = "TokensDepositedAmountDoesNotMatch"
|
|
225
|
+
|
|
226
|
+
constructor(readonly logs?: string[]) {
|
|
227
|
+
super("7014: TokensDepositedAmountDoesNotMatch")
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export class UserReceivedAmountDoesNotMatch extends Error {
|
|
232
|
+
static readonly code = 7015
|
|
233
|
+
readonly code = 7015
|
|
234
|
+
readonly name = "UserReceivedAmountDoesNotMatch"
|
|
235
|
+
readonly msg = "User received amount does not match"
|
|
236
|
+
|
|
237
|
+
constructor(readonly logs?: string[]) {
|
|
238
|
+
super("7015: User received amount does not match")
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export class SharesBurnedAmountDoesNotMatch extends Error {
|
|
243
|
+
static readonly code = 7016
|
|
244
|
+
readonly code = 7016
|
|
245
|
+
readonly name = "SharesBurnedAmountDoesNotMatch"
|
|
246
|
+
readonly msg = "Shares burned amount does not match"
|
|
247
|
+
|
|
248
|
+
constructor(readonly logs?: string[]) {
|
|
249
|
+
super("7016: Shares burned amount does not match")
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export class DepositAmountsZeroShares extends Error {
|
|
254
|
+
static readonly code = 7017
|
|
255
|
+
readonly code = 7017
|
|
256
|
+
readonly name = "DepositAmountsZeroShares"
|
|
257
|
+
readonly msg = "Deposit amount results in 0 shares"
|
|
258
|
+
|
|
259
|
+
constructor(readonly logs?: string[]) {
|
|
260
|
+
super("7017: Deposit amount results in 0 shares")
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export class WithdrawResultsInZeroShares extends Error {
|
|
265
|
+
static readonly code = 7018
|
|
266
|
+
readonly code = 7018
|
|
267
|
+
readonly name = "WithdrawResultsInZeroShares"
|
|
268
|
+
readonly msg = "Withdraw amount results in 0 shares"
|
|
269
|
+
|
|
270
|
+
constructor(readonly logs?: string[]) {
|
|
271
|
+
super("7018: Withdraw amount results in 0 shares")
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export class CannotWithdrawZeroShares extends Error {
|
|
276
|
+
static readonly code = 7019
|
|
277
|
+
readonly code = 7019
|
|
278
|
+
readonly name = "CannotWithdrawZeroShares"
|
|
279
|
+
readonly msg = "Cannot withdraw zero shares"
|
|
280
|
+
|
|
281
|
+
constructor(readonly logs?: string[]) {
|
|
282
|
+
super("7019: Cannot withdraw zero shares")
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export class ManagementFeeGreaterThanMaxAllowed extends Error {
|
|
287
|
+
static readonly code = 7020
|
|
288
|
+
readonly code = 7020
|
|
289
|
+
readonly name = "ManagementFeeGreaterThanMaxAllowed"
|
|
290
|
+
readonly msg = "Management fee is greater than maximum allowed"
|
|
291
|
+
|
|
292
|
+
constructor(readonly logs?: string[]) {
|
|
293
|
+
super("7020: Management fee is greater than maximum allowed")
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export class VaultAUMZero extends Error {
|
|
298
|
+
static readonly code = 7021
|
|
299
|
+
readonly code = 7021
|
|
300
|
+
readonly name = "VaultAUMZero"
|
|
301
|
+
readonly msg = "Vault assets under management are empty"
|
|
302
|
+
|
|
303
|
+
constructor(readonly logs?: string[]) {
|
|
304
|
+
super("7021: Vault assets under management are empty")
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export class VaultSharesZero extends Error {
|
|
309
|
+
static readonly code = 7022
|
|
310
|
+
readonly code = 7022
|
|
311
|
+
readonly name = "VaultSharesZero"
|
|
312
|
+
readonly msg = "Vault real shares issued are zero"
|
|
313
|
+
|
|
314
|
+
constructor(readonly logs?: string[]) {
|
|
315
|
+
super("7022: Vault real shares issued are zero")
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export class MinWithdrawAmountTooBig extends Error {
|
|
320
|
+
static readonly code = 7023
|
|
321
|
+
readonly code = 7023
|
|
322
|
+
readonly name = "MinWithdrawAmountTooBig"
|
|
323
|
+
readonly msg = "Min withdraw amount is too big"
|
|
324
|
+
|
|
325
|
+
constructor(readonly logs?: string[]) {
|
|
326
|
+
super("7023: Min withdraw amount is too big")
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
export class DepositAmountGreaterThanRequestedAmount extends Error {
|
|
331
|
+
static readonly code = 7024
|
|
332
|
+
readonly code = 7024
|
|
333
|
+
readonly name = "DepositAmountGreaterThanRequestedAmount"
|
|
334
|
+
readonly msg = "Deposit amount is greater than requested amount"
|
|
335
|
+
|
|
336
|
+
constructor(readonly logs?: string[]) {
|
|
337
|
+
super("7024: Deposit amount is greater than requested amount")
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export class WithdrawAmountLessThanWithdrawalFee extends Error {
|
|
342
|
+
static readonly code = 7025
|
|
343
|
+
readonly code = 7025
|
|
344
|
+
readonly name = "WithdrawAmountLessThanWithdrawalFee"
|
|
345
|
+
readonly msg = "Withdraw amount is less than withdrawal fee"
|
|
346
|
+
|
|
347
|
+
constructor(readonly logs?: string[]) {
|
|
348
|
+
super("7025: Withdraw amount is less than withdrawal fee")
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export class DepositAmountLessThanDepositFee extends Error {
|
|
353
|
+
static readonly code = 7026
|
|
354
|
+
readonly code = 7026
|
|
355
|
+
readonly name = "DepositAmountLessThanDepositFee"
|
|
356
|
+
readonly msg = "Deposit amount is less than deposit fee"
|
|
357
|
+
|
|
358
|
+
constructor(readonly logs?: string[]) {
|
|
359
|
+
super("7026: Deposit amount is less than deposit fee")
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export class CannotWithdrawZeroLamports extends Error {
|
|
364
|
+
static readonly code = 7027
|
|
365
|
+
readonly code = 7027
|
|
366
|
+
readonly name = "CannotWithdrawZeroLamports"
|
|
367
|
+
readonly msg = "Cannot withdraw 0 lamports"
|
|
368
|
+
|
|
369
|
+
constructor(readonly logs?: string[]) {
|
|
370
|
+
super("7027: Cannot withdraw 0 lamports")
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export class NoUpgradeAuthority extends Error {
|
|
375
|
+
static readonly code = 7028
|
|
376
|
+
readonly code = 7028
|
|
377
|
+
readonly name = "NoUpgradeAuthority"
|
|
378
|
+
readonly msg =
|
|
379
|
+
"Cannot initialize global config because there is no upgrade authority to the program"
|
|
380
|
+
|
|
381
|
+
constructor(readonly logs?: string[]) {
|
|
382
|
+
super(
|
|
383
|
+
"7028: Cannot initialize global config because there is no upgrade authority to the program"
|
|
384
|
+
)
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
export class BPSFeeGreaterThanMaxAllowed extends Error {
|
|
389
|
+
static readonly code = 7029
|
|
390
|
+
readonly code = 7029
|
|
391
|
+
readonly name = "BPSFeeGreaterThanMaxAllowed"
|
|
392
|
+
readonly msg = "BPS fee is greater than maximum allowed"
|
|
393
|
+
|
|
394
|
+
constructor(readonly logs?: string[]) {
|
|
395
|
+
super("7029: BPS fee is greater than maximum allowed")
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export class LamportsFeeGreaterThanMaxAllowed extends Error {
|
|
400
|
+
static readonly code = 7030
|
|
401
|
+
readonly code = 7030
|
|
402
|
+
readonly name = "LamportsFeeGreaterThanMaxAllowed"
|
|
403
|
+
readonly msg = "Lamports fee is greater than maximum allowed"
|
|
404
|
+
|
|
405
|
+
constructor(readonly logs?: string[]) {
|
|
406
|
+
super("7030: Lamports fee is greater than maximum allowed")
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export class InvalidScopePriceAccount extends Error {
|
|
411
|
+
static readonly code = 7031
|
|
412
|
+
readonly code = 7031
|
|
413
|
+
readonly name = "InvalidScopePriceAccount"
|
|
414
|
+
readonly msg = "Could not get scope price from the account passed"
|
|
415
|
+
|
|
416
|
+
constructor(readonly logs?: string[]) {
|
|
417
|
+
super("7031: Could not get scope price from the account passed")
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export class InvalidScopePrice extends Error {
|
|
422
|
+
static readonly code = 7032
|
|
423
|
+
readonly code = 7032
|
|
424
|
+
readonly name = "InvalidScopePrice"
|
|
425
|
+
readonly msg =
|
|
426
|
+
"Scope price was validated and fails at twap, age or confidence"
|
|
427
|
+
|
|
428
|
+
constructor(readonly logs?: string[]) {
|
|
429
|
+
super(
|
|
430
|
+
"7032: Scope price was validated and fails at twap, age or confidence"
|
|
431
|
+
)
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export class InvalidOracleConfig extends Error {
|
|
436
|
+
static readonly code = 7033
|
|
437
|
+
readonly code = 7033
|
|
438
|
+
readonly name = "InvalidOracleConfig"
|
|
439
|
+
readonly msg = "Input oracle config is invalid"
|
|
440
|
+
|
|
441
|
+
constructor(readonly logs?: string[]) {
|
|
442
|
+
super("7033: Input oracle config is invalid")
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export class InvalidTwapConfig extends Error {
|
|
447
|
+
static readonly code = 7034
|
|
448
|
+
readonly code = 7034
|
|
449
|
+
readonly name = "InvalidTwapConfig"
|
|
450
|
+
readonly msg =
|
|
451
|
+
"Invalid Twap configuration: Twap is enabled but one of the enabled price doesn't have a twap"
|
|
452
|
+
|
|
453
|
+
constructor(readonly logs?: string[]) {
|
|
454
|
+
super(
|
|
455
|
+
"7034: Invalid Twap configuration: Twap is enabled but one of the enabled price doesn't have a twap"
|
|
456
|
+
)
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export class TokenPriceNotSet extends Error {
|
|
461
|
+
static readonly code = 7035
|
|
462
|
+
readonly code = 7035
|
|
463
|
+
readonly name = "TokenPriceNotSet"
|
|
464
|
+
readonly msg = "Expected token price to be set"
|
|
465
|
+
|
|
466
|
+
constructor(readonly logs?: string[]) {
|
|
467
|
+
super("7035: Expected token price to be set")
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export class CannotGiveUpMoreFeesThanPending extends Error {
|
|
472
|
+
static readonly code = 7036
|
|
473
|
+
readonly code = 7036
|
|
474
|
+
readonly name = "CannotGiveUpMoreFeesThanPending"
|
|
475
|
+
readonly msg = "Tried to give up more fees than pending"
|
|
476
|
+
|
|
477
|
+
constructor(readonly logs?: string[]) {
|
|
478
|
+
super("7036: Tried to give up more fees than pending")
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export class DepositProportionalHasIncorrectTokens extends Error {
|
|
483
|
+
static readonly code = 7037
|
|
484
|
+
readonly code = 7037
|
|
485
|
+
readonly name = "DepositProportionalHasIncorrectTokens"
|
|
486
|
+
readonly msg = "Deposit proportional should pass every token from vault"
|
|
487
|
+
|
|
488
|
+
constructor(readonly logs?: string[]) {
|
|
489
|
+
super("7037: Deposit proportional should pass every token from vault")
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export class CannotDepositProportionalWithEmptyVault extends Error {
|
|
494
|
+
static readonly code = 7038
|
|
495
|
+
readonly code = 7038
|
|
496
|
+
readonly name = "CannotDepositProportionalWithEmptyVault"
|
|
497
|
+
readonly msg = "Cannot deposit proportional with empty vault"
|
|
498
|
+
|
|
499
|
+
constructor(readonly logs?: string[]) {
|
|
500
|
+
super("7038: Cannot deposit proportional with empty vault")
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
export class DepositProportionalExceedsUserMaximumAmounts extends Error {
|
|
505
|
+
static readonly code = 7039
|
|
506
|
+
readonly code = 7039
|
|
507
|
+
readonly name = "DepositProportionalExceedsUserMaximumAmounts"
|
|
508
|
+
readonly msg = "Cannot deposit proportional more than user passed"
|
|
509
|
+
|
|
510
|
+
constructor(readonly logs?: string[]) {
|
|
511
|
+
super("7039: Cannot deposit proportional more than user passed")
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
export class MustDepositProportionalAtLeastOneLamports extends Error {
|
|
516
|
+
static readonly code = 7040
|
|
517
|
+
readonly code = 7040
|
|
518
|
+
readonly name = "MustDepositProportionalAtLeastOneLamports"
|
|
519
|
+
readonly msg = "Cannot deposit proportional with 0 lamports"
|
|
520
|
+
|
|
521
|
+
constructor(readonly logs?: string[]) {
|
|
522
|
+
super("7040: Cannot deposit proportional with 0 lamports")
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
export class MustDepositProportionalMoreThanMinimumVaultFactor extends Error {
|
|
527
|
+
static readonly code = 7041
|
|
528
|
+
readonly code = 7041
|
|
529
|
+
readonly name = "MustDepositProportionalMoreThanMinimumVaultFactor"
|
|
530
|
+
readonly msg =
|
|
531
|
+
"Cannot deposit proportional less than vault amount divided by minimum vault amount"
|
|
532
|
+
|
|
533
|
+
constructor(readonly logs?: string[]) {
|
|
534
|
+
super(
|
|
535
|
+
"7041: Cannot deposit proportional less than vault amount divided by minimum vault amount"
|
|
536
|
+
)
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
export class VaultBalanceDoesNotMatch extends Error {
|
|
541
|
+
static readonly code = 7042
|
|
542
|
+
readonly code = 7042
|
|
543
|
+
readonly name = "VaultBalanceDoesNotMatch"
|
|
544
|
+
readonly msg = "Vault balance does not match expected amount"
|
|
545
|
+
|
|
546
|
+
constructor(readonly logs?: string[]) {
|
|
547
|
+
super("7042: Vault balance does not match expected amount")
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
export class OneSidedLiquidityDisabled extends Error {
|
|
552
|
+
static readonly code = 7043
|
|
553
|
+
readonly code = 7043
|
|
554
|
+
readonly name = "OneSidedLiquidityDisabled"
|
|
555
|
+
readonly msg = "One-sided liquidity is disabled for this vault"
|
|
556
|
+
|
|
557
|
+
constructor(readonly logs?: string[]) {
|
|
558
|
+
super("7043: One-sided liquidity is disabled for this vault")
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
export class InvalidWeightsSum extends Error {
|
|
563
|
+
static readonly code = 7044
|
|
564
|
+
readonly code = 7044
|
|
565
|
+
readonly name = "InvalidWeightsSum"
|
|
566
|
+
readonly msg = "Token weights must sum to a non-zero value"
|
|
567
|
+
|
|
568
|
+
constructor(readonly logs?: string[]) {
|
|
569
|
+
super("7044: Token weights must sum to a non-zero value")
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
export class WeightsArrayLengthMismatch extends Error {
|
|
574
|
+
static readonly code = 7045
|
|
575
|
+
readonly code = 7045
|
|
576
|
+
readonly name = "WeightsArrayLengthMismatch"
|
|
577
|
+
readonly msg = "Weight array length does not match enabled tokens count"
|
|
578
|
+
|
|
579
|
+
constructor(readonly logs?: string[]) {
|
|
580
|
+
super("7045: Weight array length does not match enabled tokens count")
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
export class RebalanceAlreadyActive extends Error {
|
|
585
|
+
static readonly code = 7046
|
|
586
|
+
readonly code = 7046
|
|
587
|
+
readonly name = "RebalanceAlreadyActive"
|
|
588
|
+
readonly msg = "Rebalance is already in progress"
|
|
589
|
+
|
|
590
|
+
constructor(readonly logs?: string[]) {
|
|
591
|
+
super("7046: Rebalance is already in progress")
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
export class InvalidRebalanceDuration extends Error {
|
|
596
|
+
static readonly code = 7047
|
|
597
|
+
readonly code = 7047
|
|
598
|
+
readonly name = "InvalidRebalanceDuration"
|
|
599
|
+
readonly msg = "Invalid rebalance duration"
|
|
600
|
+
|
|
601
|
+
constructor(readonly logs?: string[]) {
|
|
602
|
+
super("7047: Invalid rebalance duration")
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
export class VaultAlreadyRebalanced extends Error {
|
|
607
|
+
static readonly code = 7048
|
|
608
|
+
readonly code = 7048
|
|
609
|
+
readonly name = "VaultAlreadyRebalanced"
|
|
610
|
+
readonly msg = "Vault is already rebalanced"
|
|
611
|
+
|
|
612
|
+
constructor(readonly logs?: string[]) {
|
|
613
|
+
super("7048: Vault is already rebalanced")
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
export class RebalanceNotActive extends Error {
|
|
618
|
+
static readonly code = 7049
|
|
619
|
+
readonly code = 7049
|
|
620
|
+
readonly name = "RebalanceNotActive"
|
|
621
|
+
readonly msg = "Rebalance is not active"
|
|
622
|
+
|
|
623
|
+
constructor(readonly logs?: string[]) {
|
|
624
|
+
super("7049: Rebalance is not active")
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
export class RebalanceNotComplete extends Error {
|
|
629
|
+
static readonly code = 7050
|
|
630
|
+
readonly code = 7050
|
|
631
|
+
readonly name = "RebalanceNotComplete"
|
|
632
|
+
readonly msg = "Rebalance is not complete"
|
|
633
|
+
|
|
634
|
+
constructor(readonly logs?: string[]) {
|
|
635
|
+
super("7050: Rebalance is not complete")
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
export class TokenAlreadySettled extends Error {
|
|
640
|
+
static readonly code = 7051
|
|
641
|
+
readonly code = 7051
|
|
642
|
+
readonly name = "TokenAlreadySettled"
|
|
643
|
+
readonly msg = "Token is already settled in rebalance"
|
|
644
|
+
|
|
645
|
+
constructor(readonly logs?: string[]) {
|
|
646
|
+
super("7051: Token is already settled in rebalance")
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
export class InvalidSwapDirection extends Error {
|
|
651
|
+
static readonly code = 7052
|
|
652
|
+
readonly code = 7052
|
|
653
|
+
readonly name = "InvalidSwapDirection"
|
|
654
|
+
readonly msg = "Invalid swap direction for rebalance"
|
|
655
|
+
|
|
656
|
+
constructor(readonly logs?: string[]) {
|
|
657
|
+
super("7052: Invalid swap direction for rebalance")
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
export class SwapAmountExceedsDeficit extends Error {
|
|
662
|
+
static readonly code = 7053
|
|
663
|
+
readonly code = 7053
|
|
664
|
+
readonly name = "SwapAmountExceedsDeficit"
|
|
665
|
+
readonly msg = "Swap amount exceeds token deficit"
|
|
666
|
+
|
|
667
|
+
constructor(readonly logs?: string[]) {
|
|
668
|
+
super("7053: Swap amount exceeds token deficit")
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
export class WithdrawAumExceedTotal extends Error {
|
|
673
|
+
static readonly code = 7054
|
|
674
|
+
readonly code = 7054
|
|
675
|
+
readonly name = "WithdrawAumExceedTotal"
|
|
676
|
+
readonly msg = "Withdraw aum exceed total in vault"
|
|
677
|
+
|
|
678
|
+
constructor(readonly logs?: string[]) {
|
|
679
|
+
super("7054: Withdraw aum exceed total in vault")
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
export class WithdrawSharesExceedIssued extends Error {
|
|
684
|
+
static readonly code = 7055
|
|
685
|
+
readonly code = 7055
|
|
686
|
+
readonly name = "WithdrawSharesExceedIssued"
|
|
687
|
+
readonly msg = "Withdraw shares exceed total shares issued"
|
|
688
|
+
|
|
689
|
+
constructor(readonly logs?: string[]) {
|
|
690
|
+
super("7055: Withdraw shares exceed total shares issued")
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
export class SlippageExceeded extends Error {
|
|
695
|
+
static readonly code = 7056
|
|
696
|
+
readonly code = 7056
|
|
697
|
+
readonly name = "SlippageExceeded"
|
|
698
|
+
readonly msg = "Slippage tolerance exceeded"
|
|
699
|
+
|
|
700
|
+
constructor(readonly logs?: string[]) {
|
|
701
|
+
super("7056: Slippage tolerance exceeded")
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
export class MinDepositAmountTooBig extends Error {
|
|
706
|
+
static readonly code = 7057
|
|
707
|
+
readonly code = 7057
|
|
708
|
+
readonly name = "MinDepositAmountTooBig"
|
|
709
|
+
readonly msg = "Min deposit amount is too big"
|
|
710
|
+
|
|
711
|
+
constructor(readonly logs?: string[]) {
|
|
712
|
+
super("7057: Min deposit amount is too big")
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
export class PerformanceFeeGreaterThanMaxAllowed extends Error {
|
|
717
|
+
static readonly code = 7058
|
|
718
|
+
readonly code = 7058
|
|
719
|
+
readonly name = "PerformanceFeeGreaterThanMaxAllowed"
|
|
720
|
+
readonly msg = "Performance fee is greater than maximum allowed"
|
|
721
|
+
|
|
722
|
+
constructor(readonly logs?: string[]) {
|
|
723
|
+
super("7058: Performance fee is greater than maximum allowed")
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export class CannotGiveUpZeroFees extends Error {
|
|
728
|
+
static readonly code = 7059
|
|
729
|
+
readonly code = 7059
|
|
730
|
+
readonly name = "CannotGiveUpZeroFees"
|
|
731
|
+
readonly msg = "Cannot give up zero fees"
|
|
732
|
+
|
|
733
|
+
constructor(readonly logs?: string[]) {
|
|
734
|
+
super("7059: Cannot give up zero fees")
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
export class TimestampConversionFailed extends Error {
|
|
739
|
+
static readonly code = 7060
|
|
740
|
+
readonly code = 7060
|
|
741
|
+
readonly name = "TimestampConversionFailed"
|
|
742
|
+
readonly msg = "Unix timestamp conversion to u64 failed"
|
|
743
|
+
|
|
744
|
+
constructor(readonly logs?: string[]) {
|
|
745
|
+
super("7060: Unix timestamp conversion to u64 failed")
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
export class InvalidDutchAuctionBounds extends Error {
|
|
750
|
+
static readonly code = 7061
|
|
751
|
+
readonly code = 7061
|
|
752
|
+
readonly name = "InvalidDutchAuctionBounds"
|
|
753
|
+
readonly msg = "Invalid Dutch auction bounds configuration"
|
|
754
|
+
|
|
755
|
+
constructor(readonly logs?: string[]) {
|
|
756
|
+
super("7061: Invalid Dutch auction bounds configuration")
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
export class SharesSupplyInconsistent extends Error {
|
|
761
|
+
static readonly code = 7062
|
|
762
|
+
readonly code = 7062
|
|
763
|
+
readonly name = "SharesSupplyInconsistent"
|
|
764
|
+
readonly msg = "Shares supply does not match expected accounting"
|
|
765
|
+
|
|
766
|
+
constructor(readonly logs?: string[]) {
|
|
767
|
+
super("7062: Shares supply does not match expected accounting")
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
export function fromCode(code: number, logs?: string[]): CustomError | null {
|
|
772
|
+
switch (code) {
|
|
773
|
+
case 7000:
|
|
774
|
+
return new DepositAmountsZero(logs)
|
|
775
|
+
case 7001:
|
|
776
|
+
return new SharesIssuedAmountDoesNotMatch(logs)
|
|
777
|
+
case 7002:
|
|
778
|
+
return new WithdrawAmountBelowMinimum(logs)
|
|
779
|
+
case 7003:
|
|
780
|
+
return new VaultTokenAlreadyExists(logs)
|
|
781
|
+
case 7004:
|
|
782
|
+
return new TokenNotEnabledInVault(logs)
|
|
783
|
+
case 7005:
|
|
784
|
+
return new AdminAuthorityIncorrect(logs)
|
|
785
|
+
case 7006:
|
|
786
|
+
return new BaseVaultAuthorityIncorrect(logs)
|
|
787
|
+
case 7007:
|
|
788
|
+
return new BaseVaultAuthorityBumpIncorrect(logs)
|
|
789
|
+
case 7008:
|
|
790
|
+
return new SharesMintDecimalsIncorrect(logs)
|
|
791
|
+
case 7009:
|
|
792
|
+
return new SharesMintIncorrect(logs)
|
|
793
|
+
case 7010:
|
|
794
|
+
return new InitialAccountingIncorrect(logs)
|
|
795
|
+
case 7011:
|
|
796
|
+
return new BPSValueTooBig(logs)
|
|
797
|
+
case 7012:
|
|
798
|
+
return new DepositAmountBelowMinimum(logs)
|
|
799
|
+
case 7013:
|
|
800
|
+
return new VaultTokensSpaceExhausted(logs)
|
|
801
|
+
case 7014:
|
|
802
|
+
return new TokensDepositedAmountDoesNotMatch(logs)
|
|
803
|
+
case 7015:
|
|
804
|
+
return new UserReceivedAmountDoesNotMatch(logs)
|
|
805
|
+
case 7016:
|
|
806
|
+
return new SharesBurnedAmountDoesNotMatch(logs)
|
|
807
|
+
case 7017:
|
|
808
|
+
return new DepositAmountsZeroShares(logs)
|
|
809
|
+
case 7018:
|
|
810
|
+
return new WithdrawResultsInZeroShares(logs)
|
|
811
|
+
case 7019:
|
|
812
|
+
return new CannotWithdrawZeroShares(logs)
|
|
813
|
+
case 7020:
|
|
814
|
+
return new ManagementFeeGreaterThanMaxAllowed(logs)
|
|
815
|
+
case 7021:
|
|
816
|
+
return new VaultAUMZero(logs)
|
|
817
|
+
case 7022:
|
|
818
|
+
return new VaultSharesZero(logs)
|
|
819
|
+
case 7023:
|
|
820
|
+
return new MinWithdrawAmountTooBig(logs)
|
|
821
|
+
case 7024:
|
|
822
|
+
return new DepositAmountGreaterThanRequestedAmount(logs)
|
|
823
|
+
case 7025:
|
|
824
|
+
return new WithdrawAmountLessThanWithdrawalFee(logs)
|
|
825
|
+
case 7026:
|
|
826
|
+
return new DepositAmountLessThanDepositFee(logs)
|
|
827
|
+
case 7027:
|
|
828
|
+
return new CannotWithdrawZeroLamports(logs)
|
|
829
|
+
case 7028:
|
|
830
|
+
return new NoUpgradeAuthority(logs)
|
|
831
|
+
case 7029:
|
|
832
|
+
return new BPSFeeGreaterThanMaxAllowed(logs)
|
|
833
|
+
case 7030:
|
|
834
|
+
return new LamportsFeeGreaterThanMaxAllowed(logs)
|
|
835
|
+
case 7031:
|
|
836
|
+
return new InvalidScopePriceAccount(logs)
|
|
837
|
+
case 7032:
|
|
838
|
+
return new InvalidScopePrice(logs)
|
|
839
|
+
case 7033:
|
|
840
|
+
return new InvalidOracleConfig(logs)
|
|
841
|
+
case 7034:
|
|
842
|
+
return new InvalidTwapConfig(logs)
|
|
843
|
+
case 7035:
|
|
844
|
+
return new TokenPriceNotSet(logs)
|
|
845
|
+
case 7036:
|
|
846
|
+
return new CannotGiveUpMoreFeesThanPending(logs)
|
|
847
|
+
case 7037:
|
|
848
|
+
return new DepositProportionalHasIncorrectTokens(logs)
|
|
849
|
+
case 7038:
|
|
850
|
+
return new CannotDepositProportionalWithEmptyVault(logs)
|
|
851
|
+
case 7039:
|
|
852
|
+
return new DepositProportionalExceedsUserMaximumAmounts(logs)
|
|
853
|
+
case 7040:
|
|
854
|
+
return new MustDepositProportionalAtLeastOneLamports(logs)
|
|
855
|
+
case 7041:
|
|
856
|
+
return new MustDepositProportionalMoreThanMinimumVaultFactor(logs)
|
|
857
|
+
case 7042:
|
|
858
|
+
return new VaultBalanceDoesNotMatch(logs)
|
|
859
|
+
case 7043:
|
|
860
|
+
return new OneSidedLiquidityDisabled(logs)
|
|
861
|
+
case 7044:
|
|
862
|
+
return new InvalidWeightsSum(logs)
|
|
863
|
+
case 7045:
|
|
864
|
+
return new WeightsArrayLengthMismatch(logs)
|
|
865
|
+
case 7046:
|
|
866
|
+
return new RebalanceAlreadyActive(logs)
|
|
867
|
+
case 7047:
|
|
868
|
+
return new InvalidRebalanceDuration(logs)
|
|
869
|
+
case 7048:
|
|
870
|
+
return new VaultAlreadyRebalanced(logs)
|
|
871
|
+
case 7049:
|
|
872
|
+
return new RebalanceNotActive(logs)
|
|
873
|
+
case 7050:
|
|
874
|
+
return new RebalanceNotComplete(logs)
|
|
875
|
+
case 7051:
|
|
876
|
+
return new TokenAlreadySettled(logs)
|
|
877
|
+
case 7052:
|
|
878
|
+
return new InvalidSwapDirection(logs)
|
|
879
|
+
case 7053:
|
|
880
|
+
return new SwapAmountExceedsDeficit(logs)
|
|
881
|
+
case 7054:
|
|
882
|
+
return new WithdrawAumExceedTotal(logs)
|
|
883
|
+
case 7055:
|
|
884
|
+
return new WithdrawSharesExceedIssued(logs)
|
|
885
|
+
case 7056:
|
|
886
|
+
return new SlippageExceeded(logs)
|
|
887
|
+
case 7057:
|
|
888
|
+
return new MinDepositAmountTooBig(logs)
|
|
889
|
+
case 7058:
|
|
890
|
+
return new PerformanceFeeGreaterThanMaxAllowed(logs)
|
|
891
|
+
case 7059:
|
|
892
|
+
return new CannotGiveUpZeroFees(logs)
|
|
893
|
+
case 7060:
|
|
894
|
+
return new TimestampConversionFailed(logs)
|
|
895
|
+
case 7061:
|
|
896
|
+
return new InvalidDutchAuctionBounds(logs)
|
|
897
|
+
case 7062:
|
|
898
|
+
return new SharesSupplyInconsistent(logs)
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
return null
|
|
902
|
+
}
|