Commit 18c94970 authored by Matthew Slipper's avatar Matthew Slipper Committed by GitHub

Merge pull request #2224 from mslipper/feat/auto-transfer-ownership

packages/contracts: Add flag to automatically set ownership
parents b5f37097 8ed16264
......@@ -74,7 +74,10 @@ const deployFn: DeployFunction = async (hre) => {
// Check if if we're on the hardhat chain ID. This will only happen in CI. If this is the case, we
// can skip directly to transferring ownership over to the ChugSplashDictator contract.
if (await isHardhatNode(hre)) {
if (
(await isHardhatNode(hre)) ||
process.env.AUTOMATICALLY_TRANSFER_OWNERSHIP === 'true'
) {
const owner = await hre.ethers.getSigner(currentOwner)
await Lib_AddressManager.connect(owner).transferOwnership(
AddressDictator.address
......
......@@ -86,7 +86,10 @@ const deployFn: DeployFunction = async (hre) => {
// Check if if we're on the hardhat chain ID. This will only happen in CI. If this is the case, we
// can skip directly to transferring ownership over to the ChugSplashDictator contract.
if (await isHardhatNode(hre)) {
if (
(await isHardhatNode(hre)) ||
process.env.AUTOMATICALLY_TRANSFER_OWNERSHIP === 'true'
) {
const owner = await hre.ethers.getSigner(currentOwner)
await Proxy__OVM_L1StandardBridge.connect(owner).setOwner(
ChugSplashDictator.address
......
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