Commit 20747fd5 authored by smartcontracts's avatar smartcontracts Committed by GitHub

feat[contracts]: have hardhat-deploy register L1MultiMessageRelayer on mainnet (#828)

* feat[contracts]: have deploy register multi message relayer on L1

* chore: add changeset

* fix: minor typo in comment

* fix: remove unnecessary changes
parent 6132e7ab
---
'@eth-optimism/contracts': patch
---
Set L2MessageRelayer name to L1MultiMessageRelayer when deploying to mainnet
......@@ -5,6 +5,7 @@ import { DeployFunction } from 'hardhat-deploy/dist/types'
import {
deployAndRegister,
getDeployedContract,
registerAddress,
} from '../src/hardhat-deploy-ethers'
const deployFn: DeployFunction = async (hre) => {
......@@ -18,6 +19,20 @@ const deployFn: DeployFunction = async (hre) => {
name: 'OVM_L1MultiMessageRelayer',
args: [Lib_AddressManager.address],
})
// OVM_L2MessageRelayer *must* be set to multi message relayer address on mainnet.
if (hre.network.name.includes('mainnet')) {
const OVM_L1MultiMessageRelayer = await getDeployedContract(
hre,
'OVM_L1MultiMessageRelayer'
)
await registerAddress({
hre,
name: 'OVM_L2MessageRelayer',
address: OVM_L1MultiMessageRelayer.address
})
}
}
deployFn.dependencies = ['Lib_AddressManager']
......
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