diff --git a/script/PriceFeedConsumer.s.sol b/script/PriceFeedConsumer.s.sol index 36ca80d..80b8569 100644 --- a/script/PriceFeedConsumer.s.sol +++ b/script/PriceFeedConsumer.s.sol @@ -15,12 +15,12 @@ contract DeployPriceFeedConsumer is Script, HelperConfig { (,,,,, address priceFeed,,,) = helperConfig.activeNetworkConfig(); + vm.startBroadcast(); + if (priceFeed == address(0)) { priceFeed = address(new MockV3Aggregator(DECIMALS, INITIAL_ANSWER)); } - vm.startBroadcast(); - new PriceFeedConsumer(priceFeed); vm.stopBroadcast();