Commit fe163071 authored by Kelvin Fichter's avatar Kelvin Fichter

feat(ctb): add MigrationSystemDictator checks

Adds checks for the MigrationSystemDictator steps.
parent 9dad975a
......@@ -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)
await deployAndVerifyAndThen({
hre,
......
......@@ -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) => {
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