yellowstone_vixen_pumpfun_parser/generated_sdk/errors/
pump.rs1use num_derive::FromPrimitive;
9use thiserror::Error;
10
11#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
12pub enum PumpError {
13 #[error("The given account is not authorized to execute this instruction.")]
15 NotAuthorized = 0x1770,
16 #[error("The program is already initialized.")]
18 AlreadyInitialized = 0x1771,
19 #[error("slippage: Too much SOL required to buy the given amount of tokens.")]
21 TooMuchSolRequired = 0x1772,
22 #[error("slippage: Too little SOL received to sell the given amount of tokens.")]
24 TooLittleSolReceived = 0x1773,
25 #[error("The mint does not match the bonding curve.")]
27 MintDoesNotMatchBondingCurve = 0x1774,
28 #[error("The bonding curve has completed and liquidity migrated to raydium.")]
30 BondingCurveComplete = 0x1775,
31 #[error("The bonding curve has not completed.")]
33 BondingCurveNotComplete = 0x1776,
34 #[error("The program is not initialized.")]
36 NotInitialized = 0x1777,
37 #[error("Withdraw too frequent")]
39 WithdrawTooFrequent = 0x1778,
40 #[error("new_size should be > current_size")]
42 NewSizeShouldBeGreaterThanCurrentSize = 0x1779,
43 #[error("Account type not supported")]
45 AccountTypeNotSupported = 0x177a,
46 #[error("initial_real_token_reserves should be less than token_total_supply")]
48 InitialRealTokenReservesShouldBeLessThanTokenTotalSupply = 0x177b,
49 #[error("initial_virtual_token_reserves should be greater than initial_real_token_reserves")]
51 InitialVirtualTokenReservesShouldBeGreaterThanInitialRealTokenReserves = 0x177c,
52 #[error("fee_basis_points greater than maximum")]
54 FeeBasisPointsGreaterThanMaximum = 0x177d,
55 #[error("Withdraw authority cannot be set to System Program ID")]
57 AllZerosWithdrawAuthority = 0x177e,
58 #[error("pool_migration_fee should be less than final_real_sol_reserves")]
60 PoolMigrationFeeShouldBeLessThanFinalRealSolReserves = 0x177f,
61 #[error("pool_migration_fee should be greater than creator_fee + MAX_MIGRATE_FEES")]
63 PoolMigrationFeeShouldBeGreaterThanCreatorFeePlusMaxMigrateFees = 0x1780,
64 #[error("Migrate instruction is disabled")]
66 DisabledWithdraw = 0x1781,
67 #[error("Migrate instruction is disabled")]
69 DisabledMigrate = 0x1782,
70 #[error("Invalid creator pubkey")]
72 InvalidCreator = 0x1783,
73 #[error("Buy zero amount")]
75 BuyZeroAmount = 0x1784,
76 #[error("Not enough tokens to buy")]
78 NotEnoughTokensToBuy = 0x1785,
79 #[error("Sell zero amount")]
81 SellZeroAmount = 0x1786,
82 #[error("Not enough tokens to sell")]
84 NotEnoughTokensToSell = 0x1787,
85 #[error("Overflow")]
87 Overflow = 0x1788,
88 #[error("Truncation")]
90 Truncation = 0x1789,
91 #[error("Division by zero")]
93 DivisionByZero = 0x178a,
94 #[error("Not enough remaining accounts")]
96 NotEnoughRemainingAccounts = 0x178b,
97 #[error("All fee recipients should be non-zero")]
99 AllFeeRecipientsShouldBeNonZero = 0x178c,
100 #[error("Unsorted or not unique fee recipients")]
102 UnsortedNotUniqueFeeRecipients = 0x178d,
103 #[error("Creator should not be zero")]
105 CreatorShouldNotBeZero = 0x178e,
106}
107
108#[allow(deprecated)]
109impl solana_program_error::PrintProgramError for PumpError {
110 fn print<E>(&self) {
111 solana_msg::msg!(&self.to_string());
112 }
113}
114
115#[allow(deprecated)]
116impl<T> solana_decode_error::DecodeError<T> for PumpError {
117 fn type_of() -> &'static str { "PumpError" }
118}