Skip to main content

yellowstone_vixen_pumpfun_parser/generated_sdk/errors/
pump.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 PumpError {
13    /// 6000 - The given account is not authorized to execute this instruction.
14    #[error("The given account is not authorized to execute this instruction.")]
15    NotAuthorized = 0x1770,
16    /// 6001 - The program is already initialized.
17    #[error("The program is already initialized.")]
18    AlreadyInitialized = 0x1771,
19    /// 6002 - slippage: Too much SOL required to buy the given amount of tokens.
20    #[error("slippage: Too much SOL required to buy the given amount of tokens.")]
21    TooMuchSolRequired = 0x1772,
22    /// 6003 - slippage: Too little SOL received to sell the given amount of tokens.
23    #[error("slippage: Too little SOL received to sell the given amount of tokens.")]
24    TooLittleSolReceived = 0x1773,
25    /// 6004 - The mint does not match the bonding curve.
26    #[error("The mint does not match the bonding curve.")]
27    MintDoesNotMatchBondingCurve = 0x1774,
28    /// 6005 - The bonding curve has completed and liquidity migrated to raydium.
29    #[error("The bonding curve has completed and liquidity migrated to raydium.")]
30    BondingCurveComplete = 0x1775,
31    /// 6006 - The bonding curve has not completed.
32    #[error("The bonding curve has not completed.")]
33    BondingCurveNotComplete = 0x1776,
34    /// 6007 - The program is not initialized.
35    #[error("The program is not initialized.")]
36    NotInitialized = 0x1777,
37    /// 6008 - Withdraw too frequent
38    #[error("Withdraw too frequent")]
39    WithdrawTooFrequent = 0x1778,
40    /// 6009 - new_size should be > current_size
41    #[error("new_size should be > current_size")]
42    NewSizeShouldBeGreaterThanCurrentSize = 0x1779,
43    /// 6010 - Account type not supported
44    #[error("Account type not supported")]
45    AccountTypeNotSupported = 0x177a,
46    /// 6011 - initial_real_token_reserves should be less than token_total_supply
47    #[error("initial_real_token_reserves should be less than token_total_supply")]
48    InitialRealTokenReservesShouldBeLessThanTokenTotalSupply = 0x177b,
49    /// 6012 - initial_virtual_token_reserves should be greater than initial_real_token_reserves
50    #[error("initial_virtual_token_reserves should be greater than initial_real_token_reserves")]
51    InitialVirtualTokenReservesShouldBeGreaterThanInitialRealTokenReserves = 0x177c,
52    /// 6013 - fee_basis_points greater than maximum
53    #[error("fee_basis_points greater than maximum")]
54    FeeBasisPointsGreaterThanMaximum = 0x177d,
55    /// 6014 - Withdraw authority cannot be set to System Program ID
56    #[error("Withdraw authority cannot be set to System Program ID")]
57    AllZerosWithdrawAuthority = 0x177e,
58    /// 6015 - pool_migration_fee should be less than final_real_sol_reserves
59    #[error("pool_migration_fee should be less than final_real_sol_reserves")]
60    PoolMigrationFeeShouldBeLessThanFinalRealSolReserves = 0x177f,
61    /// 6016 - pool_migration_fee should be greater than creator_fee + MAX_MIGRATE_FEES
62    #[error("pool_migration_fee should be greater than creator_fee + MAX_MIGRATE_FEES")]
63    PoolMigrationFeeShouldBeGreaterThanCreatorFeePlusMaxMigrateFees = 0x1780,
64    /// 6017 - Migrate instruction is disabled
65    #[error("Migrate instruction is disabled")]
66    DisabledWithdraw = 0x1781,
67    /// 6018 - Migrate instruction is disabled
68    #[error("Migrate instruction is disabled")]
69    DisabledMigrate = 0x1782,
70    /// 6019 - Invalid creator pubkey
71    #[error("Invalid creator pubkey")]
72    InvalidCreator = 0x1783,
73    /// 6020 - Buy zero amount
74    #[error("Buy zero amount")]
75    BuyZeroAmount = 0x1784,
76    /// 6021 - Not enough tokens to buy
77    #[error("Not enough tokens to buy")]
78    NotEnoughTokensToBuy = 0x1785,
79    /// 6022 - Sell zero amount
80    #[error("Sell zero amount")]
81    SellZeroAmount = 0x1786,
82    /// 6023 - Not enough tokens to sell
83    #[error("Not enough tokens to sell")]
84    NotEnoughTokensToSell = 0x1787,
85    /// 6024 - Overflow
86    #[error("Overflow")]
87    Overflow = 0x1788,
88    /// 6025 - Truncation
89    #[error("Truncation")]
90    Truncation = 0x1789,
91    /// 6026 - Division by zero
92    #[error("Division by zero")]
93    DivisionByZero = 0x178a,
94    /// 6027 - Not enough remaining accounts
95    #[error("Not enough remaining accounts")]
96    NotEnoughRemainingAccounts = 0x178b,
97    /// 6028 - All fee recipients should be non-zero
98    #[error("All fee recipients should be non-zero")]
99    AllFeeRecipientsShouldBeNonZero = 0x178c,
100    /// 6029 - Unsorted or not unique fee recipients
101    #[error("Unsorted or not unique fee recipients")]
102    UnsortedNotUniqueFeeRecipients = 0x178d,
103    /// 6030 - Creator should not be zero
104    #[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}