Skip to content

Commit

Permalink
feat: eigenlayer-middleware v0.2.1 (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
neutiyoo authored Oct 16, 2024
1 parent d05341e commit 17380a2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion contracts/lib/eigenlayer-middleware
Submodule eigenlayer-middleware updated 48 files
+29 −3 LICENSE
+2 −2 docs/README.md
+1 −1 docs/ServiceManagerBase.md
+1 −1 docs/experimental/AVS-Guide.md
+1 −0 foundry.toml
+1 −1 lib/eigenlayer-contracts
+8 −4 src/BLSApkRegistry.sol
+116 −62 src/BLSSignatureChecker.sol
+14 −21 src/EjectionManager.sol
+5 −1 src/IndexRegistry.sol
+33 −0 src/OperatorStateRetriever.sol
+52 −9 src/RegistryCoordinator.sol
+6 −1 src/RegistryCoordinatorStorage.sol
+85 −49 src/ServiceManagerBase.sol
+53 −0 src/ServiceManagerBaseStorage.sol
+22 −10 src/StakeRegistry.sol
+24 −3 src/interfaces/IECDSAStakeRegistryEventsAndErrors.sol
+3 −3 src/interfaces/IEjectionManager.sol
+12 −11 src/interfaces/IServiceManager.sol
+2 −3 src/interfaces/IServiceManagerUI.sol
+283 −0 src/unaudited/ECDSAServiceManagerBase.sol
+204 −75 src/unaudited/ECDSAStakeRegistry.sol
+10 −3 src/unaudited/ECDSAStakeRegistryStorage.sol
+14 −10 src/unaudited/examples/ECDSAStakeRegistryPermissioned.sol
+23 −20 test/events/IServiceManagerBaseEvents.sol
+6 −6 test/integration/CoreRegistration.t.sol
+83 −100 test/integration/IntegrationDeployer.t.sol
+4 −2 test/integration/User.t.sol
+0 −20 test/integration/mocks/BeaconChainOracleMock.t.sol
+16 −15 test/integration/utils/Sort.t.sol
+1 −3 test/mocks/DelegationMock.sol
+22 −0 test/mocks/ECDSAServiceManagerMock.sol
+14 −0 test/mocks/ECDSAStakeRegistryMock.sol
+0 −125 test/mocks/PaymentCoordinatorMock.sol
+80 −0 test/mocks/RewardsCoordinatorMock.sol
+9 −4 test/mocks/ServiceManagerMock.sol
+368 −146 test/unit/BLSApkRegistryUnit.t.sol
+186 −0 test/unit/ECDSAServiceManager.t.sol
+60 −14 test/unit/ECDSAStakeRegistryEqualWeightUnit.t.sol
+48 −16 test/unit/ECDSAStakeRegistryPermissionedUnit.t.sol
+472 −105 test/unit/ECDSAStakeRegistryUnit.t.sol
+23 −42 test/unit/EjectionManagerUnit.t.sol
+266 −110 test/unit/OperatorStateRetrieverUnit.t.sol
+56 −0 test/unit/RegistryCoordinatorUnit.t.sol
+283 −257 test/unit/ServiceManagerBase.t.sol
+1 −1 test/unit/ServiceManagerRouter.t.sol
+820 −411 test/unit/StakeRegistryUnit.t.sol
+123 −99 test/utils/MockAVSDeployer.sol
8 changes: 6 additions & 2 deletions contracts/script/IncredibleSquaringDeployer.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {BLSApkRegistry} from "@eigenlayer-middleware/src/BLSApkRegistry.sol";
import {IndexRegistry} from "@eigenlayer-middleware/src/IndexRegistry.sol";
import {StakeRegistry} from "@eigenlayer-middleware/src/StakeRegistry.sol";
import "@eigenlayer-middleware/src/OperatorStateRetriever.sol";

import {IRewardsCoordinator} from "@eigenlayer/contracts/interfaces/IRewardsCoordinator.sol";
import {IncredibleSquaringServiceManager, IServiceManager} from "../src/IncredibleSquaringServiceManager.sol";
import {IncredibleSquaringTaskManager} from "../src/IncredibleSquaringTaskManager.sol";
import {IIncredibleSquaringTaskManager} from "../src/IIncredibleSquaringTaskManager.sol";
Expand Down Expand Up @@ -86,6 +86,8 @@ contract IncredibleSquaringDeployer is Script, Utils {
StrategyBaseTVLLimits baseStrategyImplementation = StrategyBaseTVLLimits(
stdJson.readAddress(eigenlayerDeployedContracts, ".addresses.baseStrategyImplementation")
);
IRewardsCoordinator rewardsCoordinator =
IRewardsCoordinator(stdJson.readAddress(eigenlayerDeployedContracts, ".addresses.rewardsCoordinator"));

address credibleSquaringCommunityMultisig = msg.sender;
address credibleSquaringPauser = msg.sender;
Expand All @@ -97,6 +99,7 @@ contract IncredibleSquaringDeployer is Script, Utils {
_deployCredibleSquaringContracts(
delegationManager,
avsDirectory,
rewardsCoordinator,
erc20MockStrategy,
credibleSquaringCommunityMultisig,
credibleSquaringPauser
Expand Down Expand Up @@ -138,6 +141,7 @@ contract IncredibleSquaringDeployer is Script, Utils {
function _deployCredibleSquaringContracts(
IDelegationManager delegationManager,
IAVSDirectory avsDirectory,
IRewardsCoordinator rewardsCoordinator,
IStrategy strat,
address incredibleSquaringCommunityMultisig,
address credibleSquaringPauser
Expand Down Expand Up @@ -265,7 +269,7 @@ contract IncredibleSquaringDeployer is Script, Utils {
}

incredibleSquaringServiceManagerImplementation = new IncredibleSquaringServiceManager(
avsDirectory, registryCoordinator, stakeRegistry, incredibleSquaringTaskManager
avsDirectory, rewardsCoordinator, registryCoordinator, stakeRegistry, incredibleSquaringTaskManager
);
// Third, upgrade the proxy contracts to use the correct implementation contracts and initialize them.
incredibleSquaringProxyAdmin.upgrade(
Expand Down
10 changes: 2 additions & 8 deletions contracts/src/IncredibleSquaringServiceManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,11 @@ contract IncredibleSquaringServiceManager is ServiceManagerBase {

constructor(
IAVSDirectory _avsDirectory,
IRewardsCoordinator _rewardsCoordinator,
IRegistryCoordinator _registryCoordinator,
IStakeRegistry _stakeRegistry,
IIncredibleSquaringTaskManager _incredibleSquaringTaskManager
)
ServiceManagerBase(
_avsDirectory,
IPaymentCoordinator(address(0)), // inc-sq doesn't need to deal with payments
_registryCoordinator,
_stakeRegistry
)
{
) ServiceManagerBase(_avsDirectory, _rewardsCoordinator, _registryCoordinator, _stakeRegistry) {
incredibleSquaringTaskManager = _incredibleSquaringTaskManager;
}

Expand Down

0 comments on commit 17380a2

Please sign in to comment.