Skip to main content

raydium_cp_swap/
error.rs

1/// Errors that may be returned by the TokenSwap program.
2use anchor_lang::prelude::*;
3
4#[error_code]
5pub enum ErrorCode {
6    #[msg("Not approved")]
7    NotApproved,
8    /// The owner of the input isn't set to the program address generated by the
9    /// program.
10    #[msg("Input account owner is not the program address")]
11    InvalidOwner,
12    /// The input token account is empty.
13    #[msg("Input token account empty")]
14    EmptySupply,
15    /// The input token is invalid for swap.
16    #[msg("InvalidInput")]
17    InvalidInput,
18    /// Address of the provided pool token mint is incorrect
19    #[msg("Address of the provided lp token mint is incorrect")]
20    IncorrectLpMint,
21    /// Exceeds desired slippage limit
22    #[msg("Exceeds desired slippage limit")]
23    ExceededSlippage,
24    /// Given pool token amount results in zero trading tokens
25    #[msg("Given pool token amount results in zero trading tokens")]
26    ZeroTradingTokens,
27    #[msg("Not support token_2022 mint extension")]
28    NotSupportMint,
29    #[msg("invaild vault")]
30    InvalidVault,
31    #[msg("Init lp amount is too less(Because 100 amount lp will be locked)")]
32    InitLpAmountTooLess,
33}