mars-cli 0.5.6

A command line interface for the Mars program.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::str::FromStr;

use solana_program::pubkey::Pubkey;
use solana_sdk::signature::Signer;

use crate::Miner;

impl Miner {
    pub async fn update_admin(&self, new_admin: String) {
        let signer = self.signer();
        let new_admin = Pubkey::from_str(new_admin.as_str()).unwrap();
        let ix = mars::instruction::update_admin(signer.pubkey(), new_admin);
        self.send_and_confirm(&[ix], false, false)
            .await
            .expect("Transaction failed");
    }
}