ore_boost_api/state/
config.rs

1use steel::*;
2
3use super::{BoostAccount, OldBoostAccount};
4
5/// Config holds onto global program variables.
6#[repr(C)]
7#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
8pub struct Config {
9    /// The admin with authority to create and update boost incentives.
10    pub admin: Pubkey,
11
12    /// The list of all boosts available for activation.
13    pub boosts: [Pubkey; 256],
14
15    /// The number of boosts available in the directory.
16    pub len: u64,
17
18    /// The cumulative rewards collected by all boosts, divided by the total weight at the time of collection.
19    pub rewards_factor: Numeric,
20
21    /// The portion of hash rewards boost stakers should receive (in basis points).
22    pub take_rate: u64,
23
24    /// The total weight of all boosts.
25    pub total_weight: u64,
26}
27
28account!(BoostAccount, Config);
29
30/// Config holds onto global program variables.
31#[repr(C)]
32#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
33pub struct OldConfig {
34    /// The admin with authority to create and update boost incentives.
35    pub admin: Pubkey,
36
37    /// The list of all boosts available for activation.
38    pub boosts: [Pubkey; 256],
39
40    /// The address of the currently active boost.
41    pub current: Pubkey,
42
43    /// The number of boosts available in the directory.
44    pub len: u64,
45
46    /// The noise used to sample boost activations.
47    pub noise: [u8; 32],
48
49    /// The portion of boost rewards stakers should receive (in basis points).
50    pub staker_take_rate: u64,
51
52    /// A timestamp of the last boost rotation.
53    pub ts: i64,
54
55    /// A buffer for future config variables.
56    pub _buffer: [u8; 1024],
57}
58
59account!(OldBoostAccount, OldConfig);