From dfadae8aa322de8943417940255fb3b1aa715a6e Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Fri, 5 Jan 2024 02:41:59 -0800 Subject: [PATCH] check if whitelist is already deployed --- scripts/DeployScripts.s.sol | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/DeployScripts.s.sol b/scripts/DeployScripts.s.sol index 2bbc4a2..d3ba6c8 100644 --- a/scripts/DeployScripts.s.sol +++ b/scripts/DeployScripts.s.sol @@ -76,6 +76,13 @@ contract DeployScript is Script, Create2Deployer { // Deploys whitelist contract and adds HypERC20 to whitelist contract DeployWhitelist is Script, Create2Deployer { function run() external { + + address expectedWhiteListAddr = 0x5D1415C0973034d162F5FEcF19B50dA057057e29; + if (isContractDeployed(expectedWhiteListAddr)) { + console.log("Whitelist already deployed to:", expectedWhiteListAddr); + return; + } + vm.startBroadcast(); checkCreate2Deployed();