Skip to main content

carbon_wavebreak_decoder/instructions/
reserved_create_a.rs

1//! This code was AUTOGENERATED using the Codama library.
2use carbon_core::deserialize::ArrangeAccounts;
3#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4#[derive(Debug, Clone, borsh::BorshSerialize, borsh::BorshDeserialize, PartialEq)]
5pub struct ReservedCreateA {}
6
7#[derive(Debug, Clone, PartialEq)]
8#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
9pub struct ReservedCreateAInstructionAccounts {}
10
11impl ReservedCreateA {
12    pub fn decode(data: &[u8]) -> Option<Self> {
13        if data.is_empty() {
14            return None;
15        }
16        let discriminator = &data[0..1];
17        if discriminator != [45] {
18            return None;
19        }
20
21        let mut data_slice = data;
22
23        data_slice = &data_slice[1..];
24
25        borsh::BorshDeserialize::deserialize(&mut data_slice).ok()
26    }
27}
28
29impl ArrangeAccounts for ReservedCreateA {
30    type ArrangedAccounts = ReservedCreateAInstructionAccounts;
31
32    fn arrange_accounts(
33        _accounts: &[solana_instruction::AccountMeta],
34    ) -> Option<Self::ArrangedAccounts> {
35        Some(ReservedCreateAInstructionAccounts {})
36    }
37}