meteora_dbc_client/generated/errors/
dynamic_bonding_curve.rs1use num_derive::FromPrimitive;
9use thiserror::Error;
10
11#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
12pub enum DynamicBondingCurveError {
13 #[error("Math operation overflow")]
15 MathOverflow = 0x1770,
16 #[error("Invalid fee setup")]
18 InvalidFee = 0x1771,
19 #[error("Exceeded slippage tolerance")]
21 ExceededSlippage = 0x1772,
22 #[error("Exceeded max fee bps")]
24 ExceedMaxFeeBps = 0x1773,
25 #[error("Invalid admin")]
27 InvalidAdmin = 0x1774,
28 #[error("Amount is zero")]
30 AmountIsZero = 0x1775,
31 #[error("Type cast error")]
33 TypeCastFailed = 0x1776,
34 #[error("Invalid activation type")]
36 InvalidActivationType = 0x1777,
37 #[error("Invalid quote mint")]
39 InvalidQuoteMint = 0x1778,
40 #[error("Invalid collect fee mode")]
42 InvalidCollectFeeMode = 0x1779,
43 #[error("Invalid migration fee option")]
45 InvalidMigrationFeeOption = 0x177A,
46 #[error("Invalid input")]
48 InvalidInput = 0x177B,
49 #[error("Not enough liquidity")]
51 NotEnoughLiquidity = 0x177C,
52 #[error("Pool is completed")]
54 PoolIsCompleted = 0x177D,
55 #[error("Pool is incompleted")]
57 PoolIsIncompleted = 0x177E,
58 #[error("Invalid migration option")]
60 InvalidMigrationOption = 0x177F,
61 #[error("Invalid activation type")]
63 InvalidTokenDecimals = 0x1780,
64 #[error("Invalid token type")]
66 InvalidTokenType = 0x1781,
67 #[error("Invalid fee percentage")]
69 InvalidFeePercentage = 0x1782,
70 #[error("Invalid quote threshold")]
72 InvalidQuoteThreshold = 0x1783,
73 #[error("Invalid token supply")]
75 InvalidTokenSupply = 0x1784,
76 #[error("Invalid curve")]
78 InvalidCurve = 0x1785,
79 #[error("Not permit to do this action")]
81 NotPermitToDoThisAction = 0x1786,
82 #[error("Invalid owner account")]
84 InvalidOwnerAccount = 0x1787,
85 #[error("Invalid config account")]
87 InvalidConfigAccount = 0x1788,
88 #[error("Surplus has been withdraw")]
90 SurplusHasBeenWithdraw = 0x1789,
91 #[error("Leftover has been withdraw")]
93 LeftoverHasBeenWithdraw = 0x178A,
94 #[error("Total base token is exceeded max supply")]
96 TotalBaseTokenExceedMaxSupply = 0x178B,
97 #[error("Unsupport native mint token 2022")]
99 UnsupportNativeMintToken2022 = 0x178C,
100 #[error("Insufficient liquidity for migration")]
102 InsufficientLiquidityForMigration = 0x178D,
103 #[error("Missing pool config in remaining account")]
105 MissingPoolConfigInRemainingAccount = 0x178E,
106 #[error("Invalid vesting parameters")]
108 InvalidVestingParameters = 0x178F,
109 #[error("Invalid leftover address")]
111 InvalidLeftoverAddress = 0x1790,
112 #[error("Swap amount is over a threshold")]
114 SwapAmountIsOverAThreshold = 0x1791,
115 #[error("Invalid fee scheduler")]
117 InvalidFeeScheduler = 0x1792,
118 #[error("Invalid creator trading fee percentage")]
120 InvalidCreatorTradingFeePercentage = 0x1793,
121 #[error("Invalid new creator")]
123 InvalidNewCreator = 0x1794,
124 #[error("Invalid token authority option")]
126 InvalidTokenAuthorityOption = 0x1795,
127 #[error("Invalid account for the instruction")]
129 InvalidAccount = 0x1796,
130 #[error("Invalid migrator fee percentage")]
132 InvalidMigratorFeePercentage = 0x1797,
133 #[error("Migration fee has been withdraw")]
135 MigrationFeeHasBeenWithdraw = 0x1798,
136 #[error("Invalid base fee mode")]
138 InvalidBaseFeeMode = 0x1799,
139 #[error("Invalid fee rate limiter")]
141 InvalidFeeRateLimiter = 0x179A,
142 #[error("Fail to validate single swap instruction in rate limiter")]
144 FailToValidateSingleSwapInstruction = 0x179B,
145 #[error("Invalid migrated pool fee params")]
147 InvalidMigratedPoolFee = 0x179C,
148 #[error("Undertermined error")]
150 UndeterminedError = 0x179D,
151 #[error("Rate limiter not supported")]
153 RateLimiterNotSupported = 0x179E,
154 #[error("Amount left is not zero")]
156 AmountLeftIsNotZero = 0x179F,
157 #[error("Next sqrt price is smaller than start sqrt price")]
159 NextSqrtPriceIsSmallerThanStartSqrtPrice = 0x17A0,
160 #[error("Invalid min base fee")]
162 InvalidMinBaseFee = 0x17A1,
163 #[error("Account invariant violation")]
165 AccountInvariantViolation = 0x17A2,
166}
167
168impl From<DynamicBondingCurveError> for solana_program_error::ProgramError {
169 fn from(e: DynamicBondingCurveError) -> Self {
170 solana_program_error::ProgramError::Custom(e as u32)
171 }
172}
173