This commit is contained in:
Hardhat Chad
2025-09-25 20:32:18 -07:00
parent 037aa5e480
commit d1d9991496
8 changed files with 113 additions and 4 deletions

View File

@@ -21,6 +21,7 @@ pub enum OreInstruction {
// Seeker
ClaimSeeker = 15,
MigrateMiner = 16,
}
#[repr(C)]
@@ -121,6 +122,10 @@ pub struct Bury {
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct ClaimSeeker {}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct MigrateMiner {}
instruction!(OreInstruction, Automate);
instruction!(OreInstruction, Boost);
instruction!(OreInstruction, ClaimSOL);
@@ -134,3 +139,4 @@ instruction!(OreInstruction, Reset);
instruction!(OreInstruction, SetAdmin);
instruction!(OreInstruction, SetFeeCollector);
instruction!(OreInstruction, ClaimSeeker);
instruction!(OreInstruction, MigrateMiner);

View File

@@ -359,3 +359,17 @@ pub fn claim_seeker(signer: Pubkey, mint: Pubkey) -> Instruction {
data: ClaimSeeker {}.to_bytes(),
}
}
pub fn migrate_miner(signer: Pubkey, address: Pubkey) -> Instruction {
let config_address = config_pda().0;
Instruction {
program_id: crate::ID,
accounts: vec![
AccountMeta::new(signer, true),
AccountMeta::new(config_address, false),
AccountMeta::new(address, false),
AccountMeta::new_readonly(system_program::ID, false),
],
data: MigrateMiner {}.to_bytes(),
}
}

View File

@@ -13,9 +13,8 @@ pub struct Config {
// The last boost timestamp.
pub last_boost: i64,
// The minimum amount of SOL that can be deploy.
#[deprecated(since = "1.0.0", note = "Unused")]
pub min_deploy_amount: u64,
// Whether seeker activation is enabled.
pub is_seeker_activation_enabled: u64,
// The address that receives fees.
pub fee_collector: Pubkey,