#[repr(u32)]
pub enum ErrorCode {
Show 178 variants
ExpirationIsInThePast,
QuoteAndUnderlyingAssetMustDiffer,
QuoteOrUnderlyingAmountCannotBe0,
OptionMarketMustBeMintAuthority,
OptionMarketMustOwnUnderlyingAssetPool,
OptionMarketMustOwnQuoteAssetPool,
ExpectedSPLTokenProgramId,
MintFeeMustBeOwnedByFeeOwner,
ExerciseFeeMustBeOwnedByFeeOwner,
MintFeeTokenMustMatchUnderlyingAsset,
ExerciseFeeTokenMustMatchQuoteAsset,
OptionMarketExpiredCantMint,
UnderlyingPoolAccountDoesNotMatchMarket,
OptionTokenMintDoesNotMatchMarket,
WriterTokenMintDoesNotMatchMarket,
MintFeeKeyDoesNotMatchOptionMarket,
SizeCantBeLessThanEqZero,
ExerciseFeeKeyDoesNotMatchOptionMarket,
QuotePoolAccountDoesNotMatchMarket,
UnderlyingDestMintDoesNotMatchUnderlyingAsset,
FeeOwnerDoesNotMatchProgram,
OptionMarketExpiredCantExercise,
OptionMarketNotExpiredCantClose,
NotEnoughQuoteAssetsInPool,
InvalidAuth,
CoinMintIsNotOptionMint,
CannotPruneActiveMarket,
NumberOverflow,
InvalidOrderType,
InvalidSelfTradeBehavior,
Unauthorized,
InsufficientCollateralForWriting,
InsufficientVaultTokens,
ContractExpired,
ContractNotYetExpired,
InvalidMintAmount,
InvalidRebalanceExitTime,
InvalidRebalanceEntryTime,
InvalidRebalancePrepareTime,
InvalidWithdrawalTime,
InvalidDepositTime,
InvalidSetNextOptionTime,
InvalidDepositAmount,
InvalidRebalanceSettleTime,
InvalidRebalanceSettleState,
InvalidRebalanceEnterState,
OptionsPositionNotSettled,
NonUnderlyingPoolsHaveAssets,
VaultAuthorityMustBeVaultMintAuthority,
VaultAuthorityMustOwnDepositPool,
VaultAuthorityMustOwnPremiumPool,
VoltVaulttMustOwnWriterTokenPool,
VoltVaultMustOwnOptionPool,
DepositPoolDoesNotMatchVoltVault,
OptionPoolDoesNotMatchVoltVault,
PremiumPoolDoesNotMatchVoltVault,
TraidngPoolDoesNotMatchVoltVault,
OptionMintDoesNotMatchOptionMarket,
NoOrdersInOptionOrderBook,
CpiProgramMustBeSomeInPlaceOrder,
NewOptionMustNotBeExpired,
NewOptionMustHaveExactExpiry,
NewOptionHasWrongUnderlyingAsset,
NewOptionHasWrongQuoteAsset,
NewOptionHasWrongContractSize,
NewOptionHasInvalidStrike,
RebalanceSettleHasLeftoverWriterTokens,
CurrentOptionMustNotBeExpired,
CannotReinitializeVolt,
OldOptionAndWriterTokenPoolsMustBeEmpty,
InvalidOldOptionWriterTokenPools,
VaultMintDoesNotMatchUserTokenAccount,
DepositPoolMintDoesNotMatchUserTokenAccount,
VaultAuthorityDoesNotMatch,
DexProgramIdDoesNotMatchAnchor,
InertiaProgramIdDoesNotMatch,
InvalidAuthorityForPermissionedInstruction,
WriterTokenMintDoesNotMatchOptionMarket,
OptionMarketMustBeOwnedByProtocol,
UnderlyingAssetMintDoesNotMatchVoltVault,
QuoteAssetMintDoesNotMatchVoltVault,
VaultMintDoesNotMatchVoltVault,
OptionMarketDoesNotMatchVoltVault,
WriterTokenPoolDoesNotMatchVoltVault,
InvalidRebalanceSwapPremiumState,
ShouldBeUnreachable,
CantHaveMultiplePendingDeposits,
InvalidStartRoundState,
InvalidSetNextOptionState,
InvalidClaimPendingState,
InvalidEndRoundState,
CantHaveMultiplePendingWithdrawals,
InvalidClaimPendingWithdrawalState,
InvalidNextOptionMarket,
TokenNotRevoked,
NonWhitelistedUser,
UserIsNotSigner,
InvalidWhitelistAuthority,
InvalidWhitelistAndOptionMarketCombination,
RoundVoltTokensMintDoesNotMatchVoltVault,
RoundUnderlyingTokensMintDoesNotMatchVoltVault,
UnderlyingAssetPoolDoesNotMatchOptionMarket,
NoOppositeOrderOnSerumMarket,
BidPriceOnSerumMarketTooLow,
OfferPriceOnSerumMarketTooHigh,
UnderlyingOpenOrdersDoesNotMatchVoltVault,
MustHaveAtLeastOneMarketMakerAccessToken,
MiddlewareProgramIdDoesNotMatch,
FeeAccountOwnerDoesNotMatch,
FeeAccountMintDoesNotMatchDepositPool,
VaultCapacityWouldBeExceeded,
IndividualDepositCapacityWouldBeExceeded,
UnsupportedOptionMarketProgramId,
InvalidEndDcaRoundState,
RoundHasNotStarted,
PermissionedMarketPremiumPoolDoesNotMatchVoltVault,
TokenAccountOwnersDoNotMatch,
InvalidPermissionedMarketPremiumMint,
PremiumPoolAmountMustBeGreaterThanZero,
CantCloseNonEmptyTokenAccount,
MustFinishEnteringBeforeSettlingPermissionedMarketPremium,
PendingWithdrawalInfoNotInitialized,
PendingWithdrawalDoesNotExist,
CannotCancelPendingWithdrawalFromOldRound,
InvalidTakePendingWithdrawalFeesState,
PendingDepositInfoNotInitialized,
PendingDepositDoesNotExist,
CannotCancelPendingDepositFromOldRound,
VaultDestinationDoesNotMatchVoltVault,
MustTakeWithdrawalFeesBeforeStartingRound,
RoundMustBeEnded,
MustNotHaveSoldOptionTokens,
CantCloseAccountUnlessEmpty,
OpenOrderMustBeEmptyToClose,
InvalidWhitelistAccountVector,
InvalidDaoProgramId,
VoltMustBeForDao,
InvalidDaoAuthority,
DaoAuthorityMustSign,
InvalidPendingDepositKey,
InvalidAuthorityCheck,
InvalidEndEntropyRoundState,
InvalidVoltType,
CantFindPerpMarketIndex,
AccountEquityLessThanZero,
QuotePositionChangedTooMuch,
MustMoveCloserToTargetCollateralization,
CollateralNotWithinLenience,
InvalidRebalanceEntropyState,
BasePositionMustBeNegative,
QuotePositionMustBePositive,
TargetCollateralRatioMustBeNegative,
NewEquityMustBeHigherThanDepositAmount,
InstantTransfersMustBeDisabled,
RebalanceMustBeReady,
IncorrectHedge,
VaultNameMustBeNonZeroLength,
VaultDoesNotSupportOverLeveragedStrategies,
LenienceMustBeGreaterThanZero,
LenienceShouldNotBeGreaterThanLeverage,
HedgeLenienceMustBeGreaterThanZero,
VaultDoesNotSupportExitEarlyOverLeveragedStrategies,
RoundNumberMustNotOverflow,
InvalidWhitelistTokenAccountMint,
SoloptionsProgramIdDoesNotMatch,
WhitelistTokenAccountOwnerIsNotUser,
SolTransferAuthorityMustNotBeOwnedByVoltProgram,
InsufficientCollateralForDeposit,
SolTransferAuthorityMustBeWritableAndSigner,
VoltMustBeOfEntropyType,
VoltMustBeofShortOptionsType,
DepositsAndWithdrawalsAreTurnedOff,
UnrecognizedEntropyProgramId,
InvalidTakePerformanceFeesState,
DiscriminatorDoesNotMatch,
RealizedOraclePriceTooFarOffClientProvided,
VaultMintSupplyMustBeZeroIfEquityIsZero,
InvalidSetupRebalanceEntropyState,
}Variants
ExpirationIsInThePast
QuoteAndUnderlyingAssetMustDiffer
QuoteOrUnderlyingAmountCannotBe0
OptionMarketMustBeMintAuthority
OptionMarketMustOwnUnderlyingAssetPool
OptionMarketMustOwnQuoteAssetPool
ExpectedSPLTokenProgramId
MintFeeMustBeOwnedByFeeOwner
ExerciseFeeMustBeOwnedByFeeOwner
MintFeeTokenMustMatchUnderlyingAsset
ExerciseFeeTokenMustMatchQuoteAsset
OptionMarketExpiredCantMint
UnderlyingPoolAccountDoesNotMatchMarket
OptionTokenMintDoesNotMatchMarket
WriterTokenMintDoesNotMatchMarket
MintFeeKeyDoesNotMatchOptionMarket
SizeCantBeLessThanEqZero
ExerciseFeeKeyDoesNotMatchOptionMarket
QuotePoolAccountDoesNotMatchMarket
UnderlyingDestMintDoesNotMatchUnderlyingAsset
FeeOwnerDoesNotMatchProgram
OptionMarketExpiredCantExercise
OptionMarketNotExpiredCantClose
NotEnoughQuoteAssetsInPool
InvalidAuth
CoinMintIsNotOptionMint
CannotPruneActiveMarket
NumberOverflow
InvalidOrderType
InvalidSelfTradeBehavior
Unauthorized
InsufficientCollateralForWriting
InsufficientVaultTokens
ContractExpired
ContractNotYetExpired
InvalidMintAmount
InvalidRebalanceExitTime
InvalidRebalanceEntryTime
InvalidRebalancePrepareTime
InvalidWithdrawalTime
InvalidDepositTime
InvalidSetNextOptionTime
InvalidDepositAmount
InvalidRebalanceSettleTime
InvalidRebalanceSettleState
InvalidRebalanceEnterState
OptionsPositionNotSettled
NonUnderlyingPoolsHaveAssets
VaultAuthorityMustBeVaultMintAuthority
VaultAuthorityMustOwnDepositPool
VaultAuthorityMustOwnPremiumPool
VoltVaulttMustOwnWriterTokenPool
VoltVaultMustOwnOptionPool
DepositPoolDoesNotMatchVoltVault
OptionPoolDoesNotMatchVoltVault
PremiumPoolDoesNotMatchVoltVault
TraidngPoolDoesNotMatchVoltVault
OptionMintDoesNotMatchOptionMarket
NoOrdersInOptionOrderBook
CpiProgramMustBeSomeInPlaceOrder
NewOptionMustNotBeExpired
NewOptionMustHaveExactExpiry
NewOptionHasWrongUnderlyingAsset
NewOptionHasWrongQuoteAsset
NewOptionHasWrongContractSize
NewOptionHasInvalidStrike
RebalanceSettleHasLeftoverWriterTokens
CurrentOptionMustNotBeExpired
CannotReinitializeVolt
OldOptionAndWriterTokenPoolsMustBeEmpty
InvalidOldOptionWriterTokenPools
VaultMintDoesNotMatchUserTokenAccount
DepositPoolMintDoesNotMatchUserTokenAccount
VaultAuthorityDoesNotMatch
DexProgramIdDoesNotMatchAnchor
InertiaProgramIdDoesNotMatch
InvalidAuthorityForPermissionedInstruction
WriterTokenMintDoesNotMatchOptionMarket
OptionMarketMustBeOwnedByProtocol
UnderlyingAssetMintDoesNotMatchVoltVault
QuoteAssetMintDoesNotMatchVoltVault
VaultMintDoesNotMatchVoltVault
OptionMarketDoesNotMatchVoltVault
WriterTokenPoolDoesNotMatchVoltVault
InvalidRebalanceSwapPremiumState
ShouldBeUnreachable
CantHaveMultiplePendingDeposits
InvalidStartRoundState
InvalidSetNextOptionState
InvalidClaimPendingState
InvalidEndRoundState
CantHaveMultiplePendingWithdrawals
InvalidClaimPendingWithdrawalState
InvalidNextOptionMarket
TokenNotRevoked
NonWhitelistedUser
UserIsNotSigner
InvalidWhitelistAuthority
InvalidWhitelistAndOptionMarketCombination
RoundVoltTokensMintDoesNotMatchVoltVault
RoundUnderlyingTokensMintDoesNotMatchVoltVault
UnderlyingAssetPoolDoesNotMatchOptionMarket
NoOppositeOrderOnSerumMarket
BidPriceOnSerumMarketTooLow
OfferPriceOnSerumMarketTooHigh
UnderlyingOpenOrdersDoesNotMatchVoltVault
MustHaveAtLeastOneMarketMakerAccessToken
MiddlewareProgramIdDoesNotMatch
FeeAccountOwnerDoesNotMatch
FeeAccountMintDoesNotMatchDepositPool
VaultCapacityWouldBeExceeded
IndividualDepositCapacityWouldBeExceeded
UnsupportedOptionMarketProgramId
InvalidEndDcaRoundState
RoundHasNotStarted
PermissionedMarketPremiumPoolDoesNotMatchVoltVault
TokenAccountOwnersDoNotMatch
InvalidPermissionedMarketPremiumMint
PremiumPoolAmountMustBeGreaterThanZero
CantCloseNonEmptyTokenAccount
MustFinishEnteringBeforeSettlingPermissionedMarketPremium
PendingWithdrawalInfoNotInitialized
PendingWithdrawalDoesNotExist
CannotCancelPendingWithdrawalFromOldRound
InvalidTakePendingWithdrawalFeesState
PendingDepositInfoNotInitialized
PendingDepositDoesNotExist
CannotCancelPendingDepositFromOldRound
VaultDestinationDoesNotMatchVoltVault
MustTakeWithdrawalFeesBeforeStartingRound
RoundMustBeEnded
MustNotHaveSoldOptionTokens
CantCloseAccountUnlessEmpty
OpenOrderMustBeEmptyToClose
InvalidWhitelistAccountVector
InvalidDaoProgramId
VoltMustBeForDao
InvalidDaoAuthority
DaoAuthorityMustSign
InvalidPendingDepositKey
InvalidAuthorityCheck
InvalidEndEntropyRoundState
InvalidVoltType
CantFindPerpMarketIndex
AccountEquityLessThanZero
QuotePositionChangedTooMuch
MustMoveCloserToTargetCollateralization
CollateralNotWithinLenience
InvalidRebalanceEntropyState
BasePositionMustBeNegative
QuotePositionMustBePositive
TargetCollateralRatioMustBeNegative
NewEquityMustBeHigherThanDepositAmount
InstantTransfersMustBeDisabled
RebalanceMustBeReady
IncorrectHedge
VaultNameMustBeNonZeroLength
VaultDoesNotSupportOverLeveragedStrategies
LenienceMustBeGreaterThanZero
LenienceShouldNotBeGreaterThanLeverage
HedgeLenienceMustBeGreaterThanZero
VaultDoesNotSupportExitEarlyOverLeveragedStrategies
RoundNumberMustNotOverflow
InvalidWhitelistTokenAccountMint
SoloptionsProgramIdDoesNotMatch
WhitelistTokenAccountOwnerIsNotUser
SolTransferAuthorityMustNotBeOwnedByVoltProgram
InsufficientCollateralForDeposit
SolTransferAuthorityMustBeWritableAndSigner
VoltMustBeOfEntropyType
VoltMustBeofShortOptionsType
DepositsAndWithdrawalsAreTurnedOff
UnrecognizedEntropyProgramId
InvalidTakePerformanceFeesState
DiscriminatorDoesNotMatch
RealizedOraclePriceTooFarOffClientProvided
VaultMintSupplyMustBeZeroIfEquityIsZero
InvalidSetupRebalanceEntropyState
Implementations
Trait Implementations
impl Copy for ErrorCode
Auto Trait Implementations
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more