clmm-common 0.1.39

Blockchain, Clmm for Solana
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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,
    }
}