use solana_program::instruction::{AccountMeta, Instruction};
use solana_program::pubkey::Pubkey;
use crate::program::MINE_PROGRAM_ID;
use crate::utils::sighash;
pub fn accept_authority(rewarder: Pubkey, pending_admin: Pubkey) -> Instruction {
let distor = sighash::sighash("global", "accept_authority").to_vec();
Instruction {
program_id: MINE_PROGRAM_ID,
accounts: vec![
AccountMeta::new_readonly(pending_admin, true),
AccountMeta::new(rewarder, false),
],
data: distor,
}
}