raydium_launchlab/generated/
types.rs1#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
9#[repr(u8)]
10pub enum PoolStatus {
11 #[default]
13 Fund = 0,
14 Migrate = 1,
16 Trade = 2,
18}
19
20impl PoolStatus {
21 pub fn from_u8(value: u8) -> Self {
22 match value {
23 0 => PoolStatus::Fund,
24 1 => PoolStatus::Migrate,
25 2 => PoolStatus::Trade,
26 _ => PoolStatus::Fund,
27 }
28 }
29}
30
31#[derive(Clone, Copy, Debug, PartialEq, Eq)]
33#[repr(u8)]
34pub enum TradeDirection {
35 Buy = 0,
36 Sell = 1,
37}
38
39impl TradeDirection {
40 pub fn from_u8(value: u8) -> Self {
41 match value {
42 0 => TradeDirection::Buy,
43 _ => TradeDirection::Sell,
44 }
45 }
46}
47
48#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
50#[repr(u8)]
51pub enum AmmCreatorFeeOn {
52 #[default]
54 Off = 0,
55 Quote = 1,
57 Both = 2,
59}
60
61impl AmmCreatorFeeOn {
62 pub fn from_u8(value: u8) -> Self {
63 match value {
64 0 => AmmCreatorFeeOn::Off,
65 1 => AmmCreatorFeeOn::Quote,
66 2 => AmmCreatorFeeOn::Both,
67 _ => AmmCreatorFeeOn::Off,
68 }
69 }
70}
71
72#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
74#[repr(u8)]
75pub enum CurveType {
76 #[default]
77 ConstantProduct = 0,
78 FixedPrice = 1,
79 LinearPrice = 2,
80}
81
82#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
84#[repr(u8)]
85pub enum MigrateType {
86 #[default]
87 Amm = 0,
88 CpSwap = 1,
89}
90
91#[derive(Clone, Debug, Default)]
97pub struct VestingSchedule {
98 pub total_locked_amount: u64,
99 pub cliff_period: u64,
100 pub unlock_period: u64,
101 pub start_time: u64,
102 pub allocated_share_amount: u64,
103}
104
105pub mod discriminators {
110 pub const BUY_EXACT_IN: [u8; 8] = [250, 234, 13, 123, 213, 156, 19, 236];
111 pub const BUY_EXACT_OUT: [u8; 8] = [24, 211, 116, 40, 105, 3, 153, 56];
112 pub const SELL_EXACT_IN: [u8; 8] = [149, 39, 222, 155, 211, 124, 152, 26];
113 pub const SELL_EXACT_OUT: [u8; 8] = [95, 200, 71, 34, 8, 9, 11, 166];
114 pub const INITIALIZE: [u8; 8] = [175, 175, 109, 31, 13, 152, 155, 237];
115}
116
117pub mod account_discriminators {
118 pub const GLOBAL_CONFIG: [u8; 8] = [149, 8, 156, 202, 160, 252, 176, 217];
119 pub const PLATFORM_CONFIG: [u8; 8] = [160, 78, 128, 0, 248, 83, 230, 160];
120 pub const POOL_STATE: [u8; 8] = [247, 237, 227, 245, 215, 195, 222, 70];
121 pub const VESTING_RECORD: [u8; 8] = [106, 243, 221, 205, 230, 126, 85, 83];
122}