Commit ec15b130 authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: more fixups

parent 8fa75e4b
...@@ -6,9 +6,9 @@ import '@nomiclabs/hardhat-ethers' ...@@ -6,9 +6,9 @@ import '@nomiclabs/hardhat-ethers'
import { assertContractVariable, deploy } from '../src/deploy-utils' import { assertContractVariable, deploy } from '../src/deploy-utils'
const deployFn: DeployFunction = async (hre) => { const deployFn: DeployFunction = async (hre) => {
const Artifact__L1CrossDomainMessenger = await hre.deployments.get( const Artifact__L1CrossDomainMessenger = await hre.companionNetworks[
'L1CrossDomainMessenger' 'l1'
) ].deployments.get('L1CrossDomainMessengerProxy')
await deploy({ await deploy({
hre, hre,
......
...@@ -6,9 +6,9 @@ import '@nomiclabs/hardhat-ethers' ...@@ -6,9 +6,9 @@ import '@nomiclabs/hardhat-ethers'
import { assertContractVariable, deploy } from '../src/deploy-utils' import { assertContractVariable, deploy } from '../src/deploy-utils'
const deployFn: DeployFunction = async (hre) => { const deployFn: DeployFunction = async (hre) => {
const Artifact__L1StandardBridge = await hre.deployments.get( const Artifact__L1StandardBridge = await hre.companionNetworks[
'L1StandardBridge' 'l1'
) ].deployments.get('L1StandardBridgeProxy')
await deploy({ await deploy({
hre, hre,
......
...@@ -6,10 +6,10 @@ import { ethers } from 'ethers' ...@@ -6,10 +6,10 @@ import { ethers } from 'ethers'
import { predeploys } from '../src/constants' import { predeploys } from '../src/constants'
import { assertContractVariable, deploy } from '../src/deploy-utils' import { assertContractVariable, deploy } from '../src/deploy-utils'
// TODO: should be proxy and should be companion network
const deployFn: DeployFunction = async (hre) => { const deployFn: DeployFunction = async (hre) => {
const Artifact__L1ERC721Bridge = await hre.deployments.get('L1ERC721Bridge') const Artifact__L1ERC721Bridge = await hre.companionNetworks[
'l1'
].deployments.get('L1ERC721BridgeProxy')
await deploy({ await deploy({
hre, hre,
......
import { DeployFunction } from 'hardhat-deploy/dist/types' import { DeployFunction } from 'hardhat-deploy/dist/types'
import '@eth-optimism/hardhat-deploy-config' import '@eth-optimism/hardhat-deploy-config'
import '@nomiclabs/hardhat-ethers' import '@nomiclabs/hardhat-ethers'
import { ethers } from 'ethers'
import { assertContractVariable, deploy } from '../src/deploy-utils' import { assertContractVariable, deploy } from '../src/deploy-utils'
const deployFn: DeployFunction = async (hre) => { const deployFn: DeployFunction = async (hre) => {
const sequencerFeeVaultRecipient = hre.deployConfig.sequencerFeeVaultRecipient
if (sequencerFeeVaultRecipient === ethers.constants.AddressZero) {
throw new Error(`SequencerFeeVault RECIPIENT undefined`)
}
await deploy({ await deploy({
hre, hre,
name: 'SequencerFeeVault', name: 'SequencerFeeVault',
args: [hre.deployConfig.sequencerFeeVaultRecipient], args: [sequencerFeeVaultRecipient],
postDeployAction: async (contract) => { postDeployAction: async (contract) => {
await assertContractVariable( await assertContractVariable(
contract, contract,
'RECIPIENT', 'RECIPIENT',
hre.deployConfig.sequencerFeeVaultRecipient ethers.utils.getAddress(sequencerFeeVaultRecipient)
) )
}, },
}) })
......
import { DeployFunction } from 'hardhat-deploy/dist/types' import { DeployFunction } from 'hardhat-deploy/dist/types'
import '@eth-optimism/hardhat-deploy-config' import '@eth-optimism/hardhat-deploy-config'
import '@nomiclabs/hardhat-ethers' import '@nomiclabs/hardhat-ethers'
import { ethers } from 'ethers'
import { assertContractVariable, deploy } from '../src/deploy-utils' import { assertContractVariable, deploy } from '../src/deploy-utils'
const deployFn: DeployFunction = async (hre) => { const deployFn: DeployFunction = async (hre) => {
const baseFeeVaultRecipient = hre.deployConfig.baseFeeVaultRecipient
if (baseFeeVaultRecipient === ethers.constants.AddressZero) {
throw new Error('BaseFeeVault RECIPIENT undefined')
}
await deploy({ await deploy({
hre, hre,
name: 'BaseFeeVault', name: 'BaseFeeVault',
args: [hre.deployConfig.baseFeeVaultRecipient], args: [baseFeeVaultRecipient],
postDeployAction: async (contract) => { postDeployAction: async (contract) => {
await assertContractVariable( await assertContractVariable(
contract, contract,
'RECIPIENT', 'RECIPIENT',
hre.deployConfig.baseFeeVaultRecipient ethers.utils.getAddress(baseFeeVaultRecipient)
) )
}, },
}) })
......
import { DeployFunction } from 'hardhat-deploy/dist/types' import { DeployFunction } from 'hardhat-deploy/dist/types'
import '@eth-optimism/hardhat-deploy-config' import '@eth-optimism/hardhat-deploy-config'
import '@nomiclabs/hardhat-ethers' import '@nomiclabs/hardhat-ethers'
import { ethers } from 'ethers'
import { assertContractVariable, deploy } from '../src/deploy-utils' import { assertContractVariable, deploy } from '../src/deploy-utils'
const deployFn: DeployFunction = async (hre) => { const deployFn: DeployFunction = async (hre) => {
const l1FeeVaultRecipient = hre.deployConfig.l1FeeVaultRecipient
if (l1FeeVaultRecipient === ethers.constants.AddressZero) {
throw new Error('L1FeeVault RECIPIENT undefined')
}
await deploy({ await deploy({
hre, hre,
name: 'L1FeeVault', name: 'L1FeeVault',
args: [hre.deployConfig.l1FeeVaultRecipient], args: [l1FeeVaultRecipient],
postDeployAction: async (contract) => { postDeployAction: async (contract) => {
await assertContractVariable( await assertContractVariable(
contract, contract,
'RECIPIENT', 'RECIPIENT',
hre.deployConfig.l1FeeVaultRecipient ethers.utils.getAddress(l1FeeVaultRecipient)
) )
}, },
}) })
......
...@@ -50,6 +50,17 @@ const config: HardhatUserConfig = { ...@@ -50,6 +50,17 @@ const config: HardhatUserConfig = {
chainId: 5, chainId: 5,
url: process.env.L1_RPC || '', url: process.env.L1_RPC || '',
accounts: [process.env.PRIVATE_KEY_DEPLOYER || ethers.constants.HashZero], accounts: [process.env.PRIVATE_KEY_DEPLOYER || ethers.constants.HashZero],
companionNetworks: {
l2: 'optimism-goerli',
},
},
'optimism-goerli': {
chainId: 420,
url: process.env.L2_RPC || '',
accounts: [process.env.PRIVATE_KEY_DEPLOYER || ethers.constants.HashZero],
companionNetworks: {
l1: 'goerli',
},
}, },
'alpha-1': { 'alpha-1': {
chainId: 5, chainId: 5,
......
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