Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "jito-bam-boost-cli"
version = "1.0.0"
version = "1.0.1"
edition = "2021"

[[bin]]
Expand Down
9 changes: 8 additions & 1 deletion cli/src/bam_boost_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ impl BamBoostCliHandler {
}

async fn claim(&self, cluster: &str, epoch: u64) -> anyhow::Result<()> {
let rpc_client = self.get_rpc_client();
let signer = self
.cli_config
.signer
Expand Down Expand Up @@ -150,10 +151,16 @@ impl BamBoostCliHandler {

let node = merkle_tree.get_node(&signer.pubkey());

let claim_status_pda = Pubkey::new_from_array(claim_status_pda.to_bytes());

Comment thread
aoikurokawa marked this conversation as resolved.
if rpc_client.get_account(&claim_status_pda).is_ok() {
return Err(anyhow!("Claim status account already exists — subsidy for this epoch has already been claimed."));
Comment thread
aoikurokawa marked this conversation as resolved.
}

let mut ix_builder = ClaimBuilder::new();
ix_builder
.distributor(Pubkey::new_from_array(distributor_pda.to_bytes()))
.claim_status(Pubkey::new_from_array(claim_status_pda.to_bytes()))
.claim_status(claim_status_pda)
.from(distributor_token_address)
.to(claimant_token_address)
.claimant(signer.pubkey())
Expand Down
Loading