Commit 780fc0f5 authored by Mark Tyneway's avatar Mark Tyneway

deployments: fix merge conflict

parent 9469e611
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
import { DeployFunction } from 'hardhat-deploy/dist/types' import { DeployFunction } from 'hardhat-deploy/dist/types'
import { deploy } from '../src/deploy-utils' import { deploy } from '../src/deploy-utils'
const deployFn: DeployFunction = async (hre) => { const deployFn: DeployFunction = async (hre) => {
// We only want to deploy the dgf on devnet for now // We only want to deploy the dgf on devnet for now
if (hre.deployConfig.l1ChainID === 900) { const network = await hre.ethers.provider.getNetwork()
const disputeGameFactory = await deploy({ const chainId = network.chainId
hre,
name: 'DisputeGameFactory',
args: [],
})
console.log('DisputeGameFactory deployed at ' + disputeGameFactory.address)
}
}
deployFn.tags = ['DisputeGameFactoryImpl', 'setup', 'l1']
export default deployFn if (chainId === 900) {
||||||| parent of b998a6a67 (DisputeGameFactory devnet deploy scripts)
=======
import assert from 'assert'
||||||| parent of 4c1b5e2ac (Remove final owner from dgf impl initialization.)
import assert from 'assert'
=======
>>>>>>> 4c1b5e2ac (Remove final owner from dgf impl initialization.)
import { DeployFunction } from 'hardhat-deploy/dist/types'
import { deploy } from '../src/deploy-utils'
const deployFn: DeployFunction = async (hre) => {
// We only want to deploy the dgf on devnet for now
if (hre.deployConfig.l1ChainID === 900) {
const disputeGameFactory = await deploy({ const disputeGameFactory = await deploy({
hre, hre,
name: 'DisputeGameFactory', name: 'DisputeGameFactory',
args: [], args: [],
}) })
console.log('DisputeGameFactory deployed at ' + disputeGameFactory.address) console.log(`DisputeGameFactory deployed at ${disputeGameFactory.address}`)
} } else {
} console.log('Skipping deployment of DisputeGameFactory implementation')
deployFn.tags = ['DisputeGameFactoryImpl', 'setup', 'l1']
export default deployFn
>>>>>>> b998a6a67 (DisputeGameFactory devnet deploy scripts)
||||||| parent of f8dc1be47 (DisputeGameFactory devnet deploy scripts)
=======
import assert from 'assert'
import { DeployFunction } from 'hardhat-deploy/dist/types'
import { deploy } from '../src/deploy-utils'
const deployFn: DeployFunction = async (hre) => {
// We only want to deploy the dgf on devnet for now
if (hre.deployConfig.l1ChainID === 900) {
const finalOwner = hre.deployConfig.finalSystemOwner
const disputeGameFactory = await deploy({
hre,
name: 'DisputeGameFactory',
args: [finalOwner],
})
const fetchedOwner = await disputeGameFactory.owner()
assert(fetchedOwner === finalOwner)
console.log('DisputeGameFactory deployed at ' + disputeGameFactory.address)
} }
} }
deployFn.tags = ['DisputeGameFactoryImpl', 'setup', 'l1'] deployFn.tags = ['DisputeGameFactoryImpl', 'setup', 'l1']
export default deployFn export default deployFn
>>>>>>> f8dc1be47 (DisputeGameFactory devnet deploy scripts)
...@@ -7,8 +7,12 @@ import 'hardhat-deploy' ...@@ -7,8 +7,12 @@ import 'hardhat-deploy'
import { getContractsFromArtifacts } from '../src/deploy-utils' import { getContractsFromArtifacts } from '../src/deploy-utils'
const deployFn: DeployFunction = async (hre) => { const deployFn: DeployFunction = async (hre) => {
// We only want to deploy the dgf on devnet for now
const network = await hre.ethers.provider.getNetwork()
const chainId = network.chainId
// The DisputeGameFactory is only deployed on devnet // The DisputeGameFactory is only deployed on devnet
if (hre.deployConfig.l1ChainID === 900) { if (chainId === 900) {
const { deployer } = await hre.getNamedAccounts() const { deployer } = await hre.getNamedAccounts()
const [proxyAdmin, disputeGameFactoryProxy, disputeGameFactoryImpl] = const [proxyAdmin, disputeGameFactoryProxy, disputeGameFactoryImpl] =
await getContractsFromArtifacts(hre, [ await getContractsFromArtifacts(hre, [
...@@ -45,6 +49,8 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -45,6 +49,8 @@ const deployFn: DeployFunction = async (hre) => {
assert(fetchedOwner === finalOwner) assert(fetchedOwner === finalOwner)
console.log('Updgraded and initialized DisputeGameFactory') console.log('Updgraded and initialized DisputeGameFactory')
} else {
console.log('Skipping initialization of DisputeGameFactory')
} }
} }
......
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