entropy_api/state/
mod.rs

1mod var;
2
3pub use var::*;
4
5use steel::*;
6
7use crate::consts::*;
8
9#[repr(u8)]
10#[derive(Clone, Copy, Debug, Eq, PartialEq, IntoPrimitive, TryFromPrimitive)]
11pub enum EntropyAccount {
12    Var = 0,
13}
14
15/// Fetch PDA of the var account.
16pub fn var_pda(authority: Pubkey) -> (Pubkey, u8) {
17    Pubkey::find_program_address(&[VAR, &authority.to_bytes()], &crate::id())
18}