Skip to content

Commit

Permalink
feat(contracts): enumerable map for middleware contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
thedevbirb committed Sep 20, 2024
1 parent 84708df commit 6d80967
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions bolt-contracts/src/contracts/BoltManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ contract BoltManager is IBoltManager, Ownable {
/// @notice Set of EigenLayer collaterals addresses that are allowed.
EnumerableSet.AddressSet private whitelistedEigenLayerCollaterals;

/// @notice Set of restaking protocols supported. Each address corresponds to the
/// associated Bolt Middleware contract.
EnumerableSet.AddressSet private restakingProtocols;

// ========= IMMUTABLES =========

/// @notice Address of the Bolt network in Symbiotic Protocol.
Expand Down Expand Up @@ -197,6 +201,22 @@ contract BoltManager is IBoltManager, Ownable {

// ========= ADMIN FUNCTIONS =========

/// @notice Add a restaking protocol into Bolt
/// @param protocolMiddleware The address of the restaking protocol Bolt middleware
function addRestakingProtocol(
IBoltMiddleware protocolMiddleware
) public onlyOwner {
restakingProtocols.add(address(protocolMiddleware));
}

/// @notice Remove a restaking protocol from Bolt
/// @param protocolMiddleware The address of the restaking protocol Bolt middleware
function removeRestakingProtocol(
IBoltMiddleware protocolMiddleware
) public onlyOwner {
restakingProtocols.remove(address(protocolMiddleware));
}

/// @notice Add a collateral address to the whitelist.
/// @param collateral The collateral address to add to the whitelist.
function addWhitelistedSymbioticCollateral(
Expand Down

0 comments on commit 6d80967

Please sign in to comment.