Commit b1903016 authored by Andreas Bigger's avatar Andreas Bigger Committed by Mark Tyneway

Initialize dgf in constructor

parent 3c228713
...@@ -7,17 +7,15 @@ import { deploy } from '../src/deploy-utils' ...@@ -7,17 +7,15 @@ 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) { if (hre.deployConfig.l1ChainID === 900) {
const finalOwner = hre.deployConfig.finalSystemOwner
const disputeGameFactory = await deploy({ const disputeGameFactory = await deploy({
hre, hre,
name: 'DisputeGameFactory', name: 'DisputeGameFactory',
args: [], args: [finalOwner],
}) })
console.log('DisputeGameFactory deployed at ' + disputeGameFactory.address)
const finalOwner = hre.deployConfig.finalSystemOwner
await disputeGameFactory.initialize(finalOwner)
const fetchedOwner = await disputeGameFactory.owner() const fetchedOwner = await disputeGameFactory.owner()
assert(fetchedOwner === finalOwner) assert(fetchedOwner === finalOwner)
console.log('DisputeGameFactory implementation initialized') console.log('DisputeGameFactory deployed at ' + disputeGameFactory.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