use solana_program::instruction::{AccountMeta, Instruction};
use solana_program::pubkey::Pubkey;
use crate::program::FARMING_MINT_WRAPPER_PROGRAM_ID;
use crate::utils::sighash;
pub fn new_minter_v2(
wrapper: Pubkey,
authority: Pubkey,
minter: Pubkey,
payer: Pubkey,
) -> Instruction {
let distor = sighash::sighash("global", "new_minter_v2").to_vec();
Instruction {
program_id: FARMING_MINT_WRAPPER_PROGRAM_ID,
accounts: vec![
AccountMeta::new(wrapper, false),
AccountMeta::new_readonly(payer, true),
AccountMeta::new_readonly(authority, false),
AccountMeta::new(minter, false),
AccountMeta::new(payer, true),
AccountMeta::new_readonly(solana_program::system_program::id(), false),
],
data: distor,
}
}