Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lbelyaev committed May 28, 2024
1 parent 224c363 commit fd166ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions app/sol-xen-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ use std::time::Duration;

const MINERS: &str = "B8HwMYCk1o7EaJhooM4P43BHSk5M8zZHsTeJixqw7LMN,2Ewuie2KnTvMLwGqKWvEM1S2gUStHzDUfrANdJfu45QJ,5dxcK28nyAJdK9fSFuReRREeKnmAGVRpXPhwkZxAxFtJ,DdVCjv7fsPPm64HnepYy5MBfh2bNfkd84Rawey9rdt5S";

const MINTER: &str = "7A5q3Cw4oN5w1UXfsRTJbxGDXmVhXL2PLhL1Hp7gGCmj";

#[derive(BorshSerialize, Debug)]
pub struct EthAccount {
pub address: [u8; 20],
Expand Down Expand Up @@ -125,7 +127,7 @@ fn do_mine(ethereum_address: String, address: [u8; 20], priority_fee: u64, runs:
let keypair_path = std::env::var("USER_WALLET").expect("USER_WALLET must be set.");
let url = std::env::var("ANCHOR_PROVIDER_URL").expect("ANCHOR_PROVIDER_URL must be set.");

let miners_program_ids_str= std::env::var("MINERS").unwrap_or(String::from(MINERS));
let miners_program_ids_str= String::from(MINERS);
let miners = miners_program_ids_str.split(',').collect::<Vec<&str>>();
assert_eq!(miners.len(), 4, "Bad miners set");

Expand Down Expand Up @@ -270,10 +272,10 @@ fn do_mint(priority_fee: u64, kind: u8) {
let keypair_path = std::env::var("USER_WALLET").expect("USER_WALLET must be set.");
let url = std::env::var("ANCHOR_PROVIDER_URL").expect("ANCHOR_PROVIDER_URL must be set.");

let program_id_minter_str = std::env::var("PROGRAM_ID_MINTER").expect("PROGRAM_ID must be set.");
let program_id_minter_str = String::from(MINTER);
let program_id_minter = Pubkey::try_from(program_id_minter_str.as_str()).expect("Bad program ID");

let miners_program_ids_str= std::env::var("MINERS").unwrap_or(String::from(MINERS));
let miners_program_ids_str= String::from(MINERS);
let miners = miners_program_ids_str.split(',').collect::<Vec<&str>>();
assert_eq!(miners.len(), 4, "Bad miners set");

Expand Down
2 changes: 1 addition & 1 deletion target/idl/sol_xen_miner_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -503,4 +503,4 @@
}
}
]
}
}

0 comments on commit fd166ba

Please sign in to comment.