use num_derive::FromPrimitive;
use thiserror::Error;
#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
pub enum LbClmmError {
#[error("Invalid start bin index")]
InvalidStartBinIndex = 0x1770,
#[error("Invalid bin id")]
InvalidBinId = 0x1771,
#[error("Invalid input data")]
InvalidInput = 0x1772,
#[error("Exceeded amount slippage tolerance")]
ExceededAmountSlippageTolerance = 0x1773,
#[error("Exceeded bin slippage tolerance")]
ExceededBinSlippageTolerance = 0x1774,
#[error("Composition factor flawed")]
CompositionFactorFlawed = 0x1775,
#[error("Non preset bin step")]
NonPresetBinStep = 0x1776,
#[error("Zero liquidity")]
ZeroLiquidity = 0x1777,
#[error("Invalid position")]
InvalidPosition = 0x1778,
#[error("Bin array not found")]
BinArrayNotFound = 0x1779,
#[error("Invalid token mint")]
InvalidTokenMint = 0x177A,
#[error("Invalid account for single deposit")]
InvalidAccountForSingleDeposit = 0x177B,
#[error("Pair insufficient liquidity")]
PairInsufficientLiquidity = 0x177C,
#[error("Invalid fee owner")]
InvalidFeeOwner = 0x177D,
#[error("Invalid fee withdraw amount")]
InvalidFeeWithdrawAmount = 0x177E,
#[error("Invalid admin")]
InvalidAdmin = 0x177F,
#[error("Identical fee owner")]
IdenticalFeeOwner = 0x1780,
#[error("Invalid basis point")]
InvalidBps = 0x1781,
#[error("Math operation overflow")]
MathOverflow = 0x1782,
#[error("Type cast error")]
TypeCastFailed = 0x1783,
#[error("Invalid reward index")]
InvalidRewardIndex = 0x1784,
#[error("Invalid reward duration")]
InvalidRewardDuration = 0x1785,
#[error("Reward already initialized")]
RewardInitialized = 0x1786,
#[error("Reward not initialized")]
RewardUninitialized = 0x1787,
#[error("Identical funder")]
IdenticalFunder = 0x1788,
#[error("Reward campaign in progress")]
RewardCampaignInProgress = 0x1789,
#[error("Reward duration is the same")]
IdenticalRewardDuration = 0x178A,
#[error("Invalid bin array")]
InvalidBinArray = 0x178B,
#[error("Bin arrays must be continuous")]
NonContinuousBinArrays = 0x178C,
#[error("Invalid reward vault")]
InvalidRewardVault = 0x178D,
#[error("Position is not empty")]
NonEmptyPosition = 0x178E,
#[error("Unauthorized access")]
UnauthorizedAccess = 0x178F,
#[error("Invalid fee parameter")]
InvalidFeeParameter = 0x1790,
#[error("Missing oracle account")]
MissingOracle = 0x1791,
#[error("Insufficient observation sample")]
InsufficientSample = 0x1792,
#[error("Invalid lookup timestamp")]
InvalidLookupTimestamp = 0x1793,
#[error("Bitmap extension account is not provided")]
BitmapExtensionAccountIsNotProvided = 0x1794,
#[error("Cannot find non-zero liquidity binArrayId")]
CannotFindNonZeroLiquidityBinArrayId = 0x1795,
#[error("Bin id out of bound")]
BinIdOutOfBound = 0x1796,
#[error("Insufficient amount in for minimum out")]
InsufficientOutAmount = 0x1797,
#[error("Invalid position width")]
InvalidPositionWidth = 0x1798,
#[error("Excessive fee update")]
ExcessiveFeeUpdate = 0x1799,
#[error("Pool disabled")]
PoolDisabled = 0x179A,
#[error("Invalid pool type")]
InvalidPoolType = 0x179B,
#[error("Whitelist for wallet is full")]
ExceedMaxWhitelist = 0x179C,
#[error("Invalid index")]
InvalidIndex = 0x179D,
#[error("Reward not ended")]
RewardNotEnded = 0x179E,
#[error("Must withdraw ineligible reward")]
MustWithdrawnIneligibleReward = 0x179F,
#[error("Unauthorized address")]
UnauthorizedAddress = 0x17A0,
#[error("Cannot update because operators are the same")]
OperatorsAreTheSame = 0x17A1,
#[error("Withdraw to wrong token account")]
WithdrawToWrongTokenAccount = 0x17A2,
#[error("Wrong rent receiver")]
WrongRentReceiver = 0x17A3,
#[error("Already activated")]
AlreadyPassActivationPoint = 0x17A4,
#[error("Swapped amount is exceeded max swapped amount")]
ExceedMaxSwappedAmount = 0x17A5,
#[error("Invalid strategy parameters")]
InvalidStrategyParameters = 0x17A6,
#[error("Liquidity locked")]
LiquidityLocked = 0x17A7,
#[error("Bin range is not empty")]
BinRangeIsNotEmpty = 0x17A8,
#[error("Amount out is not matched with exact amount out")]
NotExactAmountOut = 0x17A9,
#[error("Invalid activation type")]
InvalidActivationType = 0x17AA,
#[error("Invalid activation duration")]
InvalidActivationDuration = 0x17AB,
#[error("Missing token amount as token launch owner proof")]
MissingTokenAmountAsTokenLaunchProof = 0x17AC,
#[error("Quote token must be SOL or USDC")]
InvalidQuoteToken = 0x17AD,
#[error("Invalid bin step")]
InvalidBinStep = 0x17AE,
#[error("Invalid base fee")]
InvalidBaseFee = 0x17AF,
#[error("Invalid pre-activation duration")]
InvalidPreActivationDuration = 0x17B0,
#[error("Already pass pre-activation swap point")]
AlreadyPassPreActivationSwapPoint = 0x17B1,
#[error("Invalid status")]
InvalidStatus = 0x17B2,
#[error("Exceed max oracle length")]
ExceededMaxOracleLength = 0x17B3,
#[error("Invalid minimum liquidity")]
InvalidMinimumLiquidity = 0x17B4,
#[error("Not support token_2022 mint extension")]
NotSupportMint = 0x17B5,
#[error("Unsupported mint extension")]
UnsupportedMintExtension = 0x17B6,
#[error("Unsupported native mint token2022")]
UnsupportNativeMintToken2022 = 0x17B7,
#[error("Unmatch token mint")]
UnmatchTokenMint = 0x17B8,
#[error("Unsupported token mint")]
UnsupportedTokenMint = 0x17B9,
#[error("Insufficient remaining accounts")]
InsufficientRemainingAccounts = 0x17BA,
#[error("Invalid remaining account slice")]
InvalidRemainingAccountSlice = 0x17BB,
#[error("Duplicated remaining account types")]
DuplicatedRemainingAccountTypes = 0x17BC,
#[error("Missing remaining account for transfer hook")]
MissingRemainingAccountForTransferHook = 0x17BD,
#[error("Remaining account was passed for transfer hook but there's no hook program")]
NoTransferHookProgram = 0x17BE,
#[error("Zero funded amount")]
ZeroFundedAmount = 0x17BF,
#[error("Invalid side")]
InvalidSide = 0x17C0,
#[error("Invalid resize length")]
InvalidResizeLength = 0x17C1,
#[error("Not support at the moment")]
NotSupportAtTheMoment = 0x17C2,
}
#[allow(deprecated)]
impl solana_program_error::PrintProgramError for LbClmmError {
fn print<E>(&self) {
solana_msg::msg!(&self.to_string());
}
}
#[allow(deprecated)]
impl<T> solana_decode_error::DecodeError<T> for LbClmmError {
fn type_of() -> &'static str {
"LbClmmError"
}
}