ore_api/state/board.rs
1use serde::{Deserialize, Serialize};
2use steel::*;
3
4use crate::state::board_pda;
5
6use super::OreAccount;
7
8#[repr(C)]
9#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable, Serialize, Deserialize)]
10pub struct Board {
11 /// The current round number.
12 pub round_id: u64,
13
14 /// The slot at which the current round starts mining.
15 pub start_slot: u64,
16
17 /// The slot at which the current round ends mining.
18 pub end_slot: u64,
19}
20
21impl Board {
22 pub fn pda(&self) -> (Pubkey, u8) {
23 board_pda()
24 }
25}
26
27account!(OreAccount, Board);