miner migration

This commit is contained in:
Hardhat Chad
2025-08-28 13:29:57 -07:00
parent e17a90db4a
commit 53b340268d
8 changed files with 155 additions and 5 deletions

View File

@@ -287,3 +287,20 @@ pub fn set_sniper_fee_duration(signer: Pubkey, sniper_fee_duration: u64) -> Inst
.to_bytes(),
}
}
pub fn migrate_miner_account(signer: Pubkey, miner: 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(miner, false),
AccountMeta::new_readonly(system_program::ID, false),
],
data: MigrateMinerAccount {
authority: miner.to_bytes(),
}
.to_bytes(),
}
}