From 007b784f3f8bee87a65d1d0aa5efb35485783b6d Mon Sep 17 00:00:00 2001 From: 0xtekgrinder <0xtekgrinder@protonmail.com> Date: Tue, 6 Aug 2024 12:17:36 +0200 Subject: [PATCH] style: prettier script --- scripts/foundry/UpgradeRouter.s.sol | 48 ++++++++++++++--------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/scripts/foundry/UpgradeRouter.s.sol b/scripts/foundry/UpgradeRouter.s.sol index 61de30c..7503eed 100644 --- a/scripts/foundry/UpgradeRouter.s.sol +++ b/scripts/foundry/UpgradeRouter.s.sol @@ -14,32 +14,30 @@ import { AngleRouterLinea } from "contracts/implementations/linea/AngleRouterLin import { AngleRouterPolygon } from "contracts/implementations/polygon/AngleRouterPolygon.sol"; contract UpgradeRouterScript is Script, CommonUtils { + function run() public { + uint256 chainId = vm.envUint("CHAIN_ID"); -function run() public { - uint256 chainId = vm.envUint("CHAIN_ID"); + address routerImpl; + if (chainId == CHAIN_ETHEREUM) { + routerImpl = address(new AngleRouterMainnet()); + } else if (chainId == CHAIN_ARBITRUM) { + routerImpl = address(new AngleRouterArbitrum()); + } else if (chainId == CHAIN_OPTIMISM) { + routerImpl = address(new AngleRouterOptimism()); + } else if (chainId == CHAIN_AVALANCHE) { + routerImpl = address(new AngleRouterAvalanche()); + } else if (chainId == CHAIN_BASE) { + routerImpl = address(new AngleRouterBase()); + } else if (chainId == CHAIN_CELO) { + routerImpl = address(new AngleRouterCelo()); + } else if (chainId == CHAIN_GNOSIS) { + routerImpl = address(new AngleRouterGnosis()); + } else if (chainId == CHAIN_LINEA) { + routerImpl = address(new AngleRouterLinea()); + } else if (chainId == CHAIN_POLYGON) { + routerImpl = address(new AngleRouterPolygon()); + } - address routerImpl; - if (chainId == CHAIN_ETHEREUM) { - routerImpl = address(new AngleRouterMainnet()); - } else if (chainId == CHAIN_ARBITRUM) { - routerImpl = address(new AngleRouterArbitrum()); - } else if (chainId == CHAIN_OPTIMISM) { - routerImpl = address(new AngleRouterOptimism()); - } else if (chainId == CHAIN_AVALANCHE) { - routerImpl = address(new AngleRouterAvalanche()); - } else if (chainId == CHAIN_BASE) { - routerImpl = address(new AngleRouterBase()); - } else if (chainId == CHAIN_CELO) { - routerImpl = address(new AngleRouterCelo()); - } else if (chainId == CHAIN_GNOSIS) { - routerImpl = address(new AngleRouterGnosis()); - } else if (chainId == CHAIN_LINEA) { - routerImpl = address(new AngleRouterLinea()); - } else if (chainId == CHAIN_POLYGON) { - routerImpl = address(new AngleRouterPolygon()); + console.log("Deployed router implementation at address: %s", routerImpl); } - - console.log("Deployed router implementation at address: %s", routerImpl); -} - }