Skip to content

Commit

Permalink
fix(zk_toolbox): Do not panic if mint is not successful
Browse files Browse the repository at this point in the history
Signed-off-by: Danil <[email protected]>
  • Loading branch information
Deniallugo committed Sep 26, 2024
1 parent df68762 commit 6138428
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions zk_toolbox/crates/common/src/ethereum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,11 @@ pub async fn mint_token(

let mut pending_txs = vec![];
for call in &pending_calls {
pending_txs.push(
call.send()
.await?
// It's safe to set such low number of confirmations and low interval for localhost
.confirmations(3)
.interval(Duration::from_millis(30)),
);
let call = call.send().await;
if let Ok(call) = call {
// It's safe to set such low number of confirmations and low interval for localhost
pending_txs.push(call.confirmations(3).interval(Duration::from_millis(30)))
}
}

futures::future::join_all(pending_txs).await;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub async fn mint_base_token(
let amount = AMOUNT_FOR_DISTRIBUTION_TO_WALLETS * base_token.nominator as u128
/ base_token.denominator as u128;
common::ethereum::mint_token(
wallets.operator,
wallets.governor,
base_token.address,
addresses,
l1_rpc_url,
Expand Down

0 comments on commit 6138428

Please sign in to comment.