@kamino-finance/klend-sdk 5.0.4 → 5.0.6
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/classes/fraction.d.ts.map +1 -1
- package/dist/classes/fraction.js.map +1 -1
- package/dist/classes/manager.d.ts +38 -4
- package/dist/classes/manager.d.ts.map +1 -1
- package/dist/classes/manager.js +112 -5
- package/dist/classes/manager.js.map +1 -1
- package/dist/classes/market.d.ts +4 -0
- package/dist/classes/market.d.ts.map +1 -1
- package/dist/classes/market.js +17 -25
- package/dist/classes/market.js.map +1 -1
- package/dist/classes/obligation.d.ts +3 -4
- package/dist/classes/obligation.d.ts.map +1 -1
- package/dist/classes/obligation.js +96 -27
- package/dist/classes/obligation.js.map +1 -1
- package/dist/classes/reserve.d.ts +2 -1
- package/dist/classes/reserve.d.ts.map +1 -1
- package/dist/classes/reserve.js +32 -29
- package/dist/classes/reserve.js.map +1 -1
- package/dist/classes/utils.d.ts +3 -0
- package/dist/classes/utils.d.ts.map +1 -1
- package/dist/classes/utils.js +30 -0
- package/dist/classes/utils.js.map +1 -1
- package/dist/classes/vault.d.ts +12 -8
- package/dist/classes/vault.d.ts.map +1 -1
- package/dist/classes/vault.js +94 -66
- package/dist/classes/vault.js.map +1 -1
- package/dist/client_kamino_manager.d.ts.map +1 -1
- package/dist/client_kamino_manager.js +15 -1
- package/dist/client_kamino_manager.js.map +1 -1
- package/dist/idl.json +27 -2
- package/dist/idl_codegen/accounts/LendingMarket.d.ts +6 -0
- package/dist/idl_codegen/accounts/LendingMarket.d.ts.map +1 -1
- package/dist/idl_codegen/accounts/LendingMarket.js +8 -1
- package/dist/idl_codegen/accounts/LendingMarket.js.map +1 -1
- package/dist/idl_codegen/accounts/Obligation.d.ts +3 -12
- package/dist/idl_codegen/accounts/Obligation.d.ts.map +1 -1
- package/dist/idl_codegen/accounts/Obligation.js +1 -4
- package/dist/idl_codegen/accounts/Obligation.js.map +1 -1
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.d.ts +20 -0
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.d.ts.map +1 -1
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.js +33 -1
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.js.map +1 -1
- package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts +13 -0
- package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts.map +1 -1
- package/dist/idl_codegen/types/UpdateLendingMarketMode.js +25 -1
- package/dist/idl_codegen/types/UpdateLendingMarketMode.js.map +1 -1
- package/dist/idl_codegen/types/index.d.ts +4 -4
- package/dist/idl_codegen/types/index.d.ts.map +1 -1
- package/dist/idl_codegen/types/index.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.d.ts +3 -3
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.js +22 -18
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.d.ts +45 -15
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.js +101 -39
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/index.d.ts +4 -4
- package/dist/idl_codegen_kamino_vault/accounts/index.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/accounts/index.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/errors/anchor.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/errors/anchor.js +162 -162
- package/dist/idl_codegen_kamino_vault/errors/anchor.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/errors/custom.d.ts +144 -32
- package/dist/idl_codegen_kamino_vault/errors/custom.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/errors/custom.js +305 -109
- package/dist/idl_codegen_kamino_vault/errors/custom.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/errors/index.d.ts +3 -3
- package/dist/idl_codegen_kamino_vault/errors/index.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/errors/index.js +7 -2
- package/dist/idl_codegen_kamino_vault/errors/index.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/deposit.d.ts +4 -2
- package/dist/idl_codegen_kamino_vault/instructions/deposit.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/deposit.js +3 -1
- package/dist/idl_codegen_kamino_vault/instructions/deposit.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.d.ts +13 -0
- package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.js +47 -0
- package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/index.d.ts +18 -10
- package/dist/idl_codegen_kamino_vault/instructions/index.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/index.js +9 -1
- package/dist/idl_codegen_kamino_vault/instructions/index.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/initVault.d.ts +2 -1
- package/dist/idl_codegen_kamino_vault/instructions/initVault.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/initVault.js +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/initVault.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/invest.d.ts +6 -2
- package/dist/idl_codegen_kamino_vault/instructions/invest.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/invest.js +9 -1
- package/dist/idl_codegen_kamino_vault/instructions/invest.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.d.ts +7 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.js +16 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.js +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.d.ts +14 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.js +52 -0
- package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.d.ts +4 -2
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.js +8 -2
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.d.ts +23 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.js +51 -0
- package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/programId.d.ts +1 -1
- package/dist/idl_codegen_kamino_vault/programId.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/programId.js +1 -1
- package/dist/idl_codegen_kamino_vault/programId.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.js +4 -1
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.d.ts +1 -1
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.js +1 -1
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.d.ts +1 -1
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.js +1 -1
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.js +6 -1
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.js +1 -1
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.js +1 -1
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.d.ts +3 -3
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.js +5 -5
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.d.ts +27 -24
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.js +59 -53
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.js +5 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.d.ts +11 -3
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.js +25 -17
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.js +3 -3
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.d.ts +2 -2
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.js +1 -1
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.d.ts +3 -3
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.js +11 -11
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.d.ts +18 -8
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.js +27 -13
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.js.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.d.ts +110 -0
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.d.ts.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.js +242 -0
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.js.map +1 -0
- package/dist/idl_codegen_kamino_vault/types/index.d.ts +34 -30
- package/dist/idl_codegen_kamino_vault/types/index.d.ts.map +1 -1
- package/dist/idl_codegen_kamino_vault/types/index.js +26 -1
- package/dist/idl_codegen_kamino_vault/types/index.js.map +1 -1
- package/dist/utils/ObligationType.d.ts.map +1 -1
- package/dist/utils/ObligationType.js.map +1 -1
- package/dist/utils/managerTypes.d.ts.map +1 -1
- package/dist/utils/managerTypes.js.map +1 -1
- package/dist/utils/pubkey.d.ts.map +1 -1
- package/dist/utils/pubkey.js.map +1 -1
- package/dist/utils/rpc.d.ts.map +1 -1
- package/dist/utils/rpc.js +2 -1
- package/dist/utils/rpc.js.map +1 -1
- package/package.json +2 -1
- package/src/classes/fraction.ts +5 -0
- package/src/classes/manager.ts +136 -5
- package/src/classes/market.ts +19 -2
- package/src/classes/obligation.ts +141 -30
- package/src/classes/reserve.ts +70 -41
- package/src/classes/utils.ts +30 -0
- package/src/classes/vault.ts +123 -49
- package/src/client_kamino_manager.ts +19 -1
- package/src/idl_codegen/accounts/LendingMarket.ts +12 -1
- package/src/idl_codegen/accounts/Obligation.ts +3 -12
- package/src/idl_codegen/types/UpdateLendingMarketConfigValue.ts +43 -0
- package/src/idl_codegen/types/UpdateLendingMarketMode.ts +30 -0
- package/src/idl_codegen/types/index.ts +4 -0
- package/src/idl_codegen_kamino_vault/accounts/Reserve.ts +132 -105
- package/src/idl_codegen_kamino_vault/accounts/VaultState.ts +217 -124
- package/src/idl_codegen_kamino_vault/accounts/index.ts +4 -4
- package/src/idl_codegen_kamino_vault/errors/anchor.ts +335 -326
- package/src/idl_codegen_kamino_vault/errors/custom.ts +353 -157
- package/src/idl_codegen_kamino_vault/errors/index.ts +35 -22
- package/src/idl_codegen_kamino_vault/instructions/deposit.ts +33 -25
- package/src/idl_codegen_kamino_vault/instructions/giveUpPendingFees.ts +40 -0
- package/src/idl_codegen_kamino_vault/instructions/index.ts +27 -10
- package/src/idl_codegen_kamino_vault/instructions/initVault.ts +25 -20
- package/src/idl_codegen_kamino_vault/instructions/invest.ts +40 -25
- package/src/idl_codegen_kamino_vault/instructions/updateAdmin.ts +24 -0
- package/src/idl_codegen_kamino_vault/instructions/updateReserveAllocation.ts +24 -24
- package/src/idl_codegen_kamino_vault/instructions/updateVaultConfig.ts +49 -0
- package/src/idl_codegen_kamino_vault/instructions/withdraw.ts +45 -33
- package/src/idl_codegen_kamino_vault/instructions/withdrawPendingFees.ts +75 -0
- package/src/idl_codegen_kamino_vault/programId.ts +5 -3
- package/src/idl_codegen_kamino_vault/types/BigFractionBytes.ts +24 -18
- package/src/idl_codegen_kamino_vault/types/BorrowRateCurve.ts +21 -16
- package/src/idl_codegen_kamino_vault/types/CurvePoint.ts +21 -18
- package/src/idl_codegen_kamino_vault/types/LastUpdate.ts +32 -27
- package/src/idl_codegen_kamino_vault/types/PriceHeuristic.ts +25 -22
- package/src/idl_codegen_kamino_vault/types/PythConfiguration.ts +14 -14
- package/src/idl_codegen_kamino_vault/types/ReserveCollateral.ts +35 -35
- package/src/idl_codegen_kamino_vault/types/ReserveConfig.ts +232 -191
- package/src/idl_codegen_kamino_vault/types/ReserveFees.ts +27 -23
- package/src/idl_codegen_kamino_vault/types/ReserveLiquidity.ts +116 -98
- package/src/idl_codegen_kamino_vault/types/ScopeConfiguration.ts +25 -25
- package/src/idl_codegen_kamino_vault/types/SwitchboardConfiguration.ts +21 -18
- package/src/idl_codegen_kamino_vault/types/TokenInfo.ts +92 -74
- package/src/idl_codegen_kamino_vault/types/VaultAllocation.ts +67 -49
- package/src/idl_codegen_kamino_vault/types/VaultConfigField.ts +270 -0
- package/src/idl_codegen_kamino_vault/types/index.ts +77 -30
- package/src/utils/ObligationType.ts +6 -0
- package/src/utils/managerTypes.ts +1 -0
- package/src/utils/pubkey.ts +2 -0
- package/src/utils/rpc.ts +3 -1
|
@@ -3,7 +3,7 @@ export type CustomError =
|
|
|
3
3
|
| SharesIssuedAmountDoesNotMatch
|
|
4
4
|
| MathOverflow
|
|
5
5
|
| IntegerOverflow
|
|
6
|
-
|
|
|
6
|
+
| WithdrawAmountBelowMinimum
|
|
7
7
|
| TooMuchLiquidityToWithdraw
|
|
8
8
|
| ReserveAlreadyExists
|
|
9
9
|
| ReserveNotPartOfAllocations
|
|
@@ -12,8 +12,7 @@ export type CustomError =
|
|
|
12
12
|
| ReserveAccountAndKeyMismatch
|
|
13
13
|
| OutOfRangeOfReserveIndex
|
|
14
14
|
| CannotFindReserveInAllocations
|
|
15
|
-
|
|
|
16
|
-
| SlotDecreased
|
|
15
|
+
| InvestAmountBelowMinimum
|
|
17
16
|
| AdminAuthorityIncorrect
|
|
18
17
|
| BaseVaultAuthorityIncorrect
|
|
19
18
|
| BaseVaultAuthorityBumpIncorrect
|
|
@@ -22,323 +21,520 @@ export type CustomError =
|
|
|
22
21
|
| TokenVaultIncorrect
|
|
23
22
|
| SharesMintDecimalsIncorrect
|
|
24
23
|
| SharesMintIncorrect
|
|
25
|
-
| InitialAccountintIncorrect
|
|
24
|
+
| InitialAccountintIncorrect
|
|
25
|
+
| ReserveIsStale
|
|
26
|
+
| NotEnoughLiquidityDisinvestedToSendToUser
|
|
27
|
+
| BPSValueTooBig
|
|
28
|
+
| DepositAmountBelowMinimum
|
|
29
|
+
| ReserveSpaceExhausted
|
|
30
|
+
| CannotWithdrawFromEmptyVault
|
|
31
|
+
| TokensDepositedAmountDoesNotMatch
|
|
32
|
+
| AmountToWithdrawDoesNotMatch
|
|
33
|
+
| LiquidityToWithdrawDoesNotMatch
|
|
34
|
+
| UserReceivedAmountDoesNotMatch
|
|
35
|
+
| SharesBurnedAmountDoesNotMatch
|
|
36
|
+
| DisinvestedLiquidityAmountDoesNotMatch
|
|
37
|
+
| SharesMintedAmountDoesNotMatch
|
|
38
|
+
| AUMDecreasedAfterInvest
|
|
39
|
+
| AUMBelowPendingFees
|
|
26
40
|
|
|
27
41
|
export class DepositAmountsZero extends Error {
|
|
28
|
-
static readonly code = 6000
|
|
29
|
-
readonly code = 6000
|
|
30
|
-
readonly name =
|
|
31
|
-
readonly msg =
|
|
42
|
+
static readonly code = 6000
|
|
43
|
+
readonly code = 6000
|
|
44
|
+
readonly name = "DepositAmountsZero"
|
|
45
|
+
readonly msg = "DepositAmountsZero"
|
|
32
46
|
|
|
33
47
|
constructor(readonly logs?: string[]) {
|
|
34
|
-
super(
|
|
48
|
+
super("6000: DepositAmountsZero")
|
|
35
49
|
}
|
|
36
50
|
}
|
|
37
51
|
|
|
38
52
|
export class SharesIssuedAmountDoesNotMatch extends Error {
|
|
39
|
-
static readonly code = 6001
|
|
40
|
-
readonly code = 6001
|
|
41
|
-
readonly name =
|
|
42
|
-
readonly msg =
|
|
53
|
+
static readonly code = 6001
|
|
54
|
+
readonly code = 6001
|
|
55
|
+
readonly name = "SharesIssuedAmountDoesNotMatch"
|
|
56
|
+
readonly msg = "SharesIssuedAmountDoesNotMatch"
|
|
43
57
|
|
|
44
58
|
constructor(readonly logs?: string[]) {
|
|
45
|
-
super(
|
|
59
|
+
super("6001: SharesIssuedAmountDoesNotMatch")
|
|
46
60
|
}
|
|
47
61
|
}
|
|
48
62
|
|
|
49
63
|
export class MathOverflow extends Error {
|
|
50
|
-
static readonly code = 6002
|
|
51
|
-
readonly code = 6002
|
|
52
|
-
readonly name =
|
|
53
|
-
readonly msg =
|
|
64
|
+
static readonly code = 6002
|
|
65
|
+
readonly code = 6002
|
|
66
|
+
readonly name = "MathOverflow"
|
|
67
|
+
readonly msg = "MathOverflow"
|
|
54
68
|
|
|
55
69
|
constructor(readonly logs?: string[]) {
|
|
56
|
-
super(
|
|
70
|
+
super("6002: MathOverflow")
|
|
57
71
|
}
|
|
58
72
|
}
|
|
59
73
|
|
|
60
74
|
export class IntegerOverflow extends Error {
|
|
61
|
-
static readonly code = 6003
|
|
62
|
-
readonly code = 6003
|
|
63
|
-
readonly name =
|
|
64
|
-
readonly msg =
|
|
75
|
+
static readonly code = 6003
|
|
76
|
+
readonly code = 6003
|
|
77
|
+
readonly name = "IntegerOverflow"
|
|
78
|
+
readonly msg = "IntegerOverflow"
|
|
65
79
|
|
|
66
80
|
constructor(readonly logs?: string[]) {
|
|
67
|
-
super(
|
|
81
|
+
super("6003: IntegerOverflow")
|
|
68
82
|
}
|
|
69
83
|
}
|
|
70
84
|
|
|
71
|
-
export class
|
|
72
|
-
static readonly code = 6004
|
|
73
|
-
readonly code = 6004
|
|
74
|
-
readonly name =
|
|
75
|
-
readonly msg =
|
|
85
|
+
export class WithdrawAmountBelowMinimum extends Error {
|
|
86
|
+
static readonly code = 6004
|
|
87
|
+
readonly code = 6004
|
|
88
|
+
readonly name = "WithdrawAmountBelowMinimum"
|
|
89
|
+
readonly msg = "Withdrawn amount is below minimum"
|
|
76
90
|
|
|
77
91
|
constructor(readonly logs?: string[]) {
|
|
78
|
-
super(
|
|
92
|
+
super("6004: Withdrawn amount is below minimum")
|
|
79
93
|
}
|
|
80
94
|
}
|
|
81
95
|
|
|
82
96
|
export class TooMuchLiquidityToWithdraw extends Error {
|
|
83
|
-
static readonly code = 6005
|
|
84
|
-
readonly code = 6005
|
|
85
|
-
readonly name =
|
|
86
|
-
readonly msg =
|
|
97
|
+
static readonly code = 6005
|
|
98
|
+
readonly code = 6005
|
|
99
|
+
readonly name = "TooMuchLiquidityToWithdraw"
|
|
100
|
+
readonly msg = "TooMuchLiquidityToWithdraw"
|
|
87
101
|
|
|
88
102
|
constructor(readonly logs?: string[]) {
|
|
89
|
-
super(
|
|
103
|
+
super("6005: TooMuchLiquidityToWithdraw")
|
|
90
104
|
}
|
|
91
105
|
}
|
|
92
106
|
|
|
93
107
|
export class ReserveAlreadyExists extends Error {
|
|
94
|
-
static readonly code = 6006
|
|
95
|
-
readonly code = 6006
|
|
96
|
-
readonly name =
|
|
97
|
-
readonly msg =
|
|
108
|
+
static readonly code = 6006
|
|
109
|
+
readonly code = 6006
|
|
110
|
+
readonly name = "ReserveAlreadyExists"
|
|
111
|
+
readonly msg = "ReserveAlreadyExists"
|
|
98
112
|
|
|
99
113
|
constructor(readonly logs?: string[]) {
|
|
100
|
-
super(
|
|
114
|
+
super("6006: ReserveAlreadyExists")
|
|
101
115
|
}
|
|
102
116
|
}
|
|
103
117
|
|
|
104
118
|
export class ReserveNotPartOfAllocations extends Error {
|
|
105
|
-
static readonly code = 6007
|
|
106
|
-
readonly code = 6007
|
|
107
|
-
readonly name =
|
|
108
|
-
readonly msg =
|
|
119
|
+
static readonly code = 6007
|
|
120
|
+
readonly code = 6007
|
|
121
|
+
readonly name = "ReserveNotPartOfAllocations"
|
|
122
|
+
readonly msg = "ReserveNotPartOfAllocations"
|
|
109
123
|
|
|
110
124
|
constructor(readonly logs?: string[]) {
|
|
111
|
-
super(
|
|
125
|
+
super("6007: ReserveNotPartOfAllocations")
|
|
112
126
|
}
|
|
113
127
|
}
|
|
114
128
|
|
|
115
129
|
export class CouldNotDeserializeAccountAsReserve extends Error {
|
|
116
|
-
static readonly code = 6008
|
|
117
|
-
readonly code = 6008
|
|
118
|
-
readonly name =
|
|
119
|
-
readonly msg =
|
|
130
|
+
static readonly code = 6008
|
|
131
|
+
readonly code = 6008
|
|
132
|
+
readonly name = "CouldNotDeserializeAccountAsReserve"
|
|
133
|
+
readonly msg = "CouldNotDeserializeAccountAsReserve"
|
|
120
134
|
|
|
121
135
|
constructor(readonly logs?: string[]) {
|
|
122
|
-
super(
|
|
136
|
+
super("6008: CouldNotDeserializeAccountAsReserve")
|
|
123
137
|
}
|
|
124
138
|
}
|
|
125
139
|
|
|
126
140
|
export class ReserveNotProvidedInTheAccounts extends Error {
|
|
127
|
-
static readonly code = 6009
|
|
128
|
-
readonly code = 6009
|
|
129
|
-
readonly name =
|
|
130
|
-
readonly msg =
|
|
141
|
+
static readonly code = 6009
|
|
142
|
+
readonly code = 6009
|
|
143
|
+
readonly name = "ReserveNotProvidedInTheAccounts"
|
|
144
|
+
readonly msg = "ReserveNotProvidedInTheAccounts"
|
|
131
145
|
|
|
132
146
|
constructor(readonly logs?: string[]) {
|
|
133
|
-
super(
|
|
147
|
+
super("6009: ReserveNotProvidedInTheAccounts")
|
|
134
148
|
}
|
|
135
149
|
}
|
|
136
150
|
|
|
137
151
|
export class ReserveAccountAndKeyMismatch extends Error {
|
|
138
|
-
static readonly code = 6010
|
|
139
|
-
readonly code = 6010
|
|
140
|
-
readonly name =
|
|
141
|
-
readonly msg =
|
|
152
|
+
static readonly code = 6010
|
|
153
|
+
readonly code = 6010
|
|
154
|
+
readonly name = "ReserveAccountAndKeyMismatch"
|
|
155
|
+
readonly msg = "ReserveAccountAndKeyMismatch"
|
|
142
156
|
|
|
143
157
|
constructor(readonly logs?: string[]) {
|
|
144
|
-
super(
|
|
158
|
+
super("6010: ReserveAccountAndKeyMismatch")
|
|
145
159
|
}
|
|
146
160
|
}
|
|
147
161
|
|
|
148
162
|
export class OutOfRangeOfReserveIndex extends Error {
|
|
149
|
-
static readonly code = 6011
|
|
150
|
-
readonly code = 6011
|
|
151
|
-
readonly name =
|
|
152
|
-
readonly msg =
|
|
163
|
+
static readonly code = 6011
|
|
164
|
+
readonly code = 6011
|
|
165
|
+
readonly name = "OutOfRangeOfReserveIndex"
|
|
166
|
+
readonly msg = "OutOfRangeOfReserveIndex"
|
|
153
167
|
|
|
154
168
|
constructor(readonly logs?: string[]) {
|
|
155
|
-
super(
|
|
169
|
+
super("6011: OutOfRangeOfReserveIndex")
|
|
156
170
|
}
|
|
157
171
|
}
|
|
158
172
|
|
|
159
173
|
export class CannotFindReserveInAllocations extends Error {
|
|
160
|
-
static readonly code = 6012
|
|
161
|
-
readonly code = 6012
|
|
162
|
-
readonly name =
|
|
163
|
-
readonly msg =
|
|
174
|
+
static readonly code = 6012
|
|
175
|
+
readonly code = 6012
|
|
176
|
+
readonly name = "CannotFindReserveInAllocations"
|
|
177
|
+
readonly msg = "OutOfRangeOfReserveIndex"
|
|
164
178
|
|
|
165
179
|
constructor(readonly logs?: string[]) {
|
|
166
|
-
super(
|
|
180
|
+
super("6012: OutOfRangeOfReserveIndex")
|
|
167
181
|
}
|
|
168
182
|
}
|
|
169
183
|
|
|
170
|
-
export class
|
|
171
|
-
static readonly code = 6013
|
|
172
|
-
readonly code = 6013
|
|
173
|
-
readonly name =
|
|
174
|
-
readonly msg =
|
|
184
|
+
export class InvestAmountBelowMinimum extends Error {
|
|
185
|
+
static readonly code = 6013
|
|
186
|
+
readonly code = 6013
|
|
187
|
+
readonly name = "InvestAmountBelowMinimum"
|
|
188
|
+
readonly msg = "Invested amount is below minimum"
|
|
175
189
|
|
|
176
190
|
constructor(readonly logs?: string[]) {
|
|
177
|
-
super(
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export class SlotDecreased extends Error {
|
|
182
|
-
static readonly code = 6014;
|
|
183
|
-
readonly code = 6014;
|
|
184
|
-
readonly name = 'SlotDecreased';
|
|
185
|
-
readonly msg = 'SlotDecreased';
|
|
186
|
-
|
|
187
|
-
constructor(readonly logs?: string[]) {
|
|
188
|
-
super('6014: SlotDecreased');
|
|
191
|
+
super("6013: Invested amount is below minimum")
|
|
189
192
|
}
|
|
190
193
|
}
|
|
191
194
|
|
|
192
195
|
export class AdminAuthorityIncorrect extends Error {
|
|
193
|
-
static readonly code =
|
|
194
|
-
readonly code =
|
|
195
|
-
readonly name =
|
|
196
|
-
readonly msg =
|
|
196
|
+
static readonly code = 6014
|
|
197
|
+
readonly code = 6014
|
|
198
|
+
readonly name = "AdminAuthorityIncorrect"
|
|
199
|
+
readonly msg = "AdminAuthorityIncorrect"
|
|
197
200
|
|
|
198
201
|
constructor(readonly logs?: string[]) {
|
|
199
|
-
super(
|
|
202
|
+
super("6014: AdminAuthorityIncorrect")
|
|
200
203
|
}
|
|
201
204
|
}
|
|
202
205
|
|
|
203
206
|
export class BaseVaultAuthorityIncorrect extends Error {
|
|
204
|
-
static readonly code =
|
|
205
|
-
readonly code =
|
|
206
|
-
readonly name =
|
|
207
|
-
readonly msg =
|
|
207
|
+
static readonly code = 6015
|
|
208
|
+
readonly code = 6015
|
|
209
|
+
readonly name = "BaseVaultAuthorityIncorrect"
|
|
210
|
+
readonly msg = "BaseVaultAuthorityIncorrect"
|
|
208
211
|
|
|
209
212
|
constructor(readonly logs?: string[]) {
|
|
210
|
-
super(
|
|
213
|
+
super("6015: BaseVaultAuthorityIncorrect")
|
|
211
214
|
}
|
|
212
215
|
}
|
|
213
216
|
|
|
214
217
|
export class BaseVaultAuthorityBumpIncorrect extends Error {
|
|
215
|
-
static readonly code =
|
|
216
|
-
readonly code =
|
|
217
|
-
readonly name =
|
|
218
|
-
readonly msg =
|
|
218
|
+
static readonly code = 6016
|
|
219
|
+
readonly code = 6016
|
|
220
|
+
readonly name = "BaseVaultAuthorityBumpIncorrect"
|
|
221
|
+
readonly msg = "BaseVaultAuthorityBumpIncorrect"
|
|
219
222
|
|
|
220
223
|
constructor(readonly logs?: string[]) {
|
|
221
|
-
super(
|
|
224
|
+
super("6016: BaseVaultAuthorityBumpIncorrect")
|
|
222
225
|
}
|
|
223
226
|
}
|
|
224
227
|
|
|
225
228
|
export class TokenMintIncorrect extends Error {
|
|
226
|
-
static readonly code =
|
|
227
|
-
readonly code =
|
|
228
|
-
readonly name =
|
|
229
|
-
readonly msg =
|
|
229
|
+
static readonly code = 6017
|
|
230
|
+
readonly code = 6017
|
|
231
|
+
readonly name = "TokenMintIncorrect"
|
|
232
|
+
readonly msg = "TokenMintIncorrect"
|
|
230
233
|
|
|
231
234
|
constructor(readonly logs?: string[]) {
|
|
232
|
-
super(
|
|
235
|
+
super("6017: TokenMintIncorrect")
|
|
233
236
|
}
|
|
234
237
|
}
|
|
235
238
|
|
|
236
239
|
export class TokenMintDecimalsIncorrect extends Error {
|
|
237
|
-
static readonly code =
|
|
238
|
-
readonly code =
|
|
239
|
-
readonly name =
|
|
240
|
-
readonly msg =
|
|
240
|
+
static readonly code = 6018
|
|
241
|
+
readonly code = 6018
|
|
242
|
+
readonly name = "TokenMintDecimalsIncorrect"
|
|
243
|
+
readonly msg = "TokenMintDecimalsIncorrect"
|
|
241
244
|
|
|
242
245
|
constructor(readonly logs?: string[]) {
|
|
243
|
-
super(
|
|
246
|
+
super("6018: TokenMintDecimalsIncorrect")
|
|
244
247
|
}
|
|
245
248
|
}
|
|
246
249
|
|
|
247
250
|
export class TokenVaultIncorrect extends Error {
|
|
248
|
-
static readonly code =
|
|
249
|
-
readonly code =
|
|
250
|
-
readonly name =
|
|
251
|
-
readonly msg =
|
|
251
|
+
static readonly code = 6019
|
|
252
|
+
readonly code = 6019
|
|
253
|
+
readonly name = "TokenVaultIncorrect"
|
|
254
|
+
readonly msg = "TokenVaultIncorrect"
|
|
252
255
|
|
|
253
256
|
constructor(readonly logs?: string[]) {
|
|
254
|
-
super(
|
|
257
|
+
super("6019: TokenVaultIncorrect")
|
|
255
258
|
}
|
|
256
259
|
}
|
|
257
260
|
|
|
258
261
|
export class SharesMintDecimalsIncorrect extends Error {
|
|
259
|
-
static readonly code =
|
|
260
|
-
readonly code =
|
|
261
|
-
readonly name =
|
|
262
|
-
readonly msg =
|
|
262
|
+
static readonly code = 6020
|
|
263
|
+
readonly code = 6020
|
|
264
|
+
readonly name = "SharesMintDecimalsIncorrect"
|
|
265
|
+
readonly msg = "SharesMintDecimalsIncorrect"
|
|
263
266
|
|
|
264
267
|
constructor(readonly logs?: string[]) {
|
|
265
|
-
super(
|
|
268
|
+
super("6020: SharesMintDecimalsIncorrect")
|
|
266
269
|
}
|
|
267
270
|
}
|
|
268
271
|
|
|
269
272
|
export class SharesMintIncorrect extends Error {
|
|
270
|
-
static readonly code =
|
|
271
|
-
readonly code =
|
|
272
|
-
readonly name =
|
|
273
|
-
readonly msg =
|
|
273
|
+
static readonly code = 6021
|
|
274
|
+
readonly code = 6021
|
|
275
|
+
readonly name = "SharesMintIncorrect"
|
|
276
|
+
readonly msg = "SharesMintIncorrect"
|
|
274
277
|
|
|
275
278
|
constructor(readonly logs?: string[]) {
|
|
276
|
-
super(
|
|
279
|
+
super("6021: SharesMintIncorrect")
|
|
277
280
|
}
|
|
278
281
|
}
|
|
279
282
|
|
|
280
283
|
export class InitialAccountintIncorrect extends Error {
|
|
281
|
-
static readonly code =
|
|
282
|
-
readonly code =
|
|
283
|
-
readonly name =
|
|
284
|
-
readonly msg =
|
|
284
|
+
static readonly code = 6022
|
|
285
|
+
readonly code = 6022
|
|
286
|
+
readonly name = "InitialAccountintIncorrect"
|
|
287
|
+
readonly msg = "InitialAccountintIncorrect"
|
|
288
|
+
|
|
289
|
+
constructor(readonly logs?: string[]) {
|
|
290
|
+
super("6022: InitialAccountintIncorrect")
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export class ReserveIsStale extends Error {
|
|
295
|
+
static readonly code = 6023
|
|
296
|
+
readonly code = 6023
|
|
297
|
+
readonly name = "ReserveIsStale"
|
|
298
|
+
readonly msg = "Reserve is stale and must be refreshed before any operation"
|
|
299
|
+
|
|
300
|
+
constructor(readonly logs?: string[]) {
|
|
301
|
+
super("6023: Reserve is stale and must be refreshed before any operation")
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export class NotEnoughLiquidityDisinvestedToSendToUser extends Error {
|
|
306
|
+
static readonly code = 6024
|
|
307
|
+
readonly code = 6024
|
|
308
|
+
readonly name = "NotEnoughLiquidityDisinvestedToSendToUser"
|
|
309
|
+
readonly msg = "Not enough liquidity disinvested to send to user"
|
|
310
|
+
|
|
311
|
+
constructor(readonly logs?: string[]) {
|
|
312
|
+
super("6024: Not enough liquidity disinvested to send to user")
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export class BPSValueTooBig extends Error {
|
|
317
|
+
static readonly code = 6025
|
|
318
|
+
readonly code = 6025
|
|
319
|
+
readonly name = "BPSValueTooBig"
|
|
320
|
+
readonly msg = "BPS value is greater than 10000"
|
|
321
|
+
|
|
322
|
+
constructor(readonly logs?: string[]) {
|
|
323
|
+
super("6025: BPS value is greater than 10000")
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export class DepositAmountBelowMinimum extends Error {
|
|
328
|
+
static readonly code = 6026
|
|
329
|
+
readonly code = 6026
|
|
330
|
+
readonly name = "DepositAmountBelowMinimum"
|
|
331
|
+
readonly msg = "Deposited amount is below minimum"
|
|
332
|
+
|
|
333
|
+
constructor(readonly logs?: string[]) {
|
|
334
|
+
super("6026: Deposited amount is below minimum")
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export class ReserveSpaceExhausted extends Error {
|
|
339
|
+
static readonly code = 6027
|
|
340
|
+
readonly code = 6027
|
|
341
|
+
readonly name = "ReserveSpaceExhausted"
|
|
342
|
+
readonly msg = "Vault have no space for new reserves"
|
|
343
|
+
|
|
344
|
+
constructor(readonly logs?: string[]) {
|
|
345
|
+
super("6027: Vault have no space for new reserves")
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export class CannotWithdrawFromEmptyVault extends Error {
|
|
350
|
+
static readonly code = 6028
|
|
351
|
+
readonly code = 6028
|
|
352
|
+
readonly name = "CannotWithdrawFromEmptyVault"
|
|
353
|
+
readonly msg = "Cannot withdraw from empty vault"
|
|
354
|
+
|
|
355
|
+
constructor(readonly logs?: string[]) {
|
|
356
|
+
super("6028: Cannot withdraw from empty vault")
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export class TokensDepositedAmountDoesNotMatch extends Error {
|
|
361
|
+
static readonly code = 6029
|
|
362
|
+
readonly code = 6029
|
|
363
|
+
readonly name = "TokensDepositedAmountDoesNotMatch"
|
|
364
|
+
readonly msg = "TokensDepositedAmountDoesNotMatch"
|
|
365
|
+
|
|
366
|
+
constructor(readonly logs?: string[]) {
|
|
367
|
+
super("6029: TokensDepositedAmountDoesNotMatch")
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export class AmountToWithdrawDoesNotMatch extends Error {
|
|
372
|
+
static readonly code = 6030
|
|
373
|
+
readonly code = 6030
|
|
374
|
+
readonly name = "AmountToWithdrawDoesNotMatch"
|
|
375
|
+
readonly msg = "Amount to withdraw does not match"
|
|
376
|
+
|
|
377
|
+
constructor(readonly logs?: string[]) {
|
|
378
|
+
super("6030: Amount to withdraw does not match")
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export class LiquidityToWithdrawDoesNotMatch extends Error {
|
|
383
|
+
static readonly code = 6031
|
|
384
|
+
readonly code = 6031
|
|
385
|
+
readonly name = "LiquidityToWithdrawDoesNotMatch"
|
|
386
|
+
readonly msg = "Liquidity to withdraw does not match"
|
|
387
|
+
|
|
388
|
+
constructor(readonly logs?: string[]) {
|
|
389
|
+
super("6031: Liquidity to withdraw does not match")
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export class UserReceivedAmountDoesNotMatch extends Error {
|
|
394
|
+
static readonly code = 6032
|
|
395
|
+
readonly code = 6032
|
|
396
|
+
readonly name = "UserReceivedAmountDoesNotMatch"
|
|
397
|
+
readonly msg = "User received amount does not match"
|
|
398
|
+
|
|
399
|
+
constructor(readonly logs?: string[]) {
|
|
400
|
+
super("6032: User received amount does not match")
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
export class SharesBurnedAmountDoesNotMatch extends Error {
|
|
405
|
+
static readonly code = 6033
|
|
406
|
+
readonly code = 6033
|
|
407
|
+
readonly name = "SharesBurnedAmountDoesNotMatch"
|
|
408
|
+
readonly msg = "Shares burned amount does not match"
|
|
409
|
+
|
|
410
|
+
constructor(readonly logs?: string[]) {
|
|
411
|
+
super("6033: Shares burned amount does not match")
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export class DisinvestedLiquidityAmountDoesNotMatch extends Error {
|
|
416
|
+
static readonly code = 6034
|
|
417
|
+
readonly code = 6034
|
|
418
|
+
readonly name = "DisinvestedLiquidityAmountDoesNotMatch"
|
|
419
|
+
readonly msg = "Disinvested liquidity amount does not match"
|
|
420
|
+
|
|
421
|
+
constructor(readonly logs?: string[]) {
|
|
422
|
+
super("6034: Disinvested liquidity amount does not match")
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export class SharesMintedAmountDoesNotMatch extends Error {
|
|
427
|
+
static readonly code = 6035
|
|
428
|
+
readonly code = 6035
|
|
429
|
+
readonly name = "SharesMintedAmountDoesNotMatch"
|
|
430
|
+
readonly msg = "SharesMintedAmountDoesNotMatch"
|
|
431
|
+
|
|
432
|
+
constructor(readonly logs?: string[]) {
|
|
433
|
+
super("6035: SharesMintedAmountDoesNotMatch")
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export class AUMDecreasedAfterInvest extends Error {
|
|
438
|
+
static readonly code = 6036
|
|
439
|
+
readonly code = 6036
|
|
440
|
+
readonly name = "AUMDecreasedAfterInvest"
|
|
441
|
+
readonly msg = "AUM decreased after invest"
|
|
442
|
+
|
|
443
|
+
constructor(readonly logs?: string[]) {
|
|
444
|
+
super("6036: AUM decreased after invest")
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export class AUMBelowPendingFees extends Error {
|
|
449
|
+
static readonly code = 6037
|
|
450
|
+
readonly code = 6037
|
|
451
|
+
readonly name = "AUMBelowPendingFees"
|
|
452
|
+
readonly msg = "AUM is below pending fees"
|
|
285
453
|
|
|
286
454
|
constructor(readonly logs?: string[]) {
|
|
287
|
-
super(
|
|
455
|
+
super("6037: AUM is below pending fees")
|
|
288
456
|
}
|
|
289
457
|
}
|
|
290
458
|
|
|
291
459
|
export function fromCode(code: number, logs?: string[]): CustomError | null {
|
|
292
460
|
switch (code) {
|
|
293
461
|
case 6000:
|
|
294
|
-
return new DepositAmountsZero(logs)
|
|
462
|
+
return new DepositAmountsZero(logs)
|
|
295
463
|
case 6001:
|
|
296
|
-
return new SharesIssuedAmountDoesNotMatch(logs)
|
|
464
|
+
return new SharesIssuedAmountDoesNotMatch(logs)
|
|
297
465
|
case 6002:
|
|
298
|
-
return new MathOverflow(logs)
|
|
466
|
+
return new MathOverflow(logs)
|
|
299
467
|
case 6003:
|
|
300
|
-
return new IntegerOverflow(logs)
|
|
468
|
+
return new IntegerOverflow(logs)
|
|
301
469
|
case 6004:
|
|
302
|
-
return new
|
|
470
|
+
return new WithdrawAmountBelowMinimum(logs)
|
|
303
471
|
case 6005:
|
|
304
|
-
return new TooMuchLiquidityToWithdraw(logs)
|
|
472
|
+
return new TooMuchLiquidityToWithdraw(logs)
|
|
305
473
|
case 6006:
|
|
306
|
-
return new ReserveAlreadyExists(logs)
|
|
474
|
+
return new ReserveAlreadyExists(logs)
|
|
307
475
|
case 6007:
|
|
308
|
-
return new ReserveNotPartOfAllocations(logs)
|
|
476
|
+
return new ReserveNotPartOfAllocations(logs)
|
|
309
477
|
case 6008:
|
|
310
|
-
return new CouldNotDeserializeAccountAsReserve(logs)
|
|
478
|
+
return new CouldNotDeserializeAccountAsReserve(logs)
|
|
311
479
|
case 6009:
|
|
312
|
-
return new ReserveNotProvidedInTheAccounts(logs)
|
|
480
|
+
return new ReserveNotProvidedInTheAccounts(logs)
|
|
313
481
|
case 6010:
|
|
314
|
-
return new ReserveAccountAndKeyMismatch(logs)
|
|
482
|
+
return new ReserveAccountAndKeyMismatch(logs)
|
|
315
483
|
case 6011:
|
|
316
|
-
return new OutOfRangeOfReserveIndex(logs)
|
|
484
|
+
return new OutOfRangeOfReserveIndex(logs)
|
|
317
485
|
case 6012:
|
|
318
|
-
return new CannotFindReserveInAllocations(logs)
|
|
486
|
+
return new CannotFindReserveInAllocations(logs)
|
|
319
487
|
case 6013:
|
|
320
|
-
return new
|
|
488
|
+
return new InvestAmountBelowMinimum(logs)
|
|
321
489
|
case 6014:
|
|
322
|
-
return new
|
|
490
|
+
return new AdminAuthorityIncorrect(logs)
|
|
323
491
|
case 6015:
|
|
324
|
-
return new
|
|
492
|
+
return new BaseVaultAuthorityIncorrect(logs)
|
|
325
493
|
case 6016:
|
|
326
|
-
return new
|
|
494
|
+
return new BaseVaultAuthorityBumpIncorrect(logs)
|
|
327
495
|
case 6017:
|
|
328
|
-
return new
|
|
496
|
+
return new TokenMintIncorrect(logs)
|
|
329
497
|
case 6018:
|
|
330
|
-
return new
|
|
498
|
+
return new TokenMintDecimalsIncorrect(logs)
|
|
331
499
|
case 6019:
|
|
332
|
-
return new
|
|
500
|
+
return new TokenVaultIncorrect(logs)
|
|
333
501
|
case 6020:
|
|
334
|
-
return new
|
|
502
|
+
return new SharesMintDecimalsIncorrect(logs)
|
|
335
503
|
case 6021:
|
|
336
|
-
return new
|
|
504
|
+
return new SharesMintIncorrect(logs)
|
|
337
505
|
case 6022:
|
|
338
|
-
return new
|
|
506
|
+
return new InitialAccountintIncorrect(logs)
|
|
339
507
|
case 6023:
|
|
340
|
-
return new
|
|
508
|
+
return new ReserveIsStale(logs)
|
|
509
|
+
case 6024:
|
|
510
|
+
return new NotEnoughLiquidityDisinvestedToSendToUser(logs)
|
|
511
|
+
case 6025:
|
|
512
|
+
return new BPSValueTooBig(logs)
|
|
513
|
+
case 6026:
|
|
514
|
+
return new DepositAmountBelowMinimum(logs)
|
|
515
|
+
case 6027:
|
|
516
|
+
return new ReserveSpaceExhausted(logs)
|
|
517
|
+
case 6028:
|
|
518
|
+
return new CannotWithdrawFromEmptyVault(logs)
|
|
519
|
+
case 6029:
|
|
520
|
+
return new TokensDepositedAmountDoesNotMatch(logs)
|
|
521
|
+
case 6030:
|
|
522
|
+
return new AmountToWithdrawDoesNotMatch(logs)
|
|
523
|
+
case 6031:
|
|
524
|
+
return new LiquidityToWithdrawDoesNotMatch(logs)
|
|
525
|
+
case 6032:
|
|
526
|
+
return new UserReceivedAmountDoesNotMatch(logs)
|
|
527
|
+
case 6033:
|
|
528
|
+
return new SharesBurnedAmountDoesNotMatch(logs)
|
|
529
|
+
case 6034:
|
|
530
|
+
return new DisinvestedLiquidityAmountDoesNotMatch(logs)
|
|
531
|
+
case 6035:
|
|
532
|
+
return new SharesMintedAmountDoesNotMatch(logs)
|
|
533
|
+
case 6036:
|
|
534
|
+
return new AUMDecreasedAfterInvest(logs)
|
|
535
|
+
case 6037:
|
|
536
|
+
return new AUMBelowPendingFees(logs)
|
|
341
537
|
}
|
|
342
538
|
|
|
343
|
-
return null
|
|
539
|
+
return null
|
|
344
540
|
}
|