crema-cli 0.1.0

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

use crate::program::FARMING_MINE_PROGRAM_ID;
use crate::utils::sighash;

pub fn new_update_quarry_rewards(
    quarry: Pubkey,
    reward: Pubkey,
) -> Instruction {
    let distor = sighash::sighash("global", "update_quarry_rewards").to_vec();

    Instruction {
        program_id: FARMING_MINE_PROGRAM_ID,
        accounts: vec![
            AccountMeta::new(quarry, false),
            AccountMeta::new_readonly(reward, false),
        ],
        data: distor,
    }
}