Skip to content

Commit

Permalink
feat: update EL middleware interface
Browse files Browse the repository at this point in the history
  • Loading branch information
merklefruit committed Jan 24, 2025
1 parent bf598c4 commit 0205433
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
12 changes: 4 additions & 8 deletions bolt-cli/src/commands/operators/eigenlayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,7 @@ impl EigenLayerSubcommand {
BoltEigenLayerMiddlewareMainnet::new(bolt_avs_address, provider.clone());

match el_middleware
.registerThroughAVSDirectory(
operator_rpc.to_string(),
extra_data,
signature,
)
.registerOperatorToAVS(operator_rpc.to_string(), extra_data, signature)
.send()
.await
{
Expand Down Expand Up @@ -223,7 +219,7 @@ impl EigenLayerSubcommand {
let el_middleware =
BoltEigenLayerMiddlewareMainnet::new(bolt_avs_address, provider);

match el_middleware.deregisterThroughAVSDirectory().send().await {
match el_middleware.deregisterOperatorFromAVS().send().await {
Ok(pending) => {
info!(
hash = ?pending.tx_hash(),
Expand Down Expand Up @@ -384,7 +380,7 @@ impl EigenLayerSubcommand {
Err(e) => {
let other = try_parse_contract_error::<OperatorsRegistryV1Errors>(e)?;
bail!("Unexpected error with selector {:?}", other.selector())
},
}
}

match registry.isActiveOperator(address).call().await {
Expand All @@ -398,7 +394,7 @@ impl EigenLayerSubcommand {
Err(e) => {
let other = try_parse_contract_error::<OperatorsRegistryV1Errors>(e)?;
bail!("Unexpected error with selector {:?}", other.selector())
},
}
}

match el_middleware.getOperatorCollaterals(address).call().await {
Expand Down
6 changes: 4 additions & 2 deletions bolt-cli/src/contracts/bolt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,15 @@ sol! {

function getOperatorStake(address operator, address collateral) public view returns (uint256);

function registerThroughAVSDirectory(
function registerOperatorToAVS(
string memory rpcEndpoint,
string memory extraData,
SignatureWithSaltAndExpiry calldata operatorSignature
) public;

function deregisterThroughAVSDirectory() public;
function deregisterOperatorFromAVS() public;

function updateOperatorsRegistryAddress(address newOperatorsRegistry) public;

error InvalidRpc();
error InvalidSigner();
Expand Down

0 comments on commit 0205433

Please sign in to comment.