clmm-common 0.1.39

Blockchain, Clmm for Solana
Documentation
use solana_program::instruction::{AccountMeta, Instruction};
use solana_program::pubkey::Pubkey;

use crate::program::MINT_WRAPPER_PROGRAM_ID;
use crate::utils::sighash;

pub fn transfer_admin(mint_wrapper: Pubkey, admin: Pubkey, next_admin: Pubkey) -> Instruction {
    let distor = sighash::sighash("global", "transfer_admin").to_vec();

    Instruction {
        program_id: MINT_WRAPPER_PROGRAM_ID,
        accounts: vec![
            AccountMeta::new(mint_wrapper, false),
            AccountMeta::new_readonly(admin, true),
            AccountMeta::new_readonly(next_admin, false),
        ],
        data: distor,
    }
}