Skip to main content

meteora_sol/errors/
lb_clmm.rs

1//! This code was AUTOGENERATED using the codama library.
2//! Please DO NOT EDIT THIS FILE, instead use visitors
3//! to add features, then rerun codama to update it.
4//!
5//! <https://github.com/codama-idl/codama>
6//!
7
8use num_derive::FromPrimitive;
9use thiserror::Error;
10
11#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
12pub enum LbClmmError {
13    /// 6000 - Invalid start bin index
14    #[error("Invalid start bin index")]
15    InvalidStartBinIndex = 0x1770,
16    /// 6001 - Invalid bin id
17    #[error("Invalid bin id")]
18    InvalidBinId = 0x1771,
19    /// 6002 - Invalid input data
20    #[error("Invalid input data")]
21    InvalidInput = 0x1772,
22    /// 6003 - Exceeded amount slippage tolerance
23    #[error("Exceeded amount slippage tolerance")]
24    ExceededAmountSlippageTolerance = 0x1773,
25    /// 6004 - Exceeded bin slippage tolerance
26    #[error("Exceeded bin slippage tolerance")]
27    ExceededBinSlippageTolerance = 0x1774,
28    /// 6005 - Composition factor flawed
29    #[error("Composition factor flawed")]
30    CompositionFactorFlawed = 0x1775,
31    /// 6006 - Non preset bin step
32    #[error("Non preset bin step")]
33    NonPresetBinStep = 0x1776,
34    /// 6007 - Zero liquidity
35    #[error("Zero liquidity")]
36    ZeroLiquidity = 0x1777,
37    /// 6008 - Invalid position
38    #[error("Invalid position")]
39    InvalidPosition = 0x1778,
40    /// 6009 - Bin array not found
41    #[error("Bin array not found")]
42    BinArrayNotFound = 0x1779,
43    /// 6010 - Invalid token mint
44    #[error("Invalid token mint")]
45    InvalidTokenMint = 0x177A,
46    /// 6011 - Invalid account for single deposit
47    #[error("Invalid account for single deposit")]
48    InvalidAccountForSingleDeposit = 0x177B,
49    /// 6012 - Pair insufficient liquidity
50    #[error("Pair insufficient liquidity")]
51    PairInsufficientLiquidity = 0x177C,
52    /// 6013 - Invalid fee owner
53    #[error("Invalid fee owner")]
54    InvalidFeeOwner = 0x177D,
55    /// 6014 - Invalid fee withdraw amount
56    #[error("Invalid fee withdraw amount")]
57    InvalidFeeWithdrawAmount = 0x177E,
58    /// 6015 - Invalid admin
59    #[error("Invalid admin")]
60    InvalidAdmin = 0x177F,
61    /// 6016 - Identical fee owner
62    #[error("Identical fee owner")]
63    IdenticalFeeOwner = 0x1780,
64    /// 6017 - Invalid basis point
65    #[error("Invalid basis point")]
66    InvalidBps = 0x1781,
67    /// 6018 - Math operation overflow
68    #[error("Math operation overflow")]
69    MathOverflow = 0x1782,
70    /// 6019 - Type cast error
71    #[error("Type cast error")]
72    TypeCastFailed = 0x1783,
73    /// 6020 - Invalid reward index
74    #[error("Invalid reward index")]
75    InvalidRewardIndex = 0x1784,
76    /// 6021 - Invalid reward duration
77    #[error("Invalid reward duration")]
78    InvalidRewardDuration = 0x1785,
79    /// 6022 - Reward already initialized
80    #[error("Reward already initialized")]
81    RewardInitialized = 0x1786,
82    /// 6023 - Reward not initialized
83    #[error("Reward not initialized")]
84    RewardUninitialized = 0x1787,
85    /// 6024 - Identical funder
86    #[error("Identical funder")]
87    IdenticalFunder = 0x1788,
88    /// 6025 - Reward campaign in progress
89    #[error("Reward campaign in progress")]
90    RewardCampaignInProgress = 0x1789,
91    /// 6026 - Reward duration is the same
92    #[error("Reward duration is the same")]
93    IdenticalRewardDuration = 0x178A,
94    /// 6027 - Invalid bin array
95    #[error("Invalid bin array")]
96    InvalidBinArray = 0x178B,
97    /// 6028 - Bin arrays must be continuous
98    #[error("Bin arrays must be continuous")]
99    NonContinuousBinArrays = 0x178C,
100    /// 6029 - Invalid reward vault
101    #[error("Invalid reward vault")]
102    InvalidRewardVault = 0x178D,
103    /// 6030 - Position is not empty
104    #[error("Position is not empty")]
105    NonEmptyPosition = 0x178E,
106    /// 6031 - Unauthorized access
107    #[error("Unauthorized access")]
108    UnauthorizedAccess = 0x178F,
109    /// 6032 - Invalid fee parameter
110    #[error("Invalid fee parameter")]
111    InvalidFeeParameter = 0x1790,
112    /// 6033 - Missing oracle account
113    #[error("Missing oracle account")]
114    MissingOracle = 0x1791,
115    /// 6034 - Insufficient observation sample
116    #[error("Insufficient observation sample")]
117    InsufficientSample = 0x1792,
118    /// 6035 - Invalid lookup timestamp
119    #[error("Invalid lookup timestamp")]
120    InvalidLookupTimestamp = 0x1793,
121    /// 6036 - Bitmap extension account is not provided
122    #[error("Bitmap extension account is not provided")]
123    BitmapExtensionAccountIsNotProvided = 0x1794,
124    /// 6037 - Cannot find non-zero liquidity binArrayId
125    #[error("Cannot find non-zero liquidity binArrayId")]
126    CannotFindNonZeroLiquidityBinArrayId = 0x1795,
127    /// 6038 - Bin id out of bound
128    #[error("Bin id out of bound")]
129    BinIdOutOfBound = 0x1796,
130    /// 6039 - Insufficient amount in for minimum out
131    #[error("Insufficient amount in for minimum out")]
132    InsufficientOutAmount = 0x1797,
133    /// 6040 - Invalid position width
134    #[error("Invalid position width")]
135    InvalidPositionWidth = 0x1798,
136    /// 6041 - Excessive fee update
137    #[error("Excessive fee update")]
138    ExcessiveFeeUpdate = 0x1799,
139    /// 6042 - Pool disabled
140    #[error("Pool disabled")]
141    PoolDisabled = 0x179A,
142    /// 6043 - Invalid pool type
143    #[error("Invalid pool type")]
144    InvalidPoolType = 0x179B,
145    /// 6044 - Whitelist for wallet is full
146    #[error("Whitelist for wallet is full")]
147    ExceedMaxWhitelist = 0x179C,
148    /// 6045 - Invalid index
149    #[error("Invalid index")]
150    InvalidIndex = 0x179D,
151    /// 6046 - Reward not ended
152    #[error("Reward not ended")]
153    RewardNotEnded = 0x179E,
154    /// 6047 - Must withdraw ineligible reward
155    #[error("Must withdraw ineligible reward")]
156    MustWithdrawnIneligibleReward = 0x179F,
157    /// 6048 - Unauthorized address
158    #[error("Unauthorized address")]
159    UnauthorizedAddress = 0x17A0,
160    /// 6049 - Cannot update because operators are the same
161    #[error("Cannot update because operators are the same")]
162    OperatorsAreTheSame = 0x17A1,
163    /// 6050 - Withdraw to wrong token account
164    #[error("Withdraw to wrong token account")]
165    WithdrawToWrongTokenAccount = 0x17A2,
166    /// 6051 - Wrong rent receiver
167    #[error("Wrong rent receiver")]
168    WrongRentReceiver = 0x17A3,
169    /// 6052 - Already activated
170    #[error("Already activated")]
171    AlreadyPassActivationPoint = 0x17A4,
172    /// 6053 - Swapped amount is exceeded max swapped amount
173    #[error("Swapped amount is exceeded max swapped amount")]
174    ExceedMaxSwappedAmount = 0x17A5,
175    /// 6054 - Invalid strategy parameters
176    #[error("Invalid strategy parameters")]
177    InvalidStrategyParameters = 0x17A6,
178    /// 6055 - Liquidity locked
179    #[error("Liquidity locked")]
180    LiquidityLocked = 0x17A7,
181    /// 6056 - Bin range is not empty
182    #[error("Bin range is not empty")]
183    BinRangeIsNotEmpty = 0x17A8,
184    /// 6057 - Amount out is not matched with exact amount out
185    #[error("Amount out is not matched with exact amount out")]
186    NotExactAmountOut = 0x17A9,
187    /// 6058 - Invalid activation type
188    #[error("Invalid activation type")]
189    InvalidActivationType = 0x17AA,
190    /// 6059 - Invalid activation duration
191    #[error("Invalid activation duration")]
192    InvalidActivationDuration = 0x17AB,
193    /// 6060 - Missing token amount as token launch owner proof
194    #[error("Missing token amount as token launch owner proof")]
195    MissingTokenAmountAsTokenLaunchProof = 0x17AC,
196    /// 6061 - Quote token must be SOL or USDC
197    #[error("Quote token must be SOL or USDC")]
198    InvalidQuoteToken = 0x17AD,
199    /// 6062 - Invalid bin step
200    #[error("Invalid bin step")]
201    InvalidBinStep = 0x17AE,
202    /// 6063 - Invalid base fee
203    #[error("Invalid base fee")]
204    InvalidBaseFee = 0x17AF,
205    /// 6064 - Invalid pre-activation duration
206    #[error("Invalid pre-activation duration")]
207    InvalidPreActivationDuration = 0x17B0,
208    /// 6065 - Already pass pre-activation swap point
209    #[error("Already pass pre-activation swap point")]
210    AlreadyPassPreActivationSwapPoint = 0x17B1,
211    /// 6066 - Invalid status
212    #[error("Invalid status")]
213    InvalidStatus = 0x17B2,
214    /// 6067 - Exceed max oracle length
215    #[error("Exceed max oracle length")]
216    ExceededMaxOracleLength = 0x17B3,
217    /// 6068 - Invalid minimum liquidity
218    #[error("Invalid minimum liquidity")]
219    InvalidMinimumLiquidity = 0x17B4,
220    /// 6069 - Not support token_2022 mint extension
221    #[error("Not support token_2022 mint extension")]
222    NotSupportMint = 0x17B5,
223    /// 6070 - Unsupported mint extension
224    #[error("Unsupported mint extension")]
225    UnsupportedMintExtension = 0x17B6,
226    /// 6071 - Unsupported native mint token2022
227    #[error("Unsupported native mint token2022")]
228    UnsupportNativeMintToken2022 = 0x17B7,
229    /// 6072 - Unmatch token mint
230    #[error("Unmatch token mint")]
231    UnmatchTokenMint = 0x17B8,
232    /// 6073 - Unsupported token mint
233    #[error("Unsupported token mint")]
234    UnsupportedTokenMint = 0x17B9,
235    /// 6074 - Insufficient remaining accounts
236    #[error("Insufficient remaining accounts")]
237    InsufficientRemainingAccounts = 0x17BA,
238    /// 6075 - Invalid remaining account slice
239    #[error("Invalid remaining account slice")]
240    InvalidRemainingAccountSlice = 0x17BB,
241    /// 6076 - Duplicated remaining account types
242    #[error("Duplicated remaining account types")]
243    DuplicatedRemainingAccountTypes = 0x17BC,
244    /// 6077 - Missing remaining account for transfer hook
245    #[error("Missing remaining account for transfer hook")]
246    MissingRemainingAccountForTransferHook = 0x17BD,
247    /// 6078 - Remaining account was passed for transfer hook but there's no hook program
248    #[error("Remaining account was passed for transfer hook but there's no hook program")]
249    NoTransferHookProgram = 0x17BE,
250    /// 6079 - Zero funded amount
251    #[error("Zero funded amount")]
252    ZeroFundedAmount = 0x17BF,
253    /// 6080 - Invalid side
254    #[error("Invalid side")]
255    InvalidSide = 0x17C0,
256    /// 6081 - Invalid resize length
257    #[error("Invalid resize length")]
258    InvalidResizeLength = 0x17C1,
259    /// 6082 - Not support at the moment
260    #[error("Not support at the moment")]
261    NotSupportAtTheMoment = 0x17C2,
262}
263
264#[allow(deprecated)]
265impl solana_program_error::PrintProgramError for LbClmmError {
266    fn print<E>(&self) {
267        solana_msg::msg!(&self.to_string());
268    }
269}
270
271#[allow(deprecated)]
272impl<T> solana_decode_error::DecodeError<T> for LbClmmError {
273    fn type_of() -> &'static str {
274        "LbClmmError"
275    }
276}