Skip to content

Commit

Permalink
feat(bolt-cli): log if operators have collateral
Browse files Browse the repository at this point in the history
  • Loading branch information
estensen committed Dec 11, 2024
1 parent 16152bd commit 2baae5b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bolt-cli/src/commands/operators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,12 @@ impl OperatorsCommand {
warn!(?address, "Operator not registered");
}

if bolt_manager.hasCollateral(address).call().await?._0 {
info!(?address, "EigenLayer operator has collateral");
} else {
warn!(?address, "Operator has no collateral");
}

Ok(())
}
},
Expand Down Expand Up @@ -400,6 +406,12 @@ impl OperatorsCommand {
warn!(?address, "Operator not registered");
}

if bolt_manager.hasCollateral(address).call().await?._0 {
info!(?address, "Symbiotic operator has collateral");
} else {
warn!(?address, "Operator has no collateral");
}

Ok(())
}
},
Expand Down
1 change: 1 addition & 0 deletions bolt-cli/src/common/bolt_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ sol! {
function getProposerStatus(bytes32 pubkeyHash) external view returns (ProposerStatus memory);

function isOperator(address operator) public view returns (bool);
function hasCollateral(address operator) public view returns (bool);

error InvalidQuery();
error ValidatorDoesNotExist();
Expand Down
1 change: 1 addition & 0 deletions bolt-cli/src/contracts/eigenlayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,5 +210,6 @@ sol! {
function registerAsOperator(OperatorDetails calldata registeringOperatorDetails, string calldata metadataURI) external;

function isOperator(address operator) public view returns (bool);
function hasCollateral(address operator) public view returns (bool);
}
}

0 comments on commit 2baae5b

Please sign in to comment.