#[repr(u32)]pub enum KvaultError {
Show 64 variants
DepositAmountsZero = 7_000,
SharesIssuedAmountDoesNotMatch = 7_001,
MathOverflow = 7_002,
IntegerOverflow = 7_003,
WithdrawAmountBelowMinimum = 7_004,
TooMuchLiquidityToWithdraw = 7_005,
ReserveAlreadyExists = 7_006,
ReserveNotPartOfAllocations = 7_007,
CouldNotDeserializeAccountAsReserve = 7_008,
ReserveNotProvidedInTheAccounts = 7_009,
ReserveAccountAndKeyMismatch = 7_010,
OutOfRangeOfReserveIndex = 7_011,
CannotFindReserveInAllocations = 7_012,
InvestAmountBelowMinimum = 7_013,
AdminAuthorityIncorrect = 7_014,
BaseVaultAuthorityIncorrect = 7_015,
BaseVaultAuthorityBumpIncorrect = 7_016,
TokenMintIncorrect = 7_017,
TokenMintDecimalsIncorrect = 7_018,
TokenVaultIncorrect = 7_019,
SharesMintDecimalsIncorrect = 7_020,
SharesMintIncorrect = 7_021,
InitialAccountingIncorrect = 7_022,
ReserveIsStale = 7_023,
NotEnoughLiquidityDisinvestedToSendToUser = 7_024,
BPSValueTooBig = 7_025,
DepositAmountBelowMinimum = 7_026,
ReserveSpaceExhausted = 7_027,
CannotWithdrawFromEmptyVault = 7_028,
TokensDepositedAmountDoesNotMatch = 7_029,
AmountToWithdrawDoesNotMatch = 7_030,
LiquidityToWithdrawDoesNotMatch = 7_031,
UserReceivedAmountDoesNotMatch = 7_032,
SharesBurnedAmountDoesNotMatch = 7_033,
DisinvestedLiquidityAmountDoesNotMatch = 7_034,
SharesMintedAmountDoesNotMatch = 7_035,
AUMDecreasedAfterInvest = 7_036,
AUMBelowPendingFees = 7_037,
DepositAmountsZeroShares = 7_038,
WithdrawResultsInZeroShares = 7_039,
CannotWithdrawZeroShares = 7_040,
ManagementFeeGreaterThanMaxAllowed = 7_041,
VaultAUMZero = 7_042,
MissingReserveForBatchRefresh = 7_043,
MinWithdrawAmountTooBig = 7_044,
InvestTooSoon = 7_045,
WrongAdminOrAllocationAdmin = 7_046,
ReserveHasNonZeroAllocationOrCTokens = 7_047,
DepositAmountGreaterThanRequestedAmount = 7_048,
WithdrawAmountLessThanWithdrawalPenalty = 7_049,
CannotWithdrawZeroLamports = 7_050,
NoUpgradeAuthority = 7_051,
WithdrawalFeeBPSGreaterThanMaxAllowed = 7_052,
WithdrawalFeeLamportsGreaterThanMaxAllowed = 7_053,
ReserveNotWhitelisted = 7_054,
InvalidBoolLikeValue = 7_055,
AUMDecreasedMoreThanExpected = 7_056,
RewardTopupAmountZero = 7_057,
RewardTopupAmountNotExpected = 7_058,
RewardWithdrawAmountZero = 7_059,
RewardWithdrawAmountNotExpected = 7_060,
RewardsStaleForFeeUpdate = 7_061,
VaultDepositCapReached = 7_062,
MaxInvestAmountMustBeGreaterThanZero = 7_063,
}Variants§
DepositAmountsZero = 7_000
Deposit amounts are zero.
Shares issued amount does not match expected.
MathOverflow = 7_002
Math operation overflowed.
IntegerOverflow = 7_003
Integer conversion overflowed.
WithdrawAmountBelowMinimum = 7_004
Withdraw amount is below the minimum.
TooMuchLiquidityToWithdraw = 7_005
Too much liquidity requested for withdrawal.
ReserveAlreadyExists = 7_006
Reserve already exists in the vault.
ReserveNotPartOfAllocations = 7_007
Reserve is not part of vault allocations.
CouldNotDeserializeAccountAsReserve = 7_008
Could not deserialize account as a reserve.
ReserveNotProvidedInTheAccounts = 7_009
Reserve not provided in the accounts.
ReserveAccountAndKeyMismatch = 7_010
Reserve account and key mismatch.
OutOfRangeOfReserveIndex = 7_011
Reserve index is out of range.
CannotFindReserveInAllocations = 7_012
Cannot find reserve in allocations.
InvestAmountBelowMinimum = 7_013
Invest amount is below the minimum.
AdminAuthorityIncorrect = 7_014
Admin authority is incorrect.
BaseVaultAuthorityIncorrect = 7_015
Base vault authority is incorrect.
BaseVaultAuthorityBumpIncorrect = 7_016
Base vault authority bump is incorrect.
TokenMintIncorrect = 7_017
Token mint is incorrect.
TokenMintDecimalsIncorrect = 7_018
Token mint decimals are incorrect.
TokenVaultIncorrect = 7_019
Token vault is incorrect.
Shares mint decimals are incorrect.
Shares mint is incorrect.
InitialAccountingIncorrect = 7_022
Initial accounting is incorrect.
ReserveIsStale = 7_023
Reserve state needs to be refreshed.
NotEnoughLiquidityDisinvestedToSendToUser = 7_024
Not enough liquidity disinvested to send to user.
BPSValueTooBig = 7_025
Basis points value is too large.
DepositAmountBelowMinimum = 7_026
Deposit amount is below the minimum.
ReserveSpaceExhausted = 7_027
No more reserve slots available in the vault.
CannotWithdrawFromEmptyVault = 7_028
Cannot withdraw from an empty vault.
TokensDepositedAmountDoesNotMatch = 7_029
Tokens deposited amount does not match expected.
AmountToWithdrawDoesNotMatch = 7_030
Amount to withdraw does not match expected.
LiquidityToWithdrawDoesNotMatch = 7_031
Liquidity to withdraw does not match expected.
UserReceivedAmountDoesNotMatch = 7_032
User received amount does not match expected.
Shares burned amount does not match expected.
DisinvestedLiquidityAmountDoesNotMatch = 7_034
Disinvested liquidity amount does not match expected.
Shares minted amount does not match expected.
AUMDecreasedAfterInvest = 7_036
Assets under management decreased after invest.
AUMBelowPendingFees = 7_037
Assets under management is below pending fees.
Deposit would result in zero shares.
Withdraw results in zero shares.
Cannot withdraw zero shares.
ManagementFeeGreaterThanMaxAllowed = 7_041
Management fee exceeds the maximum allowed.
VaultAUMZero = 7_042
Vault assets under management is zero.
MissingReserveForBatchRefresh = 7_043
Missing reserve account for batch refresh.
MinWithdrawAmountTooBig = 7_044
Minimum withdraw amount is too large.
InvestTooSoon = 7_045
Invest called too soon after the previous invest.
WrongAdminOrAllocationAdmin = 7_046
Signer is neither the admin nor the allocation admin.
ReserveHasNonZeroAllocationOrCTokens = 7_047
Reserve has non-zero allocation or cToken balance.
DepositAmountGreaterThanRequestedAmount = 7_048
Deposit amount exceeds the requested amount.
WithdrawAmountLessThanWithdrawalPenalty = 7_049
Withdraw amount is less than the withdrawal penalty.
CannotWithdrawZeroLamports = 7_050
Cannot withdraw zero lamports.
NoUpgradeAuthority = 7_051
Program has no upgrade authority.
WithdrawalFeeBPSGreaterThanMaxAllowed = 7_052
Withdrawal fee BPS exceeds the maximum allowed.
WithdrawalFeeLamportsGreaterThanMaxAllowed = 7_053
Withdrawal fee lamports exceeds the maximum allowed.
ReserveNotWhitelisted = 7_054
Reserve is not whitelisted.
InvalidBoolLikeValue = 7_055
Invalid boolean-like value.
AUMDecreasedMoreThanExpected = 7_056
Assets under management decreased more than expected.
RewardTopupAmountZero = 7_057
RewardTopupAmountNotExpected = 7_058
RewardWithdrawAmountZero = 7_059
RewardWithdrawAmountNotExpected = 7_060
RewardsStaleForFeeUpdate = 7_061
VaultDepositCapReached = 7_062
Vault deposit cap reached.
MaxInvestAmountMustBeGreaterThanZero = 7_063
Max invest amount must be greater than zero.
Implementations§
Source§impl KvaultError
impl KvaultError
Sourcepub const fn error_code(self) -> u32
pub const fn error_code(self) -> u32
Returns the Anchor error code for this variant (6000 + offset).
Sourcepub const fn from_error_code(code: u32) -> Option<Self>
pub const fn from_error_code(code: u32) -> Option<Self>
Converts an Anchor error code to a KvaultError, if it matches a known variant.
Trait Implementations§
Source§impl Clone for KvaultError
impl Clone for KvaultError
Source§fn clone(&self) -> KvaultError
fn clone(&self) -> KvaultError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for KvaultError
Source§impl Debug for KvaultError
impl Debug for KvaultError
Source§impl Display for KvaultError
impl Display for KvaultError
impl Eq for KvaultError
Source§impl Error for KvaultError
impl Error for KvaultError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl Hash for KvaultError
impl Hash for KvaultError
Source§impl PartialEq for KvaultError
impl PartialEq for KvaultError
Source§fn eq(&self, other: &KvaultError) -> bool
fn eq(&self, other: &KvaultError) -> bool
self and other values to be equal, and is used by ==.