Enum CoreError

Source
#[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§

Source§

impl CoreError

Source

pub fn name(&self) -> String

Gets the name of this [#enum_name].

Trait Implementations§

Source§

impl Clone for CoreError

Source§

fn clone(&self) -> CoreError

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoreError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for CoreError

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<ActionError> for CoreError

Source§

fn from(err: ActionError) -> CoreError

Converts to this type from the input type.
Source§

impl From<ConfigError> for CoreError

Source§

fn from(err: ConfigError) -> CoreError

Converts to this type from the input type.
Source§

impl From<FixedStrError> for CoreError

Source§

fn from(err: FixedStrError) -> CoreError

Converts to this type from the input type.
Source§

impl From<MarketError> for CoreError

Source§

fn from(err: MarketError) -> CoreError

Converts to this type from the input type.
Source§

impl From<OracleError> for CoreError

Source§

fn from(err: OracleError) -> CoreError

Converts to this type from the input type.
Source§

impl From<SwapActionParamsError> for CoreError

Source§

fn from(err: SwapActionParamsError) -> CoreError

Converts to this type from the input type.
Source§

impl From<TokenConfigError> for CoreError

Source§

fn from(err: TokenConfigError) -> CoreError

Converts to this type from the input type.
Source§

impl Copy for CoreError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T