mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-29 15:11:03 +00:00
initialize
This commit is contained in:
20
src/state/bus.rs
Normal file
20
src/state/bus.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
use bytemuck::{Pod, Zeroable};
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
|
||||
pub struct Bus {
|
||||
/// The bump of the bus account PDA.
|
||||
pub bump: u32,
|
||||
|
||||
/// The ID of the bus account.
|
||||
pub id: u32,
|
||||
|
||||
/// The quantity of rewards this bus can issue in the current epoch epoch.
|
||||
pub available_rewards: u64,
|
||||
}
|
||||
|
||||
impl Bus {
|
||||
pub fn to_bytes(&self) -> &[u8] {
|
||||
bytemuck::bytes_of(self)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user