From 965009a43a9b63f15c0475bb60171d2b1f699455 Mon Sep 17 00:00:00 2001 From: steven Date: Thu, 12 Dec 2024 16:52:08 -0500 Subject: [PATCH] fix: deploy token in the broadcast part of run --- contracts/script/HelloWorldDeployer.s.sol | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/contracts/script/HelloWorldDeployer.s.sol b/contracts/script/HelloWorldDeployer.s.sol index 8af2216a..3e4c7bea 100644 --- a/contracts/script/HelloWorldDeployer.s.sol +++ b/contracts/script/HelloWorldDeployer.s.sol @@ -34,20 +34,19 @@ contract HelloWorldDeployer is Script { function setUp() public virtual { deployer = vm.rememberKey(vm.envUint("PRIVATE_KEY")); vm.label(deployer, "Deployer"); - coreDeployment = CoreDeploymentLib.readDeploymentJson("deployments/core/", block.chainid); - + } + + function run() external { + vm.startBroadcast(deployer); + proxyAdmin = UpgradeableProxyLib.deployProxyAdmin(); + token = new ERC20Mock(); helloWorldStrategy = IStrategy(StrategyFactory(coreDeployment.strategyFactory).deployNewStrategy(token)); quorum.strategies.push( StrategyParams({strategy: helloWorldStrategy, multiplier: 10_000}) ); - } - - function run() external { - vm.startBroadcast(deployer); - proxyAdmin = UpgradeableProxyLib.deployProxyAdmin(); helloWorldDeployment = HelloWorldDeploymentLib.deployContracts(proxyAdmin, coreDeployment, quorum);