clmm-mine 0.1.13

Blockchain, Clmm for Solana
Documentation
use solana_client::rpc_client::RpcClient;
use solana_program::pubkey::Pubkey;
use common::command::{CliConfig, ProcessResult};
use common::contract::instructions::farming::quarry_mine::set_rewards_share::new_set_rewards_share;
use common::program::MINE_PROGRAM_ID;
use common::utils::send::send_tx;

pub fn process_farming_quarry_update_share(
    rpc_client: &RpcClient,
    config: &CliConfig,
    rewarder: Pubkey,
    mint: Pubkey,
    share: u64,
) -> ProcessResult {
    let quarry = Pubkey::find_program_address(
        &[
            b"Quarry",
            rewarder.as_ref(),
            mint.as_ref(),
        ],
        &MINE_PROGRAM_ID,
    );
    let ixs = [
        new_set_rewards_share(
            rewarder,
            quarry.0,
            config.pubkey().unwrap(),
            share
        ),
    ];

    let res = send_tx(rpc_client, config, &ixs)?;

    Ok("signers : ".to_owned() + res.to_string().as_str())
}