This commit is contained in:
Hardhat Chad
2025-10-09 16:36:38 -07:00
parent 25ec6250c4
commit 838f059a33
7 changed files with 84 additions and 45 deletions

View File

@@ -200,13 +200,13 @@ pub fn migrate_miner(signer: Pubkey, address: Pubkey) -> Instruction {
pub fn migrate_treasury(signer: Pubkey) -> Instruction {
let config_address = config_pda().0;
let treasury_address = treasury_pda().0;
// let treasury_address = treasury_pda().0;
Instruction {
program_id: crate::ID,
accounts: vec![
AccountMeta::new(signer, true),
AccountMeta::new(config_address, false),
AccountMeta::new(treasury_address, false),
// AccountMeta::new(treasury_address, false),
AccountMeta::new_readonly(system_program::ID, false),
],
data: MigrateTreasury {}.to_bytes(),

View File

@@ -1,22 +1,41 @@
use steel::*;
use crate::state::config_pda;
use crate::state::{config_pda, OreAccountOLD};
use super::OreAccount;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
pub struct Config {
// The address that can set the admin.
/// The address that can update the config.
pub admin: Pubkey,
// The last boost timestamp.
/// The adress with authority to call bury.
pub bury_authority: Pubkey,
/// The address that receives admin fees.
pub fee_collector: Pubkey,
/// The last boost timestamp.
pub last_boost: i64,
// Whether seeker activation is enabled.
/// Whether seeker activation is enabled.
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 fees.
/// The address that receives admin fees.
pub fee_collector: Pubkey,
// The fee rate taken for each swap.
@@ -31,3 +50,4 @@ impl Config {
}
account!(OreAccount, Config);
account!(OreAccountOLD, ConfigOLD);

View File

@@ -38,6 +38,7 @@ pub enum OreAccount {
#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, IntoPrimitive, TryFromPrimitive)]
pub enum OreAccountOLD {
ConfigOLD = 101,
MinerOLD = 103,
TreasuryOLD = 104,
}