Commit 63142c94 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge pull request #3878 from ethereum-optimism/sc/ctb-msd-checks

feat(ctb): add MigrationSystemDictator checks
parents 78826a13 fe163071
...@@ -46,6 +46,22 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -46,6 +46,22 @@ const deployFn: DeployFunction = async (hre) => {
} }
} }
if (
hre.deployConfig.l2OutputOracleGenesisL2Output === ethers.constants.HashZero
) {
if (hre.network.config.live === false) {
console.log(`WARNING!!!`)
console.log(`WARNING!!!`)
console.log(`WARNING!!!`)
console.log(`WARNING!!! A genesis L2 output was not provided.`)
console.log(
`WARNING!!! Make sure you are ONLY doing this on a test network.`
)
} else {
throw new Error(`must specify the finalSystemOwner on live networks`)
}
}
const config = await makeDictatorConfig(hre, controller, finalOwner, false) const config = await makeDictatorConfig(hre, controller, finalOwner, false)
await deployAndVerifyAndThen({ await deployAndVerifyAndThen({
hre, hre,
......
...@@ -299,6 +299,21 @@ export const getContractFromArtifact = async ( ...@@ -299,6 +299,21 @@ export const getContractFromArtifact = async (
}) })
} }
export const getContractsFromArtifacts = async (
hre: any,
configs: Array<{
name: string
iface?: string
signerOrProvider?: Signer | Provider | string
}>
): Promise<ethers.Contract[]> => {
const contracts = []
for (const config of configs) {
contracts.push(await getContractFromArtifact(hre, config.name, config))
}
return contracts
}
export const isHardhatNode = async (hre) => { export const isHardhatNode = async (hre) => {
return (await getChainId(hre.ethers.provider)) === 31337 return (await getChainId(hre.ethers.provider)) === 31337
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment