#[repr(u32)]pub enum CoreError {
Show 125 variants
NonDefaultStore = 0,
Internal = 1,
Unimplemented = 2,
NotAnAdmin = 3,
PermissionDenied = 4,
FeatureDisabled = 5,
Model = 6,
InvalidArgument = 7,
PreconditionsAreNotMet = 8,
NotFound = 9,
ExceedMaxLengthLimit = 10,
NotEnoughSpace = 11,
TokenAmountOverflow = 12,
ValueOverflow = 13,
UnknownActionState = 14,
LoadAccountError = 15,
TokenAccountNotProvided = 16,
TokenMintNotProvided = 17,
TokenDecimalsMismatched = 18,
MarketAccountIsNotProvided = 19,
StoreMismatched = 20,
OwnerMismatched = 21,
ReceiverMismatched = 22,
RentReceiverMismatched = 23,
MarketMismatched = 24,
MarketTokenMintMismatched = 25,
MintAccountNotProvided = 26,
MarketTokenAccountMismatched = 27,
TokenMintMismatched = 28,
TokenAccountMismatched = 29,
NotAnATA = 30,
NotEnoughTokenAmount = 31,
TokenAmountExceedsLimit = 32,
UnknownToken = 33,
NotEnoughExecutionFee = 34,
InvalidSwapPathLength = 35,
NotEnoughSwapMarkets = 36,
InvalidSwapPath = 37,
InsufficientOutputAmount = 38,
StoreOutdated = 39,
InvalidStoreConfigKey = 40,
InvalidProviderKindIndex = 41,
ChainlinkProgramIsRequired = 42,
NotSupportedCustomPriceProvider = 43,
NotEnoughTokenFeeds = 44,
OracleTimestampsAreLargerThanRequired = 45,
OracleTimestampsAreSmallerThanRequired = 46,
InvalidOracleTimestampsRange = 47,
MaxOracleTimestampsRangeExceeded = 48,
OracleNotUpdated = 49,
MaxPriceAgeExceeded = 50,
MaxPriceTimestampExceeded = 51,
NegativePriceIsNotSupported = 52,
InvalidOracleSlot = 53,
MissingOraclePrice = 54,
InvalidPriceFeedPrice = 55,
PriceOverflow = 56,
InvalidPriceFeedAccount = 57,
PriceFeedNotUpdated = 58,
PricesAreAlreadySet = 59,
PriceIsAlreadySet = 60,
TokenConfigDisabled = 61,
SyntheticTokenPriceIsNotAllowed = 62,
InvalidPriceReport = 63,
MarketNotOpen = 64,
EmptyDeposit = 65,
InvalidReceiverForFirstDeposit = 66,
NotEnoughMarketTokenAmountForFirstDeposit = 67,
NotEnoughGlvTokenAmountForFirstDeposit = 68,
EmptyWithdrawal = 69,
EmptyOrder = 70,
InvalidMinOutputAmount = 71,
InvalidTriggerPrice = 72,
InvalidPosition = 73,
InvalidPositionKind = 74,
PositionMismatched = 75,
PositionItNotRequired = 76,
PositionIsRequired = 77,
OrderKindNotAllowed = 78,
UnknownOrderKind = 79,
UnknownOrderSide = 80,
UnknownDecreasePositionSwapType = 81,
MissingInitialCollateralToken = 82,
MissingFinalOutputToken = 83,
MissingPoolTokens = 84,
InvalidTradeID = 85,
InvalidTradeDeltaSize = 86,
InvalidTradeDeltaTokens = 87,
InvalidBorrowingFactor = 88,
InvalidFundingFactors = 89,
NoDelegatedAuthorityIsSet = 90,
ClaimableCollateralForHoldingCannotBeInOutputTokens = 91,
AdlNotEnabled = 92,
AdlNotRequired = 93,
InvalidAdl = 94,
SameOutputTokensNotMerged = 95,
EventBufferNotProvided = 96,
EmptyShift = 97,
InvalidShiftMarkets = 98,
GTStateHasBeenInitialized = 99,
InvalidGTConfig = 100,
InvalidGTDiscount = 101,
UserAccountHasBeenInitialized = 102,
ReferralCodeHasBeenSet = 103,
ReferrerHasBeenSet = 104,
InvalidUserAccount = 105,
ReferralCodeMismatched = 106,
SelfReferral = 107,
MutualReferral = 108,
InvalidMarketConfigKey = 109,
InvalidCollateralToken = 110,
DisabledMarket = 111,
FailedToCalculateGlvValueForMarket = 112,
FailedToCalculateGlvAmountToMint = 113,
FailedTOCalculateMarketTokenAmountToBurn = 114,
ExceedMaxGlvMarketTokenBalanceAmount = 115,
ExceedMaxGlvMarketTokenBalanceValue = 116,
EmptyGlvWithdrawal = 117,
GlvNegativeMarketPoolValue = 118,
GlvDepositIsNotAllowed = 119,
GlvShiftIntervalNotYetPassed = 120,
GlvShiftMaxPriceImpactExceeded = 121,
GlvShiftValueNotLargeEnough = 122,
TokenDecimalsChanged = 123,
PriceIsStale = 124,
}
Variants§
NonDefaultStore = 0
Non-defualt store is not allowed.
Internal = 1
Internal error.
Unimplemented = 2
Unimplemented.
NotAnAdmin = 3
Not an Admin.
PermissionDenied = 4
Permission denied.
FeatureDisabled = 5
Feature disabled.
Model = 6
Model Error.
InvalidArgument = 7
Invalid Argument.
PreconditionsAreNotMet = 8
Preconditions are not met.
NotFound = 9
Not found.
ExceedMaxLengthLimit = 10
Exceed max length limit.
NotEnoughSpace = 11
Not enough space.
TokenAmountOverflow = 12
Token amount overflow.
ValueOverflow = 13
Value overflow.
UnknownActionState = 14
Unknown Action State.
LoadAccountError = 15
Load account error.
TokenAccountNotProvided = 16
Token account is not provided.
TokenMintNotProvided = 17
Token mint is not provided.
TokenDecimalsMismatched = 18
Token decimals mismatched.
MarketAccountIsNotProvided = 19
Market account is not provided.
StoreMismatched = 20
Store Mismatched.
OwnerMismatched = 21
Owner mismatched.
ReceiverMismatched = 22
Receiver mismatched.
RentReceiverMismatched = 23
Rent Receiver mismatched.
MarketMismatched = 24
Market mismatched.
MarketTokenMintMismatched = 25
Market token mint mismatched.
MintAccountNotProvided = 26
Mint account not provided.
MarketTokenAccountMismatched = 27
Market token account mismatched.
TokenMintMismatched = 28
Token mint mismatched.
TokenAccountMismatched = 29
Token account mismatched.
NotAnATA = 30
Not an ATA for the given token.
NotEnoughTokenAmount = 31
Not enough token amounts.
TokenAmountExceedsLimit = 32
Token amount exceeds limit.
UnknownToken = 33
Unknown token.
NotEnoughExecutionFee = 34
Not enough execution fee.
InvalidSwapPathLength = 35
Invalid Swap Path length.
NotEnoughSwapMarkets = 36
Not enough swap markets in the path.
InvalidSwapPath = 37
Invalid Swap Path.
InsufficientOutputAmount = 38
Insufficient output amounts.
StoreOutdated = 39
Store Outdated.
InvalidStoreConfigKey = 40
Invalid Store Config Key.
InvalidProviderKindIndex = 41
Invalid Provider Kind Index.
ChainlinkProgramIsRequired = 42
Chainlink Program is required.
NotSupportedCustomPriceProvider = 43
Not supported price provider for custom price feed.
NotEnoughTokenFeeds = 44
Not enough token feeds.
OracleTimestampsAreLargerThanRequired = 45
Oracle timestamps are larger than required.
OracleTimestampsAreSmallerThanRequired = 46
Oracle timestamps are smaller than required.
InvalidOracleTimestampsRange = 47
Invalid Oracle timestamps range.
MaxOracleTimestampsRangeExceeded = 48
Max oracle timestamps range exceeded.
OracleNotUpdated = 49
Oracle not updated.
MaxPriceAgeExceeded = 50
Max price age exceeded.
MaxPriceTimestampExceeded = 51
Max prcie’s timestamp exceeded.
NegativePriceIsNotSupported = 52
Negative price.
InvalidOracleSlot = 53
Invalid Oracle slot.
MissingOraclePrice = 54
Missing oracle price.
InvalidPriceFeedPrice = 55
Invalid Price feed price.
PriceOverflow = 56
Price Overflow.
InvalidPriceFeedAccount = 57
Invalid price feed account.
PriceFeedNotUpdated = 58
Price feed is not updated.
PricesAreAlreadySet = 59
Prices are already set.
PriceIsAlreadySet = 60
Price is already set.
TokenConfigDisabled = 61
Token config is diabled.
SyntheticTokenPriceIsNotAllowed = 62
Synthetic token price is not allowed.
InvalidPriceReport = 63
Invalid Price Report.
MarketNotOpen = 64
Market not opened.
EmptyDeposit = 65
Empty Deposit.
InvalidReceiverForFirstDeposit = 66
Invalid owner for the first deposit.
NotEnoughMarketTokenAmountForFirstDeposit = 67
Not enough market token amount for the first deposit.
NotEnoughGlvTokenAmountForFirstDeposit = 68
Not enough GLV token amount for the first deposit.
EmptyWithdrawal = 69
Empty Withdrawal.
EmptyOrder = 70
Empty Order.
InvalidMinOutputAmount = 71
Invalid min output amount for limit swap.
InvalidTriggerPrice = 72
Invalid trigger price.
InvalidPosition = 73
Invalid position.
InvalidPositionKind = 74
Invalid position kind.
PositionMismatched = 75
Position mismatched.
PositionItNotRequired = 76
Position is not required.
PositionIsRequired = 77
Position is required.
OrderKindNotAllowed = 78
Order kind is not allowed.
UnknownOrderKind = 79
Unknown Order Kind.
UnknownOrderSide = 80
Unknown Order Side.
UnknownDecreasePositionSwapType = 81
Unknown Decrease Position Swap Type.
MissingInitialCollateralToken = 82
Missing initial collateral token.
MissingFinalOutputToken = 83
Missing final output token.
MissingPoolTokens = 84
Missing pool tokens.
InvalidTradeID = 85
Invalid Trade ID.
InvalidTradeDeltaSize = 86
Invalid Trade delta size.
InvalidTradeDeltaTokens = 87
Invalid Trade delta tokens.
InvalidBorrowingFactor = 88
Invalid Borrowing Factor.
InvalidFundingFactors = 89
Invalid funding factors.
NoDelegatedAuthorityIsSet = 90
No delegated authority is set.
ClaimableCollateralForHoldingCannotBeInOutputTokens = 91
Claimable collateral for holding cannot be in output tokens.
AdlNotEnabled = 92
ADL is not enabled.
AdlNotRequired = 93
ADL is not required.
InvalidAdl = 94
Invalid ADL.
SameOutputTokensNotMerged = 95
The output token and the secondary output token are the same, but the token amounts are not merged togather.
EventBufferNotProvided = 96
Event buffer is not provided.
EmptyShift = 97
Empty Shift.
InvalidShiftMarkets = 98
Invalid Shift Markets
GTStateHasBeenInitialized = 99
GT State has been initialized.
InvalidGTConfig = 100
Invalid GT config.
InvalidGTDiscount = 101
Invalid GT discount.
UserAccountHasBeenInitialized = 102
User account has been initialized.
ReferralCodeHasBeenSet = 103
Referral Code has been set.
ReferrerHasBeenSet = 104
Referrer has been set.
InvalidUserAccount = 105
Invalid User Account.
ReferralCodeMismatched = 106
Referral Code Mismatched.
SelfReferral = 107
Self-referral is not allowed.
MutualReferral = 108
Mutual-referral is not allowed.
InvalidMarketConfigKey = 109
Invalid market config key.
InvalidCollateralToken = 110
Invalid collateral token.
DisabledMarket = 111
Disabled market.
FailedToCalculateGlvValueForMarket = 112
Failed to calculate GLV value for market.
FailedToCalculateGlvAmountToMint = 113
Failed to calculate GLV amount to mint.
FailedTOCalculateMarketTokenAmountToBurn = 114
Failed to calculate market token amount to burn.
ExceedMaxGlvMarketTokenBalanceAmount = 115
Exceed max market token balance amount of GLV.
ExceedMaxGlvMarketTokenBalanceValue = 116
Exceed max market token balance value of GLV.
EmptyGlvWithdrawal = 117
Empty GLV withdrawal.
GlvNegativeMarketPoolValue = 118
Negative Market Pool Value.
GlvDepositIsNotAllowed = 119
Deposit is not allowed with the given market.
GlvShiftIntervalNotYetPassed = 120
Shift interval not yet passed.
GlvShiftMaxPriceImpactExceeded = 121
Shift max price impact exceeded.
GlvShiftValueNotLargeEnough = 122
Shift value too small.
TokenDecimalsChanged = 123
The decimals of token is immutable.
PriceIsStale = 124
Price is stale.
Implementations§
Trait Implementations§
Source§impl From<ActionError> for CoreError
impl From<ActionError> for CoreError
Source§fn from(err: ActionError) -> CoreError
fn from(err: ActionError) -> CoreError
Source§impl From<ConfigError> for CoreError
impl From<ConfigError> for CoreError
Source§fn from(err: ConfigError) -> CoreError
fn from(err: ConfigError) -> CoreError
Source§impl From<FixedStrError> for CoreError
impl From<FixedStrError> for CoreError
Source§fn from(err: FixedStrError) -> CoreError
fn from(err: FixedStrError) -> CoreError
Source§impl From<MarketError> for CoreError
impl From<MarketError> for CoreError
Source§fn from(err: MarketError) -> CoreError
fn from(err: MarketError) -> CoreError
Source§impl From<OracleError> for CoreError
impl From<OracleError> for CoreError
Source§fn from(err: OracleError) -> CoreError
fn from(err: OracleError) -> CoreError
Source§impl From<SwapActionParamsError> for CoreError
impl From<SwapActionParamsError> for CoreError
Source§fn from(err: SwapActionParamsError) -> CoreError
fn from(err: SwapActionParamsError) -> CoreError
Source§impl From<TokenConfigError> for CoreError
impl From<TokenConfigError> for CoreError
Source§fn from(err: TokenConfigError) -> CoreError
fn from(err: TokenConfigError) -> CoreError
impl Copy for CoreError
Auto Trait Implementations§
impl Freeze for CoreError
impl RefUnwindSafe for CoreError
impl Send for CoreError
impl Sync for CoreError
impl Unpin for CoreError
impl UnwindSafe for CoreError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more