Skip to content

Commit

Permalink
style: prettier script
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtekgrinder committed Aug 6, 2024
1 parent 8976217 commit 007b784
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions scripts/foundry/UpgradeRouter.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}

0 comments on commit 007b784

Please sign in to comment.