Skip to content

refactor: remove redistribution delay #1485

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

Merged
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
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
220 changes: 0 additions & 220 deletions docs/core/SlashEscrowFactory.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
"OPERATOR_SET_GENESIS_REWARDS_TIMESTAMP": 1720656000,
"OPERATOR_SET_MAX_RETROACTIVE_LENGTH": 2592000
},
"addresses": {
"token": {
"eigenStrategy": "0x0000000000000000000000000000000000000000"
}
},
"ethPOSDepositAddress": "0x00000000219ab540356cBB839Cbe05303d7705Fa",
"semver": "v0.0.0"
}
16 changes: 6 additions & 10 deletions script/deploy/devnet/deploy_from_scratch.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ import "../../../src/contracts/core/AVSDirectory.sol";
import "../../../src/contracts/core/RewardsCoordinator.sol";
import "../../../src/contracts/core/AllocationManager.sol";
import "../../../src/contracts/permissions/PermissionController.sol";
import "../../../src/contracts/core/SlashEscrowFactory.sol";
import "../../../src/contracts/strategies/StrategyBaseTVLLimits.sol";
import "../../../src/contracts/strategies/StrategyFactory.sol";
import "../../../src/contracts/strategies/StrategyBase.sol";
import "../../../src/contracts/core/SlashEscrow.sol";

import "../../../src/contracts/pods/EigenPod.sol";
import "../../../src/contracts/pods/EigenPodManager.sol";
Expand Down Expand Up @@ -64,15 +62,15 @@ contract DeployFromScratch is Script, Test {
AllocationManager public allocationManager;
PermissionController public permissionController;
PermissionController public permissionControllerImplementation;
SlashEscrowFactory public slashEscrowFactory;
SlashEscrowFactory public slashEscrowFactoryImplementation;

EmptyContract public emptyContract;

address executorMultisig;
address operationsMultisig;
address pauserMultisig;

IStrategy eigenStrategy;

// the ETH2 deposit contract -- if not on mainnet, we deploy a mock as stand-in
IETHPOSDeposit public ethPOSDeposit;

Expand Down Expand Up @@ -167,6 +165,8 @@ contract DeployFromScratch is Script, Test {
operationsMultisig = stdJson.readAddress(config_data, ".multisig_addresses.operationsMultisig");
pauserMultisig = stdJson.readAddress(config_data, ".multisig_addresses.pauserMultisig");

eigenStrategy = IStrategy(stdJson.readAddress(config_data, ".addresses.token.eigenStrategy"));

require(executorMultisig != address(0), "executorMultisig address not configured correctly!");
require(operationsMultisig != address(0), "operationsMultisig address not configured correctly!");

Expand Down Expand Up @@ -214,9 +214,6 @@ contract DeployFromScratch is Script, Test {
permissionController = PermissionController(
address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), ""))
);
slashEscrowFactory = SlashEscrowFactory(
address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), ""))
);

// if on mainnet, use the ETH2 deposit contract address
if (chainId == 1) ethPOSDeposit = IETHPOSDeposit(0x00000000219ab540356cBB839Cbe05303d7705Fa);
Expand All @@ -238,7 +235,7 @@ contract DeployFromScratch is Script, Test {
SEMVER
);

strategyManagerImplementation = new StrategyManager(delegation, slashEscrowFactory, eigenLayerPauserReg, SEMVER);
strategyManagerImplementation = new StrategyManager(allocationManager, delegation, eigenLayerPauserReg, SEMVER);
avsDirectoryImplementation = new AVSDirectory(delegation, eigenLayerPauserReg, SEMVER);
eigenPodManagerImplementation =
new EigenPodManager(ethPOSDeposit, eigenPodBeacon, delegation, eigenLayerPauserReg, SEMVER);
Expand All @@ -259,6 +256,7 @@ contract DeployFromScratch is Script, Test {
);
allocationManagerImplementation = new AllocationManager(
delegation,
eigenStrategy,
eigenLayerPauserReg,
permissionController,
DEALLOCATION_DELAY,
Expand All @@ -267,8 +265,6 @@ contract DeployFromScratch is Script, Test {
);
permissionControllerImplementation = new PermissionController(SEMVER);
strategyFactoryImplementation = new StrategyFactory(strategyManager, eigenLayerPauserReg, SEMVER);
slashEscrowFactoryImplementation =
new SlashEscrowFactory(allocationManager, strategyManager, eigenLayerPauserReg, new SlashEscrow(), SEMVER);

// Third, upgrade the proxy contracts to use the correct implementation contracts and initialize them.
{
Expand Down
18 changes: 8 additions & 10 deletions script/deploy/local/deploy_from_scratch.slashing.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.so
import "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol";

import "../../../src/contracts/interfaces/IETHPOSDeposit.sol";
import "../../../src/contracts/strategies/EigenStrategy.sol";

import "../../../src/contracts/core/StrategyManager.sol";
import "../../../src/contracts/core/DelegationManager.sol";
import "../../../src/contracts/core/AVSDirectory.sol";
import "../../../src/contracts/core/RewardsCoordinator.sol";
import "../../../src/contracts/core/AllocationManager.sol";
import "../../../src/contracts/permissions/PermissionController.sol";
import "../../../src/contracts/core/SlashEscrowFactory.sol";
import "../../../src/contracts/core/SlashEscrow.sol";

import "../../../src/contracts/strategies/StrategyBaseTVLLimits.sol";

Expand Down Expand Up @@ -68,15 +67,15 @@ contract DeployFromScratch is Script, Test {
AllocationManager public allocationManager;
PermissionController public permissionControllerImplementation;
PermissionController public permissionController;
SlashEscrowFactory public slashEscrowFactory;
SlashEscrowFactory public slashEscrowFactoryImplementation;

EmptyContract public emptyContract;

address executorMultisig;
address operationsMultisig;
address pauserMultisig;

IStrategy eigenStrategy;

string SEMVER;

// the ETH2 deposit contract -- if not on mainnet, we deploy a mock as stand-in
Expand Down Expand Up @@ -174,6 +173,7 @@ contract DeployFromScratch is Script, Test {
executorMultisig = stdJson.readAddress(config_data, ".multisig_addresses.executorMultisig");
operationsMultisig = stdJson.readAddress(config_data, ".multisig_addresses.operationsMultisig");
pauserMultisig = stdJson.readAddress(config_data, ".multisig_addresses.pauserMultisig");

// load token list
bytes memory strategyConfigsRaw = stdJson.parseRaw(config_data, ".strategies");
strategyConfigs = abi.decode(strategyConfigsRaw, (StrategyConfig[]));
Expand Down Expand Up @@ -222,9 +222,8 @@ contract DeployFromScratch is Script, Test {
permissionController = PermissionController(
address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), ""))
);
slashEscrowFactory = SlashEscrowFactory(
address(new TransparentUpgradeableProxy(address(emptyContract), address(eigenLayerProxyAdmin), ""))
);

eigenStrategy = IStrategy(new EigenStrategy(strategyManager, eigenLayerPauserReg, SEMVER));

// if on mainnet, use the ETH2 deposit contract address
if (chainId == 1) ethPOSDeposit = IETHPOSDeposit(0x00000000219ab540356cBB839Cbe05303d7705Fa);
Expand All @@ -245,7 +244,7 @@ contract DeployFromScratch is Script, Test {
MIN_WITHDRAWAL_DELAY,
SEMVER
);
strategyManagerImplementation = new StrategyManager(delegation, slashEscrowFactory, eigenLayerPauserReg, SEMVER);
strategyManagerImplementation = new StrategyManager(allocationManager, delegation, eigenLayerPauserReg, SEMVER);
avsDirectoryImplementation = new AVSDirectory(delegation, eigenLayerPauserReg, SEMVER);
eigenPodManagerImplementation =
new EigenPodManager(ethPOSDeposit, eigenPodBeacon, delegation, eigenLayerPauserReg, SEMVER);
Expand All @@ -266,15 +265,14 @@ contract DeployFromScratch is Script, Test {
);
allocationManagerImplementation = new AllocationManager(
delegation,
eigenStrategy,
eigenLayerPauserReg,
permissionController,
DEALLOCATION_DELAY,
ALLOCATION_CONFIGURATION_DELAY,
SEMVER
);
permissionControllerImplementation = new PermissionController(SEMVER);
slashEscrowFactoryImplementation =
new SlashEscrowFactory(allocationManager, strategyManager, eigenLayerPauserReg, new SlashEscrow(), SEMVER);

// Third, upgrade the proxy contracts to use the correct implementation contracts and initialize them.
{
Expand Down
Loading
Loading