diff --git a/scripts/deploy/config/config.ts b/scripts/deploy/config/config.ts index be0e2255..1804a4a3 100644 --- a/scripts/deploy/config/config.ts +++ b/scripts/deploy/config/config.ts @@ -172,12 +172,6 @@ export const overrides = ( gasLimit: 4_000_000, gasPrice: 30_000_000_000, }; - } else if (chain == ChainSlug.GOERLI) { - return { - type, - gasLimit: 3_000_000, - gasPrice, - }; } else if (chain == ChainSlug.POLYGON_MAINNET) { return { type, @@ -186,9 +180,9 @@ export const overrides = ( }; } else if (chain == ChainSlug.SEPOLIA) { return { - // type, - // gasLimit: 2_000_000, - // gasPrice: 250_000_000_000, + // type: 1, + gasLimit: 2_000_000, + // gasPrice: 180_000_000_000, }; } else if (chain == ChainSlug.AEVO_TESTNET) { return { @@ -214,12 +208,6 @@ export const overrides = ( // gasLimit, // gasPrice: 100_000_000, }; - } else if (chain == ChainSlug.XAI_TESTNET) { - return { - // type: 1, - // gasLimit, - // gasPrice: 100_000_000, - }; } else if (chain == ChainSlug.SX_NETWORK_TESTNET) { return { // type: 1, @@ -244,12 +232,6 @@ export const overrides = ( gasLimit: 500_000_000, gasPrice: 1_000_000, }; - } else if (chain == ChainSlug.VICTION_TESTNET) { - return { - // type: 1, - // gasLimit, - // gasPrice: 100_000_000, - }; } else if (chain == ChainSlug.HOOK) { return { // type: 1, diff --git a/scripts/deploy/em-migration/migrate-em.ts b/scripts/deploy/em-migration/migrate-em.ts index b8f41644..9c712b08 100644 --- a/scripts/deploy/em-migration/migrate-em.ts +++ b/scripts/deploy/em-migration/migrate-em.ts @@ -1,6 +1,7 @@ require("dotenv").config(); import { CORE_CONTRACTS, + ChainSlug, DeploymentAddresses, DeploymentMode, MainnetIds, @@ -15,43 +16,8 @@ import prompts from "prompts"; const deploymentMode = process.env.DEPLOYMENT_MODE as DeploymentMode; const emVersion = CORE_CONTRACTS.ExecutionManagerDF; -const deploy = async () => { +const deploy = async (chains: ChainSlug[]) => { try { - const response = await prompts([ - { - name: "chainType", - type: "select", - message: "Select chains network type", - choices: [ - { - title: "Mainnet", - value: "mainnet", - }, - { - title: "Testnet", - value: "testnet", - }, - ], - }, - ]); - - const chainOptions = - response.chainType === "mainnet" ? MainnetIds : TestnetIds; - let choices = chainOptions.map((chain) => ({ - title: chain.toString(), - value: chain, - })); - - const configResponse = await prompts([ - { - name: "chains", - type: "multiselect", - message: "Select sibling chains to connect", - choices, - }, - ]); - - const chains = [...configResponse.chains]; const addresses: DeploymentAddresses = await deployForChains( chains, emVersion @@ -62,12 +28,13 @@ const deploy = async () => { } }; -const configure = async () => { +const configure = async (chains: ChainSlug[]) => { try { - let addresses: DeploymentAddresses = getAllAddresses(deploymentMode); - const chains = [...MainnetIds, ...TestnetIds]; - - addresses = await configureSwitchboards(addresses, chains, emVersion); + const addresses: DeploymentAddresses = await deployForChains( + chains, + emVersion + ); + await configureSwitchboards(addresses, chains, emVersion); } catch (error) { console.log("Error:", error); } @@ -90,14 +57,47 @@ const main = async () => { }, ], }, + { + name: "chainType", + type: "select", + message: "Select chains network type", + choices: [ + { + title: "Mainnet", + value: "mainnet", + }, + { + title: "Testnet", + value: "testnet", + }, + ], + }, ]); + const chainOptions = + response.chainType === "mainnet" ? MainnetIds : TestnetIds; + let choices = chainOptions.map((chain) => ({ + title: chain.toString(), + value: chain, + })); + + const configResponse = await prompts([ + { + name: "chains", + type: "multiselect", + message: "Select sibling chains to connect", + choices, + }, + ]); + + const chains = [...configResponse.chains]; + switch (response.action) { case "configure": - await configure(); + await configure(chains); break; case "deploy": - await deploy(); + await deploy(chains); break; case "exit": process.exit(0);