mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-30 15:11:11 +00:00
refactor
This commit is contained in:
22
core/api/src/state/treasury.rs
Normal file
22
core/api/src/state/treasury.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
use bytemuck::{Pod, Zeroable};
|
||||
use shank::ShankAccount;
|
||||
|
||||
use crate::{
|
||||
impl_account_from_bytes, impl_to_bytes,
|
||||
utils::{AccountDiscriminator, Discriminator},
|
||||
};
|
||||
|
||||
/// Treasury is a singleton account which manages all program wide variables.
|
||||
/// It is the mint authority for the Ore token and also the authority of the program-owned token account.
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Pod, ShankAccount, Zeroable)]
|
||||
pub struct Treasury {}
|
||||
|
||||
impl Discriminator for Treasury {
|
||||
fn discriminator() -> AccountDiscriminator {
|
||||
AccountDiscriminator::Treasury
|
||||
}
|
||||
}
|
||||
|
||||
impl_to_bytes!(Treasury);
|
||||
impl_account_from_bytes!(Treasury);
|
||||
Reference in New Issue
Block a user