mod treasury;
mod user;
pub use treasury::*;
pub use user::*;
use crate::consts::{TREASURY, USER_TICKET};
use num_enum::{IntoPrimitive, TryFromPrimitive};
use steel::*;
#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, IntoPrimitive, TryFromPrimitive)]
pub enum StreakAccount {
Treasury = 1,
User = 2,
}
pub fn treasury_pda() -> (Pubkey, u8) {
Pubkey::find_program_address(&[TREASURY], &crate::ID)
}
pub fn user_pda(user: &Pubkey) -> (Pubkey, u8) {
Pubkey::find_program_address(&[USER_TICKET, user.as_ref()], &crate::ID)
}