Skip to main content

carbon_wavebreak_decoder/types/
event.rs

1//! This code was AUTOGENERATED using the Codama library.
2use {
3    crate::types::{BondingCurveCreationType, GraduationMethodData},
4    solana_pubkey::Pubkey,
5};
6#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
7#[derive(Debug, Clone, borsh::BorshSerialize, borsh::BorshDeserialize, PartialEq)]
8pub enum Event {
9    BondingCurveCreated {
10        creation_type: BondingCurveCreationType,
11        base_mint: Pubkey,
12        quote_mint: Pubkey,
13        creator: Pubkey,
14        start_price: u128,
15        end_price: u128,
16        control_points: [u16; 4],
17        swap_fee_bps: u16,
18        quote_fee_bps: u16,
19        base_fee_bps: u16,
20        base_allocation_bps: u16,
21        launch_time: i64,
22        creator_reward: u64,
23        graduation_methods: [GraduationMethodData; 8],
24        graduation_target: u64,
25        graduation_time: i64,
26        graduation_reward: u64,
27        retain_mint_authority: bool,
28        min_reserve_bps: u16,
29        buy_requires_permission: bool,
30        buy_permission_bitmap: [u8; 32],
31        max_buy_amount: u64,
32        sell_requires_permission: bool,
33        sell_permission_bitmap: [u8; 32],
34        max_sell_amount: u64,
35        quote_token_program: Pubkey,
36        base_token_program: Pubkey,
37        quote_token_decimals: u8,
38        base_token_decimals: u8,
39    },
40    TokenBought {
41        buyer: Pubkey,
42        base_mint: Pubkey,
43        quote_mint: Pubkey,
44        amount_in: u64,
45        amount_out: u64,
46        price_before: u128,
47        price_after: u128,
48        quote_amount_before: u64,
49        quote_amount_after: u64,
50        base_amount_before: u64,
51        base_amount_after: u64,
52        protocol_fee: u64,
53    },
54    TokenSold {
55        seller: Pubkey,
56        base_mint: Pubkey,
57        quote_mint: Pubkey,
58        amount_in: u64,
59        amount_out: u64,
60        price_before: u128,
61        price_after: u128,
62        quote_amount_before: u64,
63        quote_amount_after: u64,
64        base_amount_before: u64,
65        base_amount_after: u64,
66        protocol_fee: u64,
67    },
68    TokenRefunded {
69        signer: Pubkey,
70        base_mint: Pubkey,
71        quote_mint: Pubkey,
72        price: u128,
73        quote_amount: u64,
74        base_amount: u64,
75    },
76    BondingCurveGraduated {
77        graduator: Pubkey,
78        base_mint: Pubkey,
79        quote_mint: Pubkey,
80        final_price: u128,
81        graduation_methods: [GraduationMethodData; 8],
82    },
83    BondingCurveClosed {
84        bonding_curve: Pubkey,
85    },
86}