carbon-pump-fees-decoder 2.0.0

PumpFees Decoder
Documentation
//! This code was AUTOGENERATED using the Codama library.
use carbon_core::deserialize::ArrangeAccounts;
/// Transfer Fee Sharing Authority
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, borsh::BorshSerialize, borsh::BorshDeserialize, PartialEq)]
pub struct TransferFeeSharingAuthority {}

#[derive(Debug, Clone, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct TransferFeeSharingAuthorityInstructionAccounts {}

impl TransferFeeSharingAuthority {
    pub fn decode(data: &[u8]) -> Option<Self> {
        if data.len() < 8 {
            return None;
        }
        let discriminator = &data[0..8];
        if discriminator != [202, 10, 75, 200, 164, 34, 210, 96] {
            return None;
        }

        let mut data_slice = data;

        data_slice = &data_slice[8..];

        borsh::BorshDeserialize::deserialize(&mut data_slice).ok()
    }
}

impl ArrangeAccounts for TransferFeeSharingAuthority {
    type ArrangedAccounts = TransferFeeSharingAuthorityInstructionAccounts;

    fn arrange_accounts(
        _accounts: &[solana_instruction::AccountMeta],
    ) -> Option<Self::ArrangedAccounts> {
        Some(TransferFeeSharingAuthorityInstructionAccounts {})
    }
}