crema-cli 0.1.0

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

use crate::program::PROGRAM_ID;
use crate::utils::sighash;

pub fn new_update_protocol_fee_rate(
    clmm_config: &Pubkey,
    clmmpool: &Pubkey,
    payer: Pubkey,
) -> Instruction {
    let distor = sighash::sighash("global", "update_protocol_fee_rate").to_vec();
    Instruction {
        program_id: PROGRAM_ID,
        accounts: vec![
            AccountMeta::new(payer, true),
            AccountMeta::new_readonly(*clmm_config, false),
            AccountMeta::new(*clmmpool, false),
        ],
        data: distor,
    }
}