forge_api/state/
enhancer.rs

1use bytemuck::{Pod, Zeroable};
2use solana_program::pubkey::Pubkey;
3
4use crate::utils::{impl_account_from_bytes, impl_to_bytes, Discriminator};
5
6use super::AccountDiscriminator;
7
8/// Proof accounts track a miner's current hash, claimable rewards, and lifetime stats.
9/// Every miner is allowed one proof account which is required by the program to mine or claim rewards.
10#[repr(C)]
11#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
12pub struct Enhancer {
13    /// The reprocess authority.
14    pub authority: Pubkey,
15    /// The asset being enhanced.
16    pub asset: Pubkey,
17    /// The slot the reprocessor was created at.
18    pub slot: u64,
19    /// Sysvar hashes
20    pub hash: [u8; 32],
21}
22
23impl Discriminator for Enhancer {
24    fn discriminator() -> u8 {
25        AccountDiscriminator::Enhancer.into()
26    }
27}
28
29impl_to_bytes!(Enhancer);
30impl_account_from_bytes!(Enhancer);