mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-14 15:10:13 +00:00
cleanup
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use steel::*;
|
||||
|
||||
use crate::state::{config_pda, OreAccountOLD};
|
||||
use crate::state::config_pda;
|
||||
|
||||
use super::OreAccount;
|
||||
|
||||
@@ -23,26 +23,6 @@ pub struct Config {
|
||||
pub is_seeker_activation_enabled: u64,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
|
||||
pub struct ConfigOLD {
|
||||
/// The address that can update the config.
|
||||
pub admin: Pubkey,
|
||||
|
||||
/// The last boost timestamp.
|
||||
pub last_boost: i64,
|
||||
|
||||
/// Whether seeker activation is enabled.
|
||||
pub is_seeker_activation_enabled: u64,
|
||||
|
||||
/// The address that receives admin fees.
|
||||
pub fee_collector: Pubkey,
|
||||
|
||||
// The fee rate taken for each swap.
|
||||
#[deprecated(since = "1.0.0", note = "Unused")]
|
||||
pub fee_rate: u64,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn pda() -> (Pubkey, u8) {
|
||||
config_pda()
|
||||
@@ -50,4 +30,3 @@ impl Config {
|
||||
}
|
||||
|
||||
account!(OreAccount, Config);
|
||||
account!(OreAccountOLD, ConfigOLD);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use steel::*;
|
||||
|
||||
use crate::state::{miner_pda, OreAccountOLD, Treasury};
|
||||
use crate::state::{miner_pda, Treasury};
|
||||
|
||||
use super::OreAccount;
|
||||
|
||||
@@ -50,40 +50,6 @@ pub struct Miner {
|
||||
pub lifetime_rewards_ore: u64,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
|
||||
pub struct MinerOLD {
|
||||
/// The authority of this miner account.
|
||||
pub authority: Pubkey,
|
||||
|
||||
/// The miner's prospects in the current round.
|
||||
pub deployed: [u64; 25],
|
||||
|
||||
/// The cumulative amount of SOL deployed on each square prior to this miner's move.
|
||||
pub cumulative: [u64; 25],
|
||||
|
||||
/// SOL witheld in reserve to pay for checkpointing.
|
||||
pub checkpoint_fee: u64,
|
||||
|
||||
/// The last round that this miner checkpointed.
|
||||
pub checkpoint_id: u64,
|
||||
|
||||
/// The amount of SOL this miner can claim.
|
||||
pub rewards_sol: u64,
|
||||
|
||||
/// The amount of ORE this miner can claim.
|
||||
pub rewards_ore: u64,
|
||||
|
||||
/// The ID of the round this miner last played in.
|
||||
pub round_id: u64,
|
||||
|
||||
/// The total amount of SOL this miner has mined across all blocks.
|
||||
pub lifetime_rewards_sol: u64,
|
||||
|
||||
/// The total amount of ORE this miner has mined across all blocks.
|
||||
pub lifetime_rewards_ore: u64,
|
||||
}
|
||||
|
||||
impl Miner {
|
||||
pub fn pda(&self) -> (Pubkey, u8) {
|
||||
miner_pda(self.authority)
|
||||
@@ -137,4 +103,3 @@ impl Miner {
|
||||
}
|
||||
|
||||
account!(OreAccount, Miner);
|
||||
account!(OreAccountOLD, MinerOLD);
|
||||
|
||||
@@ -35,14 +35,6 @@ pub enum OreAccount {
|
||||
Round = 109,
|
||||
}
|
||||
|
||||
#[repr(u8)]
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, IntoPrimitive, TryFromPrimitive)]
|
||||
pub enum OreAccountOLD {
|
||||
ConfigOLD = 101,
|
||||
MinerOLD = 103,
|
||||
TreasuryOLD = 104,
|
||||
}
|
||||
|
||||
pub fn automation_pda(authority: Pubkey) -> (Pubkey, u8) {
|
||||
Pubkey::find_program_address(&[AUTOMATION, &authority.to_bytes()], &crate::ID)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
use steel::*;
|
||||
|
||||
use crate::state::OreAccountOLD;
|
||||
|
||||
use super::OreAccount;
|
||||
|
||||
/// Treasury is a singleton account which is the mint authority for the ORE token and the authority of
|
||||
@@ -31,27 +29,4 @@ pub struct Treasury {
|
||||
pub total_refined: u64,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
|
||||
pub struct TreasuryOLD {
|
||||
// The amount of SOL collected for buy-bury operations.
|
||||
pub balance: u64,
|
||||
|
||||
/// The amount of ORE in the motherlode rewards pool.
|
||||
pub motherlode: u64,
|
||||
|
||||
/// The cumulative ORE distributed to miners, divided by the total unclaimed ORE at the time of distribution.
|
||||
pub miner_rewards_factor: Numeric,
|
||||
|
||||
/// The cumulative ORE distributed to stakers, divided by the total stake at the time of distribution.
|
||||
pub stake_rewards_factor: Numeric,
|
||||
|
||||
/// The current total amount of ORE staking deposits.
|
||||
pub total_staked: u64,
|
||||
|
||||
/// The current total amount of unclaimed ORE mining rewards.
|
||||
pub total_unclaimed: u64,
|
||||
}
|
||||
|
||||
account!(OreAccount, Treasury);
|
||||
account!(OreAccountOLD, TreasuryOLD);
|
||||
|
||||
Reference in New Issue
Block a user