Skip to main content

sendfun_sdk/launchpad/generated/errors/
send_launchpad.rs

1#![allow(
2	clippy::all,
3	clippy::pedantic,
4	clippy::nursery,
5	clippy::expect_used,
6	clippy::unwrap_used,
7	clippy::indexing_slicing,
8	clippy::allow_attributes,
9	clippy::allow_attributes_without_reason,
10	clippy::mem_forget,
11	unfulfilled_lint_expectations,
12	unexpected_cfgs,
13	unused_imports
14)]
15
16//! This code was AUTOGENERATED using the codama library.
17//! Please DO NOT EDIT THIS FILE, instead use visitors
18//! to add features, then rerun codama to update it.
19//!
20//! <https://github.com/codama-idl/codama>
21//!
22
23use num_derive::FromPrimitive;
24use thiserror::Error;
25
26#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
27pub enum SendLaunchpadError {
28	/// 6000 - Token creation is disabled
29	#[error("Token creation is disabled")]
30	TokenCreationDisabled = 0x1770,
31	/// 6001 - Slippage tolerance exceeded
32	#[error("Slippage tolerance exceeded")]
33	SlippageExceeded = 0x1771,
34	/// 6002 - Already migrated
35	#[error("Already migrated")]
36	AlreadyMigrated = 0x1772,
37	/// 6003 - Migration threshold not reached
38	#[error("Migration threshold not reached")]
39	ThresholdNotReached = 0x1773,
40	/// 6004 - Migration threshold reached - trading disabled until migration completes
41	#[error(
42		"Migration threshold reached - trading disabled until migration completes"
43	)]
44	ThresholdReached = 0x1774,
45	/// 6005 - Invalid base mint
46	#[error("Invalid base mint")]
47	InvalidBaseMint = 0x1775,
48	/// 6006 - Invalid quote mint
49	#[error("Invalid quote mint")]
50	InvalidQuoteMint = 0x1776,
51	/// 6007 - Bonding curve is not tradeable
52	#[error("Bonding curve is not tradeable")]
53	NotTradeable = 0x1777,
54	/// 6008 - Invalid status transition
55	#[error("Invalid status transition")]
56	InvalidStatusTransition = 0x1778,
57	/// 6009 - Curve is live
58	#[error("Curve is live")]
59	CurveIsLive = 0x1779,
60	/// 6010 - Base mint not found
61	#[error("Base mint not found")]
62	BaseMintNotFound = 0x177A,
63	/// 6011 - Blocked by held supply
64	#[error("Blocked by held supply")]
65	BlockedByHeldSupply = 0x177B,
66	/// 6012 - Invalid coin creator
67	#[error("Invalid coin creator")]
68	InvalidCoinCreator = 0x177C,
69	/// 6013 - Invalid authority
70	#[error("Invalid authority")]
71	InvalidAuthority = 0x177D,
72	/// 6014 - Insufficient balance in source account
73	#[error("Insufficient balance in source account")]
74	InsufficientBalance = 0x177E,
75	/// 6015 - Pool has unclaimed protocol or creator fees
76	#[error("Pool has unclaimed protocol or creator fees")]
77	PoolFeesOutstanding = 0x177F,
78	/// 7000 - Program is paused
79	#[error("Program is paused")]
80	ProgramPaused = 0x1B58,
81	/// 7001 - Unauthorized
82	#[error("Unauthorized")]
83	Unauthorized = 0x1B59,
84	/// 7002 - Arithmetic overflow
85	#[error("Arithmetic overflow")]
86	ArithmeticOverflow = 0x1B5A,
87	/// 7003 - Invalid Pyth price account
88	#[error("Invalid Pyth price account")]
89	InvalidPythAccount = 0x1B5B,
90	/// 7004 - Invalid Pyth feed ID
91	#[error("Invalid Pyth feed ID")]
92	InvalidPythFeed = 0x1B5C,
93	/// 7005 - Invalid slug: must be non-empty, <= max_len bytes, lowercase alphanumeric or underscore
94	#[error(
95		"Invalid slug: must be non-empty, <= max_len bytes, lowercase alphanumeric or underscore"
96	)]
97	InvalidSlug = 0x1B5D,
98	/// 7006 - Text too long
99	#[error("Text too long")]
100	TextTooLong = 0x1B5E,
101	/// 7007 - User token account owned by the wrong token program
102	#[error("User token account owned by the wrong token program")]
103	UserTokenAccountWrongProgram = 0x1B5F,
104	/// 7008 - User token account is not an initialized token account
105	#[error("User token account is not an initialized token account")]
106	UserTokenAccountInvalid = 0x1B60,
107	/// 7009 - User token account mint does not match the trade
108	#[error("User token account mint does not match the trade")]
109	UserTokenAccountWrongMint = 0x1B61,
110	/// 7010 - User token account is not owned by the trading user
111	#[error("User token account is not owned by the trading user")]
112	UserTokenAccountWrongAuthority = 0x1B62,
113	/// 7011 - Nothing to claim
114	#[error("Nothing to claim")]
115	NothingToClaim = 0x1B63,
116	/// 7012 - Unused
117	#[error("Unused")]
118	Unused7012 = 0x1B64,
119	/// 7013 - Quote mint has no USDC price on its nexus reward state
120	#[error("Quote mint has no USDC price on its nexus reward state")]
121	QuoteMintPriceUnset = 0x1B65,
122	/// 7014 - Token-2022 transfer fee schedule cannot settle the exact amount
123	#[error("Token-2022 transfer fee schedule cannot settle the exact amount")]
124	TransferFeeNotSettleable = 0x1B66,
125	/// 7015 - Creator fee exceeds the partner's maximum
126	#[error("Creator fee exceeds the partner's maximum")]
127	CreatorFeeTooHigh = 0x1B67,
128	/// 7016 - Creator fee mode is not allowed by the partner config
129	#[error("Creator fee mode is not allowed by the partner config")]
130	CreatorFeeModeNotAllowed = 0x1B68,
131	/// 7100 - Insufficient liquidity
132	#[error("Insufficient liquidity")]
133	InsufficientLiquidity = 0x1BBC,
134	/// 7101 - Invalid amount
135	#[error("Invalid amount")]
136	InvalidAmount = 0x1BBD,
137}
138
139impl From<SendLaunchpadError> for solana_program::program_error::ProgramError {
140	fn from(e: SendLaunchpadError) -> Self {
141		solana_program::program_error::ProgramError::Custom(e as u32)
142	}
143}