From f04e63ea156312e5abd8d29f96f26f7b38228296 Mon Sep 17 00:00:00 2001 From: steven Date: Tue, 10 Dec 2024 12:24:48 -0500 Subject: [PATCH] chore: bump dependency for slashing mags updates --- lib/eigenlayer-contracts | 2 +- src/interfaces/ISlasher.sol | 4 ++-- src/slashers/VetoableSlasher.sol | 2 +- src/slashers/base/SlasherBase.sol | 2 +- test/integration/CoreRegistration.t.sol | 9 ++++++++- test/integration/IntegrationDeployer.t.sol | 11 ++++------- test/mocks/AllocationManagerMock.sol | 5 +++++ 7 files changed, 22 insertions(+), 13 deletions(-) diff --git a/lib/eigenlayer-contracts b/lib/eigenlayer-contracts index f8c12749..d3109212 160000 --- a/lib/eigenlayer-contracts +++ b/lib/eigenlayer-contracts @@ -1 +1 @@ -Subproject commit f8c127498a3e5f019732a3e35387a2066935cc6b +Subproject commit d3109212d8869ebba791790bfe0e22bdfadd7e5f diff --git a/src/interfaces/ISlasher.sol b/src/interfaces/ISlasher.sol index 018cf16c..b938e915 100644 --- a/src/interfaces/ISlasher.sol +++ b/src/interfaces/ISlasher.sol @@ -10,7 +10,7 @@ interface ISlasherEvents { uint256 indexed requestId, address indexed operator, uint32 indexed operatorSetId, - uint256 wadToSlash, + uint256[] wadsToSlash, string description ); @@ -20,7 +20,7 @@ interface ISlasherEvents { uint256 indexed slashingRequestId, address indexed operator, uint32 indexed operatorSetId, - uint256 wadToSlash, + uint256[] wadsToSlash, string description ); } diff --git a/src/slashers/VetoableSlasher.sol b/src/slashers/VetoableSlasher.sol index b65442b6..697bbd04 100644 --- a/src/slashers/VetoableSlasher.sol +++ b/src/slashers/VetoableSlasher.sol @@ -63,7 +63,7 @@ contract VetoableSlashing is SlasherBase { status: SlashingStatus.Requested }); - emit SlashingRequested(requestId, params.operator, params.operatorSetId, params.wadToSlash, params.description); + emit SlashingRequested(requestId, params.operator, params.operatorSetId, params.wadsToSlash, params.description); } function _cancelSlashingRequest(uint256 requestId) internal virtual { diff --git a/src/slashers/base/SlasherBase.sol b/src/slashers/base/SlasherBase.sol index 8357c6f4..181dae59 100644 --- a/src/slashers/base/SlasherBase.sol +++ b/src/slashers/base/SlasherBase.sol @@ -24,7 +24,7 @@ abstract contract SlasherBase is Initializable, SlasherStorage { IAllocationManager.SlashingParams memory _params ) internal virtual { IServiceManager(serviceManager).slashOperator(_params); - emit OperatorSlashed(_requestId, _params.operator, _params.operatorSetId, _params.wadToSlash, _params.description); + emit OperatorSlashed(_requestId, _params.operator, _params.operatorSetId, _params.wadsToSlash, _params.description); } function _checkSlasher(address account) internal view virtual { diff --git a/test/integration/CoreRegistration.t.sol b/test/integration/CoreRegistration.t.sol index f385c7e2..a237e410 100644 --- a/test/integration/CoreRegistration.t.sol +++ b/test/integration/CoreRegistration.t.sol @@ -29,7 +29,14 @@ contract Test_CoreRegistration is MockAVSDeployer { // Deploy New DelegationManager PermissionController permissionController; // TODO: Fix - DelegationManager delegationManagerImplementation = new DelegationManager(avsDirectoryMock, IStrategyManager(address(strategyManagerMock)), eigenPodManagerMock, allocationManagerMock, pauserRegistry, permissionController, 0); + DelegationManager delegationManagerImplementation = new DelegationManager( + IStrategyManager(address(strategyManagerMock)), + eigenPodManagerMock, + allocationManagerMock, + pauserRegistry, + permissionController, + 0 + ); IStrategy[] memory initializeStrategiesToSetDelayBlocks = new IStrategy[](0); uint256[] memory initializeWithdrawalDelayBlocks = new uint256[](0); delegationManager = DelegationManager( diff --git a/test/integration/IntegrationDeployer.t.sol b/test/integration/IntegrationDeployer.t.sol index 79089178..db3fb704 100644 --- a/test/integration/IntegrationDeployer.t.sol +++ b/test/integration/IntegrationDeployer.t.sol @@ -182,11 +182,11 @@ abstract contract IntegrationDeployer is Test, IUserDeployer { // Second, deploy the *implementation* contracts, using the *proxy contracts* as inputs DelegationManager delegationImplementation = - new DelegationManager(avsDirectory, strategyManager, eigenPodManager, allocationManager, pauserRegistry, permissionController, 0); + new DelegationManager(strategyManager, eigenPodManager, allocationManager, pauserRegistry, permissionController, 0); StrategyManager strategyManagerImplementation = new StrategyManager(delegationManager, pauserRegistry); EigenPodManager eigenPodManagerImplementation = new EigenPodManager( - ethPOSDeposit, eigenPodBeacon, strategyManager, delegationManager, pauserRegistry + ethPOSDeposit, eigenPodBeacon, delegationManager, pauserRegistry ); console.log("HERE Impl"); AVSDirectory avsDirectoryImplementation = new AVSDirectory(delegationManager, pauserRegistry); @@ -259,12 +259,9 @@ abstract contract IntegrationDeployer is Test, IUserDeployer { ) ); - proxyAdmin.upgradeAndCall( + proxyAdmin.upgrade( TransparentUpgradeableProxy(payable(address(permissionController))), - address(permissionControllerImplementation), - abi.encodeWithSelector( - PermissionController.initialize.selector - ) + address(permissionControllerImplementation) ); proxyAdmin.upgradeAndCall( diff --git a/test/mocks/AllocationManagerMock.sol b/test/mocks/AllocationManagerMock.sol index adf06c62..fdb11248 100644 --- a/test/mocks/AllocationManagerMock.sol +++ b/test/mocks/AllocationManagerMock.sol @@ -163,6 +163,11 @@ contract AllocationManagerIntermediate is IAllocationManager { IStrategy[] memory strategies, uint32 futureBlock ) external view virtual returns (uint256[][] memory slashableStake) {} + + function isMemberOfOperatorSet( + address operator, + OperatorSet memory operatorSet + ) external view virtual returns (bool) {} } contract AllocationManagerMock is AllocationManagerIntermediate {