pub enum ReflectMainError {
Show 98 variants
MissingRecipient = 6_000,
NoRecipients = 6_001,
TooManyRecipients = 6_002,
IncorrectRecipient = 6_003,
ComponentNotFound = 6_004,
InvalidComponentType = 6_005,
ComponentRegistryFull = 6_006,
ComponentTooLarge = 6_007,
ComponentDataExhausted = 6_008,
ComponentAlreadyExists = 6_009,
TooLowCap = 6_010,
CapExceeded = 6_011,
OutOfBounds = 6_012,
BadLen = 6_013,
StrategyAlreadySupportsSpl = 6_014,
ProtocolAlreadySupportsSpl = 6_015,
NotEnoughSplInput = 6_016,
SplNotFound = 6_017,
StrategyDoesNotSupportSpl = 6_018,
IncorrectMint = 6_019,
IncorrectNumberOfAccounts = 6_020,
IncorrectReflectStrategyMint = 6_021,
IncorrectReflectTokenAccount = 6_022,
OutputAmountTooLow = 6_023,
SplMintFrozen = 6_024,
IncorrectWithdrawMint = 6_025,
InvalidTokenAccount = 6_026,
IncorrectAdminAccount = 6_027,
MissingAdminPrivallages = 6_028,
LastAdmin = 6_029,
SupremoOnly = 6_030,
SameAdmin = 6_031,
UserLacksRole = 6_032,
UserAlreadyHasRole = 6_033,
RoleNotUnderAction = 6_034,
ActionNotFound = 6_035,
ActionHasAssignedRole = 6_036,
SupremoOnlyAction = 6_037,
CannotAssignSupremo = 6_038,
AlreadyThere = 6_039,
AlreadyFrozen = 6_040,
AlreadyUnfrozen = 6_041,
ProgramAlreadyExists = 6_042,
InvalidProgram = 6_043,
InvalidProgramAccount = 6_044,
MissingAccount = 6_045,
MathError = 6_046,
ConversionFailed = 6_047,
MathOverflow = 6_048,
DivisionByZero = 6_049,
InvalidData = 6_050,
InvalidState = 6_051,
InvalidInput = 6_052,
PythError = 6_053,
FailedUnwrap = 6_054,
SpreadTooSmall = 6_055,
SerialisationFailed = 6_056,
DeserialisationFailed = 6_057,
NoEntriesLeft = 6_058,
InvalidController = 6_059,
ActionFrozen = 6_060,
AttenuationExceedsMaximum = 6_061,
InvalidAttenuationParameters = 6_062,
CaptureProblem = 6_063,
InvalidRatios = 6_064,
PerpMarketNotFound = 6_065,
UnableToLoadPerpMarketAccount = 6_066,
InvalidMarketAccount = 6_067,
CouldNotLoadMarketData = 6_068,
MarketWrongMutability = 6_069,
SpotMarketWrongMutability = 6_070,
UnableToLoadSpotMarketAccount = 6_071,
InvalidSpotMarketAccount = 6_072,
CouldNotLoadSpotMarketData = 6_073,
UnsettledPnl = 6_074,
UnableToLoadOracle = 6_075,
OracleNotFound = 6_076,
InvalidOracle = 6_077,
SpotMarketNotFound = 6_078,
InvalidOracleSource = 6_079,
MissingPositon = 6_080,
BelowMinPositionChange = 6_081,
BelowMinPosition = 6_082,
DriftMaxSpots = 6_083,
DriftWithdrawlFee = 6_084,
SplNotSupported = 6_085,
IncorrectSpot = 6_086,
DriftMarketIndexNotSupported = 6_087,
IncorrectReflectState = 6_088,
IncorrectReduction = 6_089,
IncorrectIncrease = 6_090,
SubAccountNotFull = 6_091,
UsdcSplTooLow = 6_092,
PerpPositionNotFound = 6_093,
InvalidJlpOracle = 6_094,
CustodyNotHedged = 6_095,
IncorrectJlpAccount = 6_096,
ToDo = 6_097,
}Variants§
MissingRecipient = 6_000
6000 - Number of recipients wrong
NoRecipients = 6_001
6001 - Number of recipients can’t be zero
TooManyRecipients = 6_002
6002 - Recipients can’t exceed limit
IncorrectRecipient = 6_003
6003 - Provided wrong recipient or in incorrect order
ComponentNotFound = 6_004
6004 - Component does not exist in this account
InvalidComponentType = 6_005
6005 - Invalid component type
ComponentRegistryFull = 6_006
6006 - Component registry is full
ComponentTooLarge = 6_007
6007 - Component size exceeds maximum allowed
ComponentDataExhausted = 6_008
6008 - No more space for component data
ComponentAlreadyExists = 6_009
6009 - Component exists already
TooLowCap = 6_010
6010 - Cap can’t be lower than what has been minted
CapExceeded = 6_011
6011 - No more stable can be minted under this cap settings
OutOfBounds = 6_012
6012 - Out of bounds access
BadLen = 6_013
6013 - Invalid data length
StrategyAlreadySupportsSpl = 6_014
6014 - This strategy already supports this SPL
ProtocolAlreadySupportsSpl = 6_015
6015 - Protocol already supports this SPL
NotEnoughSplInput = 6_016
6016 - Not enough funds for this transaction
SplNotFound = 6_017
6017 - SPL not found
StrategyDoesNotSupportSpl = 6_018
6018 - Provided SPL mint is not supported at the strategy
IncorrectMint = 6_019
6019 - Provided wrong mint account
IncorrectNumberOfAccounts = 6_020
6020 - Need the correct number of the accounts in the remaining
IncorrectReflectStrategyMint = 6_021
6021 - Incorrect mint address for this strategy
IncorrectReflectTokenAccount = 6_022
6022 - Incorrect token address for reflect token account
OutputAmountTooLow = 6_023
6023 - Slippage protection triggered for SPL redeem
SplMintFrozen = 6_024
6024 - Cannot mint stable using this SPL at this strategy
IncorrectWithdrawMint = 6_025
6025 - Token account of a different accoutn is needed for withdraw
InvalidTokenAccount = 6_026
6026 - Provided wrong token account
IncorrectAdminAccount = 6_027
6027 - Provided permissions account does not match the caller
MissingAdminPrivallages = 6_028
6028 - Caller does not have the privilege for this action
LastAdmin = 6_029
6029 - Can’t remove the last admin
SupremoOnly = 6_030
6030 - Special call for supremo removal
SameAdmin = 6_031
6031 - You’ve provided same admin account
UserLacksRole = 6_032
6032 - User does not have such role
UserAlreadyHasRole = 6_033
6033 - User already has requested role
RoleNotUnderAction = 6_034
6034 - This action lacks specified role
ActionNotFound = 6_035
6035 - Action not found
ActionHasAssignedRole = 6_036
6036 - This action can already be performed by this role
SupremoOnlyAction = 6_037
6037 - This action can only be performed by a supreme authority
CannotAssignSupremo = 6_038
6038 - Only supreme authorities can assign supreme authority roles
AlreadyThere = 6_039
6039 - Desired state is already on
AlreadyFrozen = 6_040
6040 - Action already frozen
AlreadyUnfrozen = 6_041
6041 - Action already unfrozen
ProgramAlreadyExists = 6_042
6042 - Program already registered
InvalidProgram = 6_043
6043 - Supplied program can not be used
InvalidProgramAccount = 6_044
6044 - Supplied program account can not be used
MissingAccount = 6_045
6045 - Neceessary account not provided
MathError = 6_046
6046 - Math error
ConversionFailed = 6_047
6047 - Can’t transmute
MathOverflow = 6_048
6048 - Mathematical operation overflow
DivisionByZero = 6_049
6049 - Can’t divide by zero
InvalidData = 6_050
6050 - Invalid data provided
InvalidState = 6_051
6051 - Invalid state
InvalidInput = 6_052
6052 - Invalid input
PythError = 6_053
6053 - Could not load the price account
FailedUnwrap = 6_054
6054 - Failed unwrap
SpreadTooSmall = 6_055
6055 - Difference is too small to capture
SerialisationFailed = 6_056
6056 - Serialisation failed
DeserialisationFailed = 6_057
6057 - Deserialisation failed
NoEntriesLeft = 6_058
6058 - Item could not be added
InvalidController = 6_059
6059 - Provided wrong controller
ActionFrozen = 6_060
6060 - This action is suspended
AttenuationExceedsMaximum = 6_061
6061 - This configuration leads to an impossibility
InvalidAttenuationParameters = 6_062
6062 - At least one parameter must be provided
CaptureProblem = 6_063
6063 - Capture failed
InvalidRatios = 6_064
6064 - All payout parties must add up to 100.0%
PerpMarketNotFound = 6_065
6065 - PerpMarketNotFound
UnableToLoadPerpMarketAccount = 6_066
6066 - UnableToLoadMarketAccount
InvalidMarketAccount = 6_067
6067 - InvalidMarketAccount
CouldNotLoadMarketData = 6_068
6068 - CouldNotLoadMarketData
MarketWrongMutability = 6_069
6069 - MarketWrongMutability
SpotMarketWrongMutability = 6_070
6070 - SpotMarketWrongMutability
UnableToLoadSpotMarketAccount = 6_071
6071 - UnableToLoadSpotMarketAccount
InvalidSpotMarketAccount = 6_072
6072 - InvalidSpotMarketAccount
CouldNotLoadSpotMarketData = 6_073
6073 - CouldNotLoadSpotMarketData
UnsettledPnl = 6_074
6074 - Position has unsettled PnL and must be settled first
UnableToLoadOracle = 6_075
6075 - Unable To Load Oracles
OracleNotFound = 6_076
6076 - OracleNotFound
InvalidOracle = 6_077
6077 - InvalidOracle
SpotMarketNotFound = 6_078
6078 - SpotMarketNotFound
InvalidOracleSource = 6_079
6079 - InvalidOracle
MissingPositon = 6_080
6080 - Position does not exist.
BelowMinPositionChange = 6_081
6081 - SPL input is less than the minimum position change.
BelowMinPosition = 6_082
6082 - SPL input is less than the minimum position.
DriftMaxSpots = 6_083
6083 - Drift only supports 8 spot accounts
DriftWithdrawlFee = 6_084
6084 - My main man is to suffer no sneaky haircuts
SplNotSupported = 6_085
6085 - SPL not supported
IncorrectSpot = 6_086
6086 - Provided spot account does not match the expected spot account
DriftMarketIndexNotSupported = 6_087
6087 - Market index not supported
IncorrectReflectState = 6_088
6088 - Provided drift state account is incorrect
IncorrectReduction = 6_089
6089 - Drift post CPI state of orders and/or base asset amount didn’t show decrease
IncorrectIncrease = 6_090
6090 - Drift post CPI state of orders and/or base asset amount didn’t show increase
SubAccountNotFull = 6_091
6091 - Can’t create a new subaccount
UsdcSplTooLow = 6_092
6092 - Not enough USDC for this deposit
PerpPositionNotFound = 6_093
6093 - Specified perp position not found
InvalidJlpOracle = 6_094
6094 - InvalidJlpOracle
CustodyNotHedged = 6_095
6095 - Mint of this custody is not hedged
IncorrectJlpAccount = 6_096
6096 - Incorrect JLP account supplied
ToDo = 6_097
6097 - TODO
Trait Implementations§
Source§impl Clone for ReflectMainError
impl Clone for ReflectMainError
Source§fn clone(&self) -> ReflectMainError
fn clone(&self) -> ReflectMainError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReflectMainError
impl Debug for ReflectMainError
Source§impl Display for ReflectMainError
impl Display for ReflectMainError
impl Eq for ReflectMainError
Source§impl Error for ReflectMainError
impl Error for ReflectMainError
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 From<ReflectMainError> for ProgramError
impl From<ReflectMainError> for ProgramError
Source§fn from(e: ReflectMainError) -> Self
fn from(e: ReflectMainError) -> Self
Source§impl FromPrimitive for ReflectMainError
impl FromPrimitive for ReflectMainError
Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
i64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
u64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
isize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
i8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
i16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
i32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
i128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
usize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
u8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
u16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
u32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
u128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§impl PartialEq for ReflectMainError
impl PartialEq for ReflectMainError
Source§fn eq(&self, other: &ReflectMainError) -> bool
fn eq(&self, other: &ReflectMainError) -> bool
self and other values to be equal, and is used by ==.