Skip to content

Commit

Permalink
feat(cli): eigenlayer deposit balance check
Browse files Browse the repository at this point in the history
  • Loading branch information
mempirate committed Jan 23, 2025
1 parent 4a16a76 commit ce2b17d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bolt-cli/src/commands/operators/eigenlayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ impl EigenLayerSubcommand {

let balance = token_erc20.balanceOf(operator).call().await?._0;

if amount > balance {
bail!(
"Insufficient balance: {} < {}",
format_ether(balance),
format_ether(amount)
)
}

info!("Operator token balance: {}", format_ether(balance));

let result = token_erc20.approve(strategy_manager_address, amount).send().await?;
Expand Down

0 comments on commit ce2b17d

Please sign in to comment.