Skip to content

Commit

Permalink
resolve some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimalmadhur committed Dec 6, 2024
1 parent 2fddd7e commit ca5e0b2
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 46 deletions.
2 changes: 1 addition & 1 deletion contracts/anvil/contracts-deployed-anvil-state.json

Large diffs are not rendered by default.

30 changes: 16 additions & 14 deletions contracts/anvil/deploy-contracts-save-anvil-state.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ CHAIN_ID=$(cast chain-id --rpc-url $ETH_HTTP_URL)

# DEPLOY CONTRACT REGISTRY
cd $root_dir/contracts
forge create src/ContractsRegistry.sol:ContractsRegistry --rpc-url $ETH_HTTP_URL --private-key $DEPLOYER_PRIVATE_KEY
forge create src/ContractsRegistry.sol:ContractsRegistry --rpc-url $ETH_HTTP_URL --private-key $DEPLOYER_PRIVATE_KEY --broadcast
#cast send 0x5FbDB2315678afecb367f032d93F642f64180aa3 "registerContract(string,address)" "test" "0x5FbDB2315678afecb367f032d93F642f64180aa3" --rpc-url $ETH_HTTP_URL --private-key $DEPLOYER_PRIVATE_KEY
#sleep 10
#cast call 0x5FbDB2315678afecb367f032d93F642f64180aa3 "contracts(string)" "test" --rpc-url $ETH_HTTP_URL

# DEPLOY EIGENLAYER
EIGEN_CONTRACTS_DIR=$root_dir/contracts/lib/eigenlayer-middleware/lib/eigenlayer-contracts
Expand All @@ -57,17 +60,16 @@ mv $DEVNET_OUTPUT_DIR/M2_from_scratch_deployment_data.json.bak $DEVNET_OUTPUT_DI
# 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

## 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
# 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
3 changes: 3 additions & 0 deletions contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ src = "src"
out = "out"
libs = ["lib"]
solc_version = '0.8.27'
via-ir = true
optimizer = true
optimizer_runs = 200
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/script/DeployMockAvs.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ contract DeployMockAvs is DeployMockAvsRegistries {
ContractsRegistry contractsRegistry = ContractsRegistry(
0x5FbDB2315678afecb367f032d93F642f64180aa3
);
EigenlayerContracts
EigenlayerContracts
memory eigenlayerContracts = _loadEigenlayerDeployedContracts();
MockAvsOpsAddresses memory addressConfig = _loadAvsOpsAddresses(
"ops_addresses"
Expand Down
10 changes: 5 additions & 5 deletions contracts/script/DeployMockAvsRegistries.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,15 @@ contract DeployMockAvsRegistries is
address(registryCoordinatorImplementation),
abi.encodeWithSelector(
blsregcoord.RegistryCoordinator.initialize.selector,
// addressConfig.communityMultisig,
addressConfig.communityMultisig,
addressConfig.churner,
addressConfig.ejector,
0, // 0 initialPausedStatus means everything unpaused
quorumsOperatorSetParams,
quorumsMinimumStake,
quorumsStrategyParams,
stakeTypes,
lookAhead
new uint96[](0),
new IStakeRegistry.StrategyParams[][](0),
new StakeType[](0),
new uint32[](0)
)
);
}
Expand Down
40 changes: 20 additions & 20 deletions contracts/script/output/31337/eigenlayer_deployment_output.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"addresses": {
"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",
"allocationManager": "0x8A791620dd6260079BF849Dc5567aDC3F2FdC318",
"allocationManagerImplementation": "0x68B1D87F95878fE05B998F19b66F4baba5De1aed",
"avsDirectory": "0x0165878A594ca255338adfa4d48449f69242Eb8F",
"avsDirectoryImplementation": "0x0B306BF915C4d645ff596e518fAf3F9669b97016",
"baseStrategyImplementation": "0x09635F643e140090A9A8Dcd712eD6285858ceBef",
"delegationManager": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",
"delegationManagerImplementation": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82",
"eigenLayerPauserReg": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
"eigenLayerProxyAdmin": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
"eigenPodBeacon": "0xA51c1fc2f0D1a1b8494Ed1FE312d7C3a78Ed91C0",
"eigenPodImplementation": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e",
"eigenPodManager": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853",
"eigenPodManagerImplementation": "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1",
"emptyContract": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9",
"numStrategiesDeployed": 0,
"rewardsCoordinator": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853",
"rewardsCoordinatorImplementation": "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1",
"rewardsCoordinator": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6",
"rewardsCoordinatorImplementation": "0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE",
"strategies": {
"WETH": "0xc5a5C42992dECbae36851359345FE25997F5C42d"
"WETH": "0x67d269191c92Caf3cD7723F116c85e6E9bf55933"
},
"strategyManager": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",
"strategyManagerImplementation": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82",
"strategyManager": "0x5FC8d32690cc91D4c39d9d3abcBD16989F875707",
"strategyManagerImplementation": "0x9A676e781A523b5d0C0e43731313A708CB607508",
"token": {
"tokenProxyAdmin": "0x0000000000000000000000000000000000000000",
"EIGEN": "0x0000000000000000000000000000000000000000",
Expand All @@ -34,7 +34,7 @@
},
"chainInfo": {
"chainId": 31337,
"deploymentBlock": 0
"deploymentBlock": 1
},
"parameters": {
"communityMultisig": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
Expand Down
10 changes: 5 additions & 5 deletions contracts/script/output/31337/mockAvs_deployment_output.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"addresses": {
"mockAvsServiceManager": "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB",
"mockAvsServiceManager": "0xa82fF9aFd8f496c3d6ac40E2a0F282E47488CFc9",
"mockAvsServiceManagerImplementation": "0x0000000000000000000000000000000000000000",
"operatorStateRetriever": "0x95401dc811bb5740090279Ba06cfA8fcF6113778",
"proxyAdmin": "0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690",
"registryCoordinator": "0xa82fF9aFd8f496c3d6ac40E2a0F282E47488CFc9",
"registryCoordinatorImplementation": "0x9d4454B023096f34B160D6B654540c56A1F81688"
"operatorStateRetriever": "0x70e0bA845a1A0F2DA3359C97E0285013525FFC49",
"proxyAdmin": "0x9E545E3C0baAB3E08CdfD552C960A1050f373042",
"registryCoordinator": "0x851356ae760d987E095750cCeb3bC6014560891C",
"registryCoordinatorImplementation": "0x36C02dA8a0983159322a80FFE9F24b1acfF8B570"
}
}

0 comments on commit ca5e0b2

Please sign in to comment.