Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: contracts middleware interface #235

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
30f6d2f
test(contracts): more on EL integration
thedevbirb Sep 12, 2024
5147bdf
chore(contracts): remove duplicate revert
thedevbirb Sep 13, 2024
9fd4914
feat(contracts): IBoltMiddleware interface
thedevbirb Sep 19, 2024
5444474
feat(contracts): BoltEigenLayerMiddleware.sol stub
thedevbirb Sep 19, 2024
40770a8
feat(contracts): middleware name hash identifier
thedevbirb Sep 20, 2024
8ae639e
feat(contracts): enumerable map for middleware contracts
thedevbirb Sep 20, 2024
eca5190
chore(contracts): remove EL functions from BoltManager, they've been …
thedevbirb Sep 20, 2024
98530a3
chore(contracts): rename + modify deployer contract
thedevbirb Sep 20, 2024
8f61b7f
fix(contracts): make tests compile
thedevbirb Sep 20, 2024
a8a6502
test(contracts): eigenlayer middleware working
thedevbirb Sep 23, 2024
a7263e2
chore(contracts): function docs, remove some Symbiotic constants insi…
thedevbirb Sep 23, 2024
23ca744
chore(contract): nameHash -> NAME_HASH in interface too
thedevbirb Sep 23, 2024
a83a54c
chore(contracts): EL middleware fmt
thedevbirb Sep 23, 2024
e838b95
feat(contracts): BoltSymbioticMiddleware.sol
thedevbirb Sep 23, 2024
a0acaba
chore(contracts): BoltManager.sol remove old symbiotic functionalitie…
thedevbirb Sep 23, 2024
0368a31
fix(contracts): deploy script after symbiotic middleware
thedevbirb Sep 23, 2024
94b5d22
fix(contracts): Symbiotic/EL tests after middleware migration
thedevbirb Sep 23, 2024
b7b517a
chore(contracts): README
thedevbirb Sep 23, 2024
ec916b8
chore(contracts): remove unused constant from boltmanager
thedevbirb Sep 23, 2024
827d2a2
Update bolt-contracts/README.md
thedevbirb Sep 23, 2024
a3f47c5
fix(contracts): remove useless type casting
thedevbirb Sep 23, 2024
9dd6f12
chore(contracts): deploy log
thedevbirb Sep 23, 2024
27ac4ce
chore(contracts): restaking protocols getter; function docs
thedevbirb Sep 23, 2024
4077501
refactor!(contracts): remove everything extra from BoltManager
thedevbirb Sep 24, 2024
e9c4418
chore(contracts): remove some symbiotic prefixes in symbiotic middleware
thedevbirb Sep 24, 2024
5fc293c
chore(contracts): middleware now hold reference to BoltManager instea…
thedevbirb Sep 30, 2024
18f2554
chore(contracts): restore IBoltManager.sol interface
thedevbirb Sep 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions bolt-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ coordination of validators, operators, and vaults within the Bolt network.

Key features include:

1. Registration of Symbiotic Operators and Vaults / EigenLayer Operators and Strategies
2. Whitelisting of collateral assets used to back commitments
3. Retrieval of operator stake and proposer status from their pubkey
4. Integration with Symbiotic/EigenLayer
1. Retrieval of operator stake and proposer status from their pubkey
2. Integration with Symbiotic
3. Integration with Eigenlayer

Specific functionalities about the restaking protocols are handled inside
the `IBoltMiddleware` contracts, such as `BoltSymbioticMiddleware` and `BoltEigenlayerMiddleware`.

### Symbiotic Integration guide for Staking Pools

Expand All @@ -61,9 +63,9 @@ on how to spin up a Vault and start receiving stake from your node operators.

Opting into Bolt works as any other Symbiotic middleware integration. Here are the steps:

1. Make sure your vault collateral is whitelisted in `BoltManager` by calling `isSymbioticCollateralWhitelisted`.
2. Register as a vault in `BoltManager` by calling `registerSymbioticVault`.
3. Verify that your vault is active in `BoltManager` by calling `isSymbioticVaultEnabled`.
1. Make sure your vault collateral is whitelisted in `BoltSymbioticMiddleware` by calling `isCollateralWhitelisted`.
2. Register as a vault in `BoltSymbioticMiddleware` by calling `registerVault`.
3. Verify that your vault is active in `BoltSymbioticMiddleware` by calling `isVaultEnabled`.
4. Set the network limit for your vault in Symbiotic with `Vault.delegator().setNetworkLimit()`.
5. You can now start approving operators that opt in to your vault directly in Symbiotic.
6. When you assign shares to operators, they are able to provide commitments on behalf of your collateral.
Expand All @@ -78,7 +80,7 @@ The opt-in process requires the following steps:
1. register in Symbiotic with `OperatorRegistry.registerOperator()`.
2. opt-in to the Bolt network with `OperatorNetworkOptInService.optIn(networkAddress)`.
3. opt-in to any vault with `OperatorVaultOptInService.optIn(vaultAddress)`.
4. register in Bolt with `BoltManager.registerSymbioticOperator(operatorAddress)`.
4. register in Bolt with `BoltSymbioticMiddleware.registerOperator(operatorAddress)`.
thedevbirb marked this conversation as resolved.
Show resolved Hide resolved
5. get approved by the vault.
6. start providing commitments with the stake provided by the vault.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import {Script, console} from "forge-std/Script.sol";

import {BoltValidators} from "../src/contracts/BoltValidators.sol";
import {BoltManager} from "../src/contracts/BoltManager.sol";
import {BoltEigenLayerMiddleware} from "../src/contracts/BoltEigenLayerMiddleware.sol";
import {BoltSymbioticMiddleware} from "../src/contracts/BoltSymbioticMiddleware.sol";

/// @notice Script to deploy the BoltManager and BoltValidators contracts.
contract DeployBoltManager is Script {
contract DeployBolt is Script {
function run(
address symbioticNetwork,
address symbioticOperatorRegistry,
Expand All @@ -24,19 +26,22 @@ contract DeployBoltManager is Script {
BoltValidators validators = new BoltValidators(sender);
console.log("BoltValidators deployed at", address(validators));

BoltManager manager = new BoltManager(
address(sender),
BoltManager manager = new BoltManager(sender, address(validators));
console.log("BoltManager deployed at", address(manager));

BoltEigenLayerMiddleware eigenLayerMiddleware = new BoltEigenLayerMiddleware(
sender, address(validators), eigenlayerAVSDirectory, eigenlayerDelegationManager, eigenlayerStrategyManager
);
console.log("BoltEigenLayerMiddleware deployed at", address(eigenLayerMiddleware));
BoltSymbioticMiddleware symbioticMiddleware = new BoltSymbioticMiddleware(
sender,
address(validators),
symbioticNetwork,
symbioticOperatorRegistry,
symbioticOperatorNetOptIn,
symbioticVaultRegistry,
eigenlayerAVSDirectory,
eigenlayerDelegationManager,
eigenlayerStrategyManager
symbioticVaultRegistry
);
console.log("BoltManager deployed at", address(manager));

console.log("BoltSymbioticMiddleware deployed at", address(eigenLayerMiddleware));
vm.stopBroadcast();
}
}
Loading
Loading