//! This code was AUTOGENERATED using the codama library.
//! Please DO NOT EDIT THIS FILE, instead use visitors
//! to add features, then rerun codama to update it.
//!
//! <https://github.com/codama-idl/codama>
//!

use solana_pubkey::Pubkey;
use borsh::BorshSerialize;
use borsh::BorshDeserialize;

/// Stores the state relevant for tracking liquidity mining rewards at the `Whirlpool` level.
/// These values are used in conjunction with `PositionRewardInfo`, `Tick.reward_growths_outside`,
/// and `Whirlpool.reward_last_updated_timestamp` to determine how many rewards are earned by open
/// positions.
#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct WhirlpoolRewardInfo {
/// Reward token mint.
#[cfg_attr(feature = "serde", serde(with = "serde_with::As::<serde_with::DisplayFromStr>"))]
pub mint: Pubkey,
/// Reward vault token account.
#[cfg_attr(feature = "serde", serde(with = "serde_with::As::<serde_with::DisplayFromStr>"))]
pub vault: Pubkey,
/// reward_infos[0]: Authority account that has permission to initialize the reward and set emissions.
/// reward_infos[1]: used for a struct that contains fields for extending the functionality of Whirlpool.
/// reward_infos[2]: reserved for future use.
/// 
/// Historical notes:
/// Originally, this was a field named "authority", but it was found that there was no opportunity
/// to set different authorities for the three rewards. Therefore, the use of this field was changed for Whirlpool's future extensibility.
pub extension: [u8; 32],
/// Q64.64 number that indicates how many tokens per second are earned per unit of liquidity.
pub emissions_per_second_x64: u128,
/// Q64.64 number that tracks the total tokens earned per unit of liquidity since the reward
/// emissions were turned on.
pub growth_global_x64: u128,
}


