//! This code was AUTOGENERATED using the Codama library.

#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, borsh::BorshSerialize, borsh::BorshDeserialize, PartialEq)]
pub struct UpdateRewardInfosEventEvent {
    /// Reward info
    pub reward_growth_global_x64: [u128; 3],
}

impl UpdateRewardInfosEventEvent {
    pub fn decode(data: &[u8]) -> Option<Self> {
        if data.len() < 8 {
            return None;
        }
        let discriminator = &data[0..8];
        if discriminator != [109, 127, 186, 78, 114, 65, 37, 236] {
            return None;
        }

        let mut data_slice = data;

        data_slice = &data_slice[8..];

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