Skip to main content

carbon_pump_fees_decoder/instructions/
mod.rs

1//! This code was AUTOGENERATED using the Codama library.
2use crate::{PumpFeesDecoder, PROGRAM_ID};
3
4#[cfg(feature = "postgres")]
5pub mod postgres;
6
7#[cfg(feature = "graphql")]
8pub mod graphql;
9
10pub mod claim_social_fee_pda;
11pub mod cpi_event;
12pub mod create_fee_sharing_config;
13pub mod create_social_fee_pda;
14pub mod get_fees;
15pub mod initialize_fee_config;
16pub mod initialize_fee_program_global;
17pub mod reset_fee_sharing_config;
18pub mod revoke_fee_sharing_authority;
19pub mod set_authority;
20pub mod set_claim_rate_limit;
21pub mod set_disable_flags;
22pub mod set_social_claim_authority;
23pub mod transfer_fee_sharing_authority;
24pub mod update_admin;
25pub mod update_fee_config;
26pub mod update_fee_shares;
27pub mod upsert_fee_tiers;
28
29pub use self::{
30    claim_social_fee_pda::*, cpi_event::*, create_fee_sharing_config::*, create_social_fee_pda::*,
31    get_fees::*, initialize_fee_config::*, initialize_fee_program_global::*,
32    reset_fee_sharing_config::*, revoke_fee_sharing_authority::*, set_authority::*,
33    set_claim_rate_limit::*, set_disable_flags::*, set_social_claim_authority::*,
34    transfer_fee_sharing_authority::*, update_admin::*, update_fee_config::*, update_fee_shares::*,
35    upsert_fee_tiers::*,
36};
37
38#[derive(Debug, Clone, PartialEq)]
39#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
40#[cfg_attr(feature = "serde", serde(tag = "type", content = "data"))]
41pub enum PumpFeesInstruction {
42    ClaimSocialFeePda {
43        program_id: solana_pubkey::Pubkey,
44        data: ClaimSocialFeePda,
45        accounts: ClaimSocialFeePdaInstructionAccounts,
46    },
47    CreateFeeSharingConfig {
48        program_id: solana_pubkey::Pubkey,
49        data: CreateFeeSharingConfig,
50        accounts: CreateFeeSharingConfigInstructionAccounts,
51    },
52    CreateSocialFeePda {
53        program_id: solana_pubkey::Pubkey,
54        data: CreateSocialFeePda,
55        accounts: CreateSocialFeePdaInstructionAccounts,
56    },
57    GetFees {
58        program_id: solana_pubkey::Pubkey,
59        data: GetFees,
60        accounts: GetFeesInstructionAccounts,
61    },
62    InitializeFeeConfig {
63        program_id: solana_pubkey::Pubkey,
64        data: InitializeFeeConfig,
65        accounts: InitializeFeeConfigInstructionAccounts,
66    },
67    InitializeFeeProgramGlobal {
68        program_id: solana_pubkey::Pubkey,
69        data: InitializeFeeProgramGlobal,
70        accounts: InitializeFeeProgramGlobalInstructionAccounts,
71    },
72    ResetFeeSharingConfig {
73        program_id: solana_pubkey::Pubkey,
74        data: ResetFeeSharingConfig,
75        accounts: ResetFeeSharingConfigInstructionAccounts,
76    },
77    RevokeFeeSharingAuthority {
78        program_id: solana_pubkey::Pubkey,
79        data: RevokeFeeSharingAuthority,
80        accounts: RevokeFeeSharingAuthorityInstructionAccounts,
81    },
82    SetAuthority {
83        program_id: solana_pubkey::Pubkey,
84        data: SetAuthority,
85        accounts: SetAuthorityInstructionAccounts,
86    },
87    SetClaimRateLimit {
88        program_id: solana_pubkey::Pubkey,
89        data: SetClaimRateLimit,
90        accounts: SetClaimRateLimitInstructionAccounts,
91    },
92    SetDisableFlags {
93        program_id: solana_pubkey::Pubkey,
94        data: SetDisableFlags,
95        accounts: SetDisableFlagsInstructionAccounts,
96    },
97    SetSocialClaimAuthority {
98        program_id: solana_pubkey::Pubkey,
99        data: SetSocialClaimAuthority,
100        accounts: SetSocialClaimAuthorityInstructionAccounts,
101    },
102    TransferFeeSharingAuthority {
103        program_id: solana_pubkey::Pubkey,
104        data: TransferFeeSharingAuthority,
105        accounts: TransferFeeSharingAuthorityInstructionAccounts,
106    },
107    UpdateAdmin {
108        program_id: solana_pubkey::Pubkey,
109        data: UpdateAdmin,
110        accounts: UpdateAdminInstructionAccounts,
111    },
112    UpdateFeeConfig {
113        program_id: solana_pubkey::Pubkey,
114        data: UpdateFeeConfig,
115        accounts: UpdateFeeConfigInstructionAccounts,
116    },
117    UpdateFeeShares {
118        program_id: solana_pubkey::Pubkey,
119        data: UpdateFeeShares,
120        accounts: UpdateFeeSharesInstructionAccounts,
121    },
122    UpsertFeeTiers {
123        program_id: solana_pubkey::Pubkey,
124        data: UpsertFeeTiers,
125        accounts: UpsertFeeTiersInstructionAccounts,
126    },
127    CpiEvent {
128        program_id: solana_pubkey::Pubkey,
129        data: CpiEvent,
130        accounts: CpiEventInstructionAccounts,
131    },
132}
133
134impl carbon_core::instruction::InstructionDecoder<'_> for PumpFeesDecoder {
135    type InstructionType = PumpFeesInstruction;
136
137    fn decode_instruction(
138        &self,
139        instruction: &solana_instruction::Instruction,
140    ) -> Option<Self::InstructionType> {
141        if instruction.program_id != PROGRAM_ID {
142            return None;
143        }
144
145        carbon_core::try_decode_instructions!(
146            instruction,
147            PROGRAM_ID,
148            PumpFeesInstruction::ClaimSocialFeePda => ClaimSocialFeePda,
149            PumpFeesInstruction::CreateFeeSharingConfig => CreateFeeSharingConfig,
150            PumpFeesInstruction::CreateSocialFeePda => CreateSocialFeePda,
151            PumpFeesInstruction::GetFees => GetFees,
152            PumpFeesInstruction::InitializeFeeConfig => InitializeFeeConfig,
153            PumpFeesInstruction::InitializeFeeProgramGlobal => InitializeFeeProgramGlobal,
154            PumpFeesInstruction::ResetFeeSharingConfig => ResetFeeSharingConfig,
155            PumpFeesInstruction::RevokeFeeSharingAuthority => RevokeFeeSharingAuthority,
156            PumpFeesInstruction::SetAuthority => SetAuthority,
157            PumpFeesInstruction::SetClaimRateLimit => SetClaimRateLimit,
158            PumpFeesInstruction::SetDisableFlags => SetDisableFlags,
159            PumpFeesInstruction::SetSocialClaimAuthority => SetSocialClaimAuthority,
160            PumpFeesInstruction::TransferFeeSharingAuthority => TransferFeeSharingAuthority,
161            PumpFeesInstruction::UpdateAdmin => UpdateAdmin,
162            PumpFeesInstruction::UpdateFeeConfig => UpdateFeeConfig,
163            PumpFeesInstruction::UpdateFeeShares => UpdateFeeShares,
164            PumpFeesInstruction::UpsertFeeTiers => UpsertFeeTiers,
165            PumpFeesInstruction::CpiEvent => CpiEvent,
166        )
167    }
168}