mod boost;
mod config;
mod stake;
pub use boost::*;
pub use config::*;
pub use stake::*;
use steel::*;
use crate::consts::{BOOST, CONFIG, STAKE};
#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, IntoPrimitive, TryFromPrimitive)]
pub enum BoostAccount {
Boost = 100,
Config = 101,
Stake = 102,
}
pub fn boost_pda(mint: Pubkey) -> (Pubkey, u8) {
Pubkey::find_program_address(&[BOOST, mint.as_ref()], &crate::id())
}
pub fn config_pda() -> (Pubkey, u8) {
Pubkey::find_program_address(&[CONFIG], &crate::id())
}
pub fn stake_pda(authority: Pubkey, boost: Pubkey) -> (Pubkey, u8) {
Pubkey::find_program_address(&[STAKE, authority.as_ref(), boost.as_ref()], &crate::id())
}