Skip to content

Commit

Permalink
fix: anvil setup in eigensdk
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimalmadhur committed Dec 5, 2024
1 parent c60d259 commit 2fddd7e
Show file tree
Hide file tree
Showing 22 changed files with 113 additions and 77 deletions.
2 changes: 1 addition & 1 deletion contracts/anvil/contracts-deployed-anvil-state.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions contracts/anvil/deploy-contracts-save-anvil-state.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ set +a
start_anvil_docker "" $anvil_dir/contracts-deployed-anvil-state.json
sleep 1

CHAIN_ID=$(cast chain-id)
CHAIN_ID=$(cast chain-id --rpc-url $ETH_HTTP_URL)

# DEPLOY CONTRACT REGISTRY
cd $root_dir/contracts
Expand All @@ -48,26 +48,26 @@ DEVNET_OUTPUT_DIR=$EIGEN_CONTRACTS_DIR/script/output/devnet
# deployment overwrites this file, so we save it as backup, because we want that output in our local files, and not in the eigenlayer-contracts submodule files
mv $DEVNET_OUTPUT_DIR/M2_from_scratch_deployment_data.json $DEVNET_OUTPUT_DIR/M2_from_scratch_deployment_data.json.bak
cd $EIGEN_CONTRACTS_DIR
forge script script/deploy/devnet/M2_Deploy_From_Scratch.s.sol --rpc-url $ETH_HTTP_URL \
forge script script/deploy/local/Deploy_From_Scratch.s.sol --rpc-url $ETH_HTTP_URL \
--private-key $DEPLOYER_PRIVATE_KEY --broadcast \
--sig "run(string memory configFileName)" -- M2_deploy_from_scratch.anvil.config.json
--sig "run(string memory configFileName)" -- local/deploy_from_scratch.anvil.config.json
mv $DEVNET_OUTPUT_DIR/M2_from_scratch_deployment_data.json $root_dir/contracts/script/output/${CHAIN_ID:?}/eigenlayer_deployment_output.json
mv $DEVNET_OUTPUT_DIR/M2_from_scratch_deployment_data.json.bak $DEVNET_OUTPUT_DIR/M2_from_scratch_deployment_data.json

# DEPLOY MOCKAVS
cd $root_dir/contracts
forge script script/DeployMockAvs.s.sol --rpc-url $ETH_HTTP_URL --private-key $DEPLOYER_PRIVATE_KEY --broadcast

# DEPLOY TOKENS AND STRATEGIES
cd $root_dir/contracts
# DO NOT REMOVE THE SLOW DIRECTIVE FROM THIS SCRIPT INVOCATION
# slow ensures that the transaction reciept is successful and recieved before sending the next transaction
# this should prevent the strategies deploying/registering in a flakey manner,
forge script script/DeployTokensStrategiesCreateQuorums.s.sol --rpc-url $ETH_HTTP_URL --private-key $DEPLOYER_PRIVATE_KEY --broadcast --slow

# REGISTER OPERATORS WITH EIGENLAYER
cd $root_dir/contracts
# DO NOT REMOVE THE SLOW DIRECTIVE FROM THIS SCRIPT INVOCATION
# slow ensures that the transaction receipt is successful and recieved before sending the next transaction
# this should prevent the operators registering in a flakey manner, the operators registered will change from run to run without this
forge script script/RegisterOperatorsWithEigenlayer.s.sol --rpc-url $ETH_HTTP_URL --private-key $DEPLOYER_PRIVATE_KEY --broadcast --slow
## DEPLOY TOKENS AND STRATEGIES
#cd $root_dir/contracts
## DO NOT REMOVE THE SLOW DIRECTIVE FROM THIS SCRIPT INVOCATION
## slow ensures that the transaction reciept is successful and recieved before sending the next transaction
## this should prevent the strategies deploying/registering in a flakey manner,
#forge script script/DeployTokensStrategiesCreateQuorums.s.sol --rpc-url $ETH_HTTP_URL --private-key $DEPLOYER_PRIVATE_KEY --broadcast --slow
#
## REGISTER OPERATORS WITH EIGENLAYER
#cd $root_dir/contracts
## DO NOT REMOVE THE SLOW DIRECTIVE FROM THIS SCRIPT INVOCATION
## slow ensures that the transaction receipt is successful and recieved before sending the next transaction
## this should prevent the operators registering in a flakey manner, the operators registered will change from run to run without this
#forge script script/RegisterOperatorsWithEigenlayer.s.sol --rpc-url $ETH_HTTP_URL --private-key $DEPLOYER_PRIVATE_KEY --broadcast --slow
2 changes: 1 addition & 1 deletion contracts/bindings/AVSDirectory/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/bindings/AllocationManager/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/bindings/DelegationManager/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/bindings/EigenPod/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/bindings/EigenPodManager/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/bindings/PermissionController/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/bindings/StrategyManager/binding.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
src = "src"
out = "out"
libs = ["lib"]
solc_version = '0.8.27'
remappings = [
"@openzeppelin-upgrades-v4.9.0/=lib/eigenlayer-middleware/lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable-v4.9.0/",
"@openzeppelin-upgrades/=lib/eigenlayer-middleware/lib/openzeppelin-contracts-upgradeable/",
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/eigenlayer-middleware
Submodule eigenlayer-middleware updated 73 files
+6 −4 foundry.toml
+1 −1 lib/eigenlayer-contracts
+40 −0 script/utils/UpgradeLib.sol
+23 −0 script/utils/testdata/17000/core_testdata.json
+18 −0 script/utils/testdata/17000/middlware_testdata.json
+21 −0 src/AVSRegistrar.sol
+5 −3 src/BLSSignatureChecker.sol
+245 −129 src/RegistryCoordinator.sol
+6 −1 src/RegistryCoordinatorStorage.sol
+106 −17 src/ServiceManagerBase.sol
+17 −3 src/ServiceManagerBaseStorage.sol
+148 −34 src/StakeRegistry.sol
+20 −5 src/StakeRegistryStorage.sol
+3 −0 src/interfaces/IRegistryCoordinator.sol
+27 −1 src/interfaces/IServiceManager.sol
+3 −0 src/interfaces/IServiceManagerUI.sol
+44 −0 src/interfaces/ISlasher.sol
+33 −9 src/interfaces/IStakeRegistry.sol
+2 −2 src/libraries/BN254.sol
+145 −0 src/libraries/QuorumBitmapHistoryLib.sol
+7 −4 src/libraries/SignatureCheckerLib.sol
+22 −0 src/slashers/InstantSlasher.sol
+77 −0 src/slashers/VetoableSlasher.sol
+37 −0 src/slashers/base/SlasherBase.sol
+11 −0 src/slashers/base/SlasherStorage.sol
+11 −4 src/unaudited/ECDSAServiceManagerBase.sol
+1 −1 src/unaudited/ECDSAStakeRegistry.sol
+3 −59 test/harnesses/AVSDirectoryHarness.sol
+6 −4 test/harnesses/RegistryCoordinatorHarness.t.sol
+4 −2 test/harnesses/StakeRegistryHarness.sol
+21 −17 test/integration/CoreRegistration.t.sol
+5 −5 test/integration/IntegrationBase.t.sol
+1 −1 test/integration/IntegrationChecks.t.sol
+17 −17 test/integration/IntegrationConfig.t.sol
+89 −88 test/integration/IntegrationDeployer.t.sol
+20 −22 test/integration/User.t.sol
+1 −0 test/integration/mocks/BeaconChainOracleMock.t.sol
+2 −2 test/integration/tests/NonFull_Register_CoreBalanceChange_Update.t.sol
+16 −15 test/integration/utils/Sort.t.sol
+169 −189 test/mocks/AVSDirectoryMock.sol
+17 −0 test/mocks/AVSRegistrarMock.sol
+170 −0 test/mocks/AllocationManagerMock.sol
+249 −180 test/mocks/DelegationMock.sol
+17 −2 test/mocks/ECDSAServiceManagerMock.sol
+97 −0 test/mocks/EigenPodManagerMock.sol
+91 −0 test/mocks/PermissionControllerMock.sol
+3 −1 test/mocks/RegistryCoordinatorMock.sol
+159 −101 test/mocks/RewardsCoordinatorMock.sol
+12 −4 test/mocks/ServiceManagerMock.sol
+20 −7 test/mocks/StakeRegistryMock.sol
+100 −0 test/unit/AVSRegistrar.t.sol
+15 −9 test/unit/ECDSAServiceManager.t.sol
+6 −6 test/unit/OperatorStateRetrieverUnit.t.sol
+0 −200 test/unit/RegistryCoordinatorMigration.t.sol
+128 −127 test/unit/RegistryCoordinatorUnit.t.sol
+26 −23 test/unit/ServiceManagerBase.t.sol
+0 −347 test/unit/ServiceManagerMigration.t.sol
+2 −1 test/unit/ServiceManagerRouter.t.sol
+66 −13 test/unit/StakeRegistryUnit.t.sol
+46 −0 test/unit/UpgradeableProxyLib.sol
+2 −2 test/unit/Utils.sol
+2 −2 test/utils/BLSMockAVSDeployer.sol
+271 −0 test/utils/CoreDeployLib.sol
+0 −11 test/utils/Greeter.sol
+0 −65 test/utils/GreeterProxiable.sol
+0 −14 test/utils/GreeterV2.sol
+0 −17 test/utils/GreeterV2Proxiable.sol
+89 −58 test/utils/MockAVSDeployer.sol
+0 −13 test/utils/NoInitializer.sol
+0 −9 test/utils/ProxyTestContracts.sol
+0 −241 test/utils/UpgradeableProxyUtils.sol
+0 −87 test/utils/UpgradeableProxyUtils.t.sol
+0 −19 test/utils/WithConstructor.sol
5 changes: 3 additions & 2 deletions contracts/script/DeployMockAvs.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma solidity ^0.8.12;

import "./DeployMockAvsRegistries.s.sol";
import "forge-std/console.sol";
Expand Down Expand Up @@ -47,7 +47,8 @@ contract DeployMockAvs is DeployMockAvsRegistries {
mockAvsServiceManagerImplementation = new MockAvsServiceManager(
registryCoordinator,
eigenlayerContracts.avsDirectory,
eigenlayerContracts.rewardsCoordinator
eigenlayerContracts.rewardsCoordinator,
eigenlayerContracts.allocationManager
);

mockAvsProxyAdmin.upgradeAndCall(
Expand Down
20 changes: 14 additions & 6 deletions contracts/script/DeployMockAvsRegistries.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma solidity ^0.8.12;

import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
Expand All @@ -17,6 +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 {OperatorStateRetriever} from "eigenlayer-middleware/src/OperatorStateRetriever.sol";
import {StakeType} from "eigenlayer-middleware/src/interfaces/IStakeRegistry.sol";

import {MockAvsContracts} from "./parsers/MockAvsContractsParser.sol";
import {EigenlayerContracts, EigenlayerContractsParser} from "./parsers/EigenlayerContractsParser.sol";
Expand Down Expand Up @@ -145,7 +146,9 @@ contract DeployMockAvsRegistries is
{
stakeRegistryImplementation = new StakeRegistry(
registryCoordinator,
eigenlayerContracts.delegationManager
eigenlayerContracts.delegationManager,
eigenlayerContracts.avsDirectory,
IServiceManager(address(mockAvsServiceManager))
);

mockAvsProxyAdmin.upgrade(
Expand All @@ -158,7 +161,9 @@ contract DeployMockAvsRegistries is
blsregcoord.IServiceManager(address(mockAvsServiceManager)),
blsregcoord.IStakeRegistry(address(stakeRegistry)),
blsregcoord.IBLSApkRegistry(address(blsApkRegistry)),
blsregcoord.IIndexRegistry(address(indexRegistry))
blsregcoord.IIndexRegistry(address(indexRegistry)),
blsregcoord.IAVSDirectory(eigenlayerContracts.avsDirectory),
PauserRegistry(address(mockAvsPauserReg))
);

{
Expand Down Expand Up @@ -200,21 +205,24 @@ contract DeployMockAvsRegistries is
// });
// }
// }
uint32[] memory lookAhead = new uint32[](numQuorums);
StakeType[] memory stakeTypes = new StakeType[](numQuorums);
mockAvsProxyAdmin.upgradeAndCall(
TransparentUpgradeableProxy(
payable(address(registryCoordinator))
),
address(registryCoordinatorImplementation),
abi.encodeWithSelector(
blsregcoord.RegistryCoordinator.initialize.selector,
addressConfig.communityMultisig,
// addressConfig.communityMultisig,
addressConfig.churner,
addressConfig.ejector,
addressConfig.pauser,
0, // 0 initialPausedStatus means everything unpaused
quorumsOperatorSetParams,
quorumsMinimumStake,
quorumsStrategyParams
quorumsStrategyParams,
stakeTypes,
lookAhead
)
);
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/script/DeployTokensStrategiesCreateQuorums.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma solidity ^0.8.12;

import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
import "eigenlayer-contracts/src/contracts/permissions/PauserRegistry.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/script/RegisterOperatorsWithEigenlayer.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma solidity ^0.8.12;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

Expand Down
59 changes: 36 additions & 23 deletions contracts/script/output/31337/eigenlayer_deployment_output.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,46 @@
{
"addresses": {
"avsDirectory": "0x0165878A594ca255338adfa4d48449f69242Eb8F",
"avsDirectoryImplementation": "0x0B306BF915C4d645ff596e518fAf3F9669b97016",
"baseStrategyImplementation": "0x09635F643e140090A9A8Dcd712eD6285858ceBef",
"delayedWithdrawalRouter": "0x8A791620dd6260079BF849Dc5567aDC3F2FdC318",
"delayedWithdrawalRouterImplementation": "0x68B1D87F95878fE05B998F19b66F4baba5De1aed",
"delegation": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",
"delegationImplementation": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82",
"eigenLayerPauserReg": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
"eigenLayerProxyAdmin": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
"eigenPodBeacon": "0xA51c1fc2f0D1a1b8494Ed1FE312d7C3a78Ed91C0",
"eigenPodImplementation": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e",
"eigenPodManager": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6",
"eigenPodManagerImplementation": "0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE",
"emptyContract": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9",
"rewardsCoordinator": "0x610178dA211FEF7D417bC0e6FeD39F05609AD788",
"rewardsCoordinatorImplementation": "0x3Aa5ebB10DC797CAC828524e59A333d0A371443c",
"slasher": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853",
"slasherImplementation": "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1",
"strategies": "",
"strategyManager": "0x5FC8d32690cc91D4c39d9d3abcBD16989F875707",
"strategyManagerImplementation": "0x9A676e781A523b5d0C0e43731313A708CB607508"
"allocationManager": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6",
"allocationManagerImplementation": "0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE",
"avsDirectory": "0x5FC8d32690cc91D4c39d9d3abcBD16989F875707",
"avsDirectoryImplementation": "0x9A676e781A523b5d0C0e43731313A708CB607508",
"baseStrategyImplementation": "0x7a2088a1bFc9d81c55368AE168C2C02570cB814F",
"delegationManager": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9",
"delegationManagerImplementation": "0xA51c1fc2f0D1a1b8494Ed1FE312d7C3a78Ed91C0",
"eigenLayerPauserReg": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
"eigenLayerProxyAdmin": "0x5FbDB2315678afecb367f032d93F642f64180aa3",
"eigenPodBeacon": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e",
"eigenPodImplementation": "0x610178dA211FEF7D417bC0e6FeD39F05609AD788",
"eigenPodManager": "0x0165878A594ca255338adfa4d48449f69242Eb8F",
"eigenPodManagerImplementation": "0x0B306BF915C4d645ff596e518fAf3F9669b97016",
"emptyContract": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
"numStrategiesDeployed": 0,
"rewardsCoordinator": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853",
"rewardsCoordinatorImplementation": "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1",
"strategies": {
"WETH": "0xc5a5C42992dECbae36851359345FE25997F5C42d"
},
"strategyManager": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",
"strategyManagerImplementation": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82",
"token": {
"tokenProxyAdmin": "0x0000000000000000000000000000000000000000",
"EIGEN": "0x0000000000000000000000000000000000000000",
"bEIGEN": "0x0000000000000000000000000000000000000000",
"EIGENImpl": "0x0000000000000000000000000000000000000000",
"bEIGENImpl": "0x0000000000000000000000000000000000000000",
"eigenStrategy": "0x0000000000000000000000000000000000000000",
"eigenStrategyImpl": "0x0000000000000000000000000000000000000000"
}
},
"chainInfo": {
"chainId": 31337,
"deploymentBlock": 1
"deploymentBlock": 0
},
"parameters": {
"communityMultisig": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"executorMultisig": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"operationsMultisig": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
"operationsMultisig": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"pauserMultisig": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"timelock": "0x0000000000000000000000000000000000000000"
}
}
2 changes: 1 addition & 1 deletion contracts/script/parsers/ConfigsReadWriter.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.8.12;
pragma solidity ^0.8.12;

import "eigenlayer-middleware/src/interfaces/IRegistryCoordinator.sol";
import "eigenlayer-contracts/src/contracts/strategies/StrategyBase.sol";
Expand Down
33 changes: 21 additions & 12 deletions contracts/script/parsers/EigenlayerContractsParser.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma solidity ^0.8.12;

import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
import "eigenlayer-contracts/src/contracts/permissions/PauserRegistry.sol";
Expand All @@ -10,19 +10,21 @@ import {IStrategyManager, IStrategy} from "eigenlayer-contracts/src/contracts/in
import {ISlasher} from "eigenlayer-contracts/src/contracts/interfaces/ISlasher.sol";
import {StrategyBaseTVLLimits} from "eigenlayer-contracts/src/contracts/strategies/StrategyBaseTVLLimits.sol";
import {IRewardsCoordinator} from "eigenlayer-contracts/src/contracts/interfaces/IRewardsCoordinator.sol";
import {IAllocationManager} from "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol";

import {ConfigsReadWriter} from "./ConfigsReadWriter.sol";
import "forge-std/StdJson.sol";
import {IAllocationManager} from "../../lib/eigenlayer-middleware/lib/eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol";

struct EigenlayerContracts {
struct EigenlayerContracts {
ProxyAdmin eigenlayerProxyAdmin;
PauserRegistry eigenlayerPauserReg;
IStrategyManager strategyManager;
IDelegationManager delegationManager;
ISlasher slasher;
IAVSDirectory avsDirectory;
IRewardsCoordinator rewardsCoordinator;
StrategyBaseTVLLimits baseStrategyImplementation;
IAllocationManager allocationManager;
}

contract EigenlayerContractsParser is ConfigsReadWriter {
Expand Down Expand Up @@ -56,7 +58,7 @@ contract EigenlayerContractsParser is ConfigsReadWriter {
IDelegationManager delegationManager = IDelegationManager(
stdJson.readAddress(
eigenlayerDeployedContracts,
".addresses.delegation"
".addresses.delegationManager"
)
);
IAVSDirectory avsDirectory = IAVSDirectory(
Expand All @@ -65,12 +67,12 @@ contract EigenlayerContractsParser is ConfigsReadWriter {
".addresses.avsDirectory"
)
);
ISlasher slasher = ISlasher(
stdJson.readAddress(
eigenlayerDeployedContracts,
".addresses.slasher"
)
);
// ISlasher slasher = ISlasher(
// stdJson.readAddress(
// eigenlayerDeployedContracts,
// ".addresses.slasher"
// )
// );
StrategyBaseTVLLimits baseStrategyImplementation = StrategyBaseTVLLimits(
stdJson.readAddress(
eigenlayerDeployedContracts,
Expand All @@ -84,16 +86,23 @@ contract EigenlayerContractsParser is ConfigsReadWriter {
".addresses.rewardsCoordinator"
)
);

IAllocationManager allocationManager = IAllocationManager(
stdJson.readAddress(
eigenlayerDeployedContracts,
".addresses.allocationManager"
)
);
return
EigenlayerContracts(
eigenlayerProxyAdmin,
eigenlayerPauserReg,
strategyManager,
delegationManager,
slasher,
avsDirectory,
rewardsCoordinator,
baseStrategyImplementation
baseStrategyImplementation,
allocationManager
);
}
}
2 changes: 1 addition & 1 deletion contracts/script/parsers/MockAvsContractsParser.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma solidity ^0.8.12;

import {RegistryCoordinator} from "eigenlayer-middleware/src/RegistryCoordinator.sol";
import {OperatorStateRetriever} from "eigenlayer-middleware/src/OperatorStateRetriever.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma solidity ^0.8.12;

import "@openzeppelin/contracts/interfaces/IERC20.sol";
import {IStrategyManager, IStrategy} from "eigenlayer-contracts/src/contracts/interfaces/IStrategyManager.sol";
Expand Down
10 changes: 7 additions & 3 deletions contracts/src/MockAvsServiceManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,33 @@ pragma solidity ^0.8.12;

import {IAVSDirectory} from "eigenlayer-contracts/src/contracts/interfaces/IAVSDirectory.sol";
import {IRewardsCoordinator} from "eigenlayer-contracts/src/contracts/interfaces/IRewardsCoordinator.sol";
import {IAllocationManager} from "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol";

import {IRegistryCoordinator} from "eigenlayer-middleware/src/interfaces/IRegistryCoordinator.sol";
import {IBLSSignatureChecker} from "eigenlayer-middleware/src/interfaces/IBLSSignatureChecker.sol";
import {ServiceManagerBase} from "eigenlayer-middleware/src/ServiceManagerBase.sol";
import {BLSSignatureChecker} from "eigenlayer-middleware/src/BLSSignatureChecker.sol";
import {IAllocationManager} from "../lib/eigenlayer-middleware/lib/eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol";

contract MockAvsServiceManager is ServiceManagerBase, BLSSignatureChecker {
constructor(
IRegistryCoordinator _registryCoordinator,
IAVSDirectory _avsDirectory,
IRewardsCoordinator _rewardsCoordinator
IRewardsCoordinator _rewardsCoordinator,
IAllocationManager _allocationManager
)
ServiceManagerBase(
_avsDirectory,
_rewardsCoordinator,
_registryCoordinator,
_registryCoordinator.stakeRegistry()
_registryCoordinator.stakeRegistry(),
_allocationManager
)
BLSSignatureChecker(_registryCoordinator)
{}

function initialize(address _initialOwner) external initializer {
// TODO: setting _rewardsInitializer to be _initialOwner for now.
__ServiceManagerBase_init(_initialOwner, _initialOwner);
__ServiceManagerBase_init(_initialOwner, _initialOwner, _initialOwner);
}
}
2 changes: 1 addition & 1 deletion contracts/src/MockERC20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.12;
pragma solidity ^0.8.12;

import {ERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";

Expand Down

0 comments on commit 2fddd7e

Please sign in to comment.