Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.

cleanup: Use standard registerAddress fn in deploy #379

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions deploy/006-mockOVM_BondManager.deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
import { DeployFunction } from 'hardhat-deploy/dist/types'

/* Imports: Internal */
import { getDeployedContract } from '../src/hardhat-deploy-ethers'
import {
getDeployedContract,
registerAddress,
} from '../src/hardhat-deploy-ethers'

const deployFn: DeployFunction = async (hre) => {
const { deploy } = hre.deployments
Expand All @@ -26,7 +29,11 @@ const deployFn: DeployFunction = async (hre) => {
return
}

await Lib_AddressManager.setAddress('OVM_BondManager', result.address)
await registerAddress({
hre,
name: 'OVM_BondManager',
address: result.address,
})
}

deployFn.dependencies = ['Lib_AddressManager']
Expand Down
14 changes: 9 additions & 5 deletions deploy/007-OVM_L1CrossDomainMessenger.deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
import { DeployFunction } from 'hardhat-deploy/dist/types'

/* Imports: Internal */
import { getDeployedContract } from '../src/hardhat-deploy-ethers'
import {
getDeployedContract,
registerAddress,
} from '../src/hardhat-deploy-ethers'

const deployFn: DeployFunction = async (hre) => {
const { deploy } = hre.deployments
Expand Down Expand Up @@ -50,10 +53,11 @@ const deployFn: DeployFunction = async (hre) => {
)
}

await Lib_AddressManager.setAddress(
'OVM_L1CrossDomainMessenger',
result.address
)
await registerAddress({
hre,
name: 'OVM_L1CrossDomainMessenger',
address: OVM_L1CrossDomainMessenger.address,
})
}

deployFn.dependencies = ['Lib_AddressManager']
Expand Down
14 changes: 9 additions & 5 deletions deploy/008-Proxy__OVM_L1CrossDomainMessenger.deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
import { DeployFunction } from 'hardhat-deploy/dist/types'

/* Imports: Internal */
import { getDeployedContract } from '../src/hardhat-deploy-ethers'
import {
getDeployedContract,
registerAddress,
} from '../src/hardhat-deploy-ethers'

const deployFn: DeployFunction = async (hre) => {
const { deploy } = hre.deployments
Expand Down Expand Up @@ -49,10 +52,11 @@ const deployFn: DeployFunction = async (hre) => {
)
}

await Lib_AddressManager.setAddress(
'Proxy__OVM_L1CrossDomainMessenger',
result.address
)
await registerAddress({
hre,
name: 'Proxy__OVM_L1CrossDomainMessenger',
address: Proxy__OVM_L1CrossDomainMessenger.address,
})
}

deployFn.dependencies = ['Lib_AddressManager', 'OVM_L1CrossDomainMessenger']
Expand Down
11 changes: 9 additions & 2 deletions deploy/015-OVM_L1ETHGateway.deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
import { DeployFunction } from 'hardhat-deploy/dist/types'

/* Imports: Internal */
import { getDeployedContract } from '../src/hardhat-deploy-ethers'
import {
getDeployedContract,
registerAddress,
} from '../src/hardhat-deploy-ethers'
import { predeploys } from '../src/predeploys'

const deployFn: DeployFunction = async (hre) => {
Expand Down Expand Up @@ -50,7 +53,11 @@ const deployFn: DeployFunction = async (hre) => {
)
}

await Lib_AddressManager.setAddress('OVM_L1ETHGateway', result.address)
await registerAddress({
hre,
name: 'OVM_L1ETHGateway',
address: OVM_L1ETHGateway.address,
})
}

deployFn.dependencies = ['Lib_AddressManager']
Expand Down
11 changes: 9 additions & 2 deletions deploy/016-Proxy__OVM_L1ETHGateway.deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
import { DeployFunction } from 'hardhat-deploy/dist/types'

/* Imports: Internal */
import { getDeployedContract } from '../src/hardhat-deploy-ethers'
import {
getDeployedContract,
registerAddress,
} from '../src/hardhat-deploy-ethers'
import { predeploys } from '../src/predeploys'

const deployFn: DeployFunction = async (hre) => {
Expand Down Expand Up @@ -53,7 +56,11 @@ const deployFn: DeployFunction = async (hre) => {
)
}

await Lib_AddressManager.setAddress('Proxy__OVM_L1ETHGateway', result.address)
await registerAddress({
hre,
name: 'Proxy__OVM_L1ETHGateway',
address: Proxy__OVM_L1ETHGateway.address,
})
}

deployFn.dependencies = ['Lib_AddressManager', 'OVM_L1ETHGateway']
Expand Down