ore_legacy_api/state/
stake.rs

1use steel::*;
2
3use crate::state::BoostAccount;
4
5/// Stake tracks the deposits and rewards of a staker.
6#[repr(C)]
7#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
8pub struct Stake {
9    /// The authority of this stake account.
10    pub authority: Pubkey,
11
12    /// The balance of this stake account.
13    pub balance: u64,
14
15    /// The boost this stake account is associated with.
16    pub boost: Pubkey,
17
18    /// The timestamp of the last time rewards were claimed from this account.
19    pub last_claim_at: i64,
20
21    /// The timestamp of the last time stake was added to this account.
22    pub last_deposit_at: i64,
23
24    /// The timestamp of the last time stake was withdrawn from this account.
25    pub last_withdraw_at: i64,
26
27    /// The boost rewards factor last time rewards were updated on this stake account.
28    pub last_rewards_factor: Numeric,
29
30    /// The amount of rewards claimable by this staker.
31    pub rewards: u64,
32
33    /// A buffer for future config variables.
34    pub _buffer: [u8; 1024],
35}
36
37account!(BoostAccount, Stake);