Skip to content

Commit

Permalink
feat(contracts): add vault / strategy deregistration
Browse files Browse the repository at this point in the history
  • Loading branch information
mempirate committed Oct 18, 2024
1 parent f4c4131 commit 096e76e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bolt-contracts/src/contracts/BoltEigenLayerMiddlewareV1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,18 @@ contract BoltEigenLayerMiddlewareV1 is IBoltMiddlewareV1, OwnableUpgradeable, UU
strategies.enable(strategy);
}

/// @notice Deregister a strategy from working in Bolt Protocol.
/// @param strategy The EigenLayer strategy address.
function deregisterStrategy(
address strategy
) public onlyOwner {
if (!strategies.contains(strategy)) {
revert NotRegistered();
}

strategies.remove(strategy);
}

// ========= EIGENLAYER MIDDLEWARE LOGIC =========

/// @notice Allow an operator to signal opt-in to Bolt Protocol.
Expand Down
12 changes: 12 additions & 0 deletions bolt-contracts/src/contracts/BoltSymbioticMiddlewareV1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,18 @@ contract BoltSymbioticMiddlewareV1 is IBoltMiddlewareV1, OwnableUpgradeable, UUP
vaults.enable(vault);
}

/// @notice Deregister a vault from working in Bolt Protocol.
/// @param vault The vault address to deregister.
function deregisterVault(
address vault
) public onlyOwner {
if (!vaults.contains(vault)) {
revert NotRegistered();
}

vaults.remove(vault);
}

// ========= SYMBIOTIC MIDDLEWARE LOGIC =========

/// @notice Allow an operator to signal opt-in to Bolt Protocol.
Expand Down

0 comments on commit 096e76e

Please sign in to comment.