This commit is contained in:
Hardhat Chad
2025-09-18 09:01:13 -07:00
parent ffaa93d947
commit 9f9be6b80e
2 changed files with 0 additions and 87 deletions

View File

@@ -29,47 +29,6 @@ pub fn boost(signer: Pubkey) -> Instruction {
}
}
// let [signer_info, authority_info, miner_info, miner_tokens_info, mint_info, recipient_info, system_program, token_program, associated_token_program] =
pub fn migrate_miner(signer: Pubkey, authority: Pubkey) -> Instruction {
let miner_address = miner_pda(authority).0;
let miner_tokens_address = get_associated_token_address(&miner_address, &MINT_ADDRESS);
let recipient_address = get_associated_token_address(&authority, &MINT_ADDRESS);
let mint_address = MINT_ADDRESS;
Instruction {
program_id: crate::ID,
accounts: vec![
AccountMeta::new(signer, true),
AccountMeta::new(authority, false),
AccountMeta::new(miner_address, false),
AccountMeta::new(miner_tokens_address, false),
AccountMeta::new(mint_address, false),
AccountMeta::new(recipient_address, false),
AccountMeta::new_readonly(system_program::ID, false),
AccountMeta::new_readonly(spl_token::ID, false),
AccountMeta::new_readonly(spl_associated_token_account::ID, false),
],
data: MigrateMiner {}.to_bytes(),
}
}
// let [signer_info, config_info, treasury_info, system_program] = accounts else {
pub fn migrate_treasury(signer: Pubkey) -> Instruction {
let config_address = config_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_readonly(system_program::ID, false),
],
data: MigrateTreasury {}.to_bytes(),
}
}
// let [signer_info, board_info, config_info, mint_info, treasury_info, vault_info, system_program, token_program, associated_token_program] =
pub fn initialize(signer: Pubkey) -> Instruction {