Commit 966e1b19 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

Merge pull request #3119 from ethereum-optimism/ctb/genesis-l2-immutables

contracts-bedrock: in place handling of immutables
parents 64337ed5 1124f30c
---
'@eth-optimism/contracts-bedrock': patch
---
Update genesis-l2 task to set immutables in the bytecode
......@@ -451,7 +451,6 @@ jobs:
name: Do a deposit
no_output_timeout: 5m
command: |
npx hardhat compile
npx hardhat deposit \
--to 0xB79f76EF2c5F0286176833E7B2eEe103b1CC3244 \
--amount-eth 1 \
......@@ -460,8 +459,11 @@ jobs:
working_directory: packages/contracts-bedrock
- run:
name: Check the status
command: |
npx hardhat check-op-node
command: npx hardhat check-op-node
working_directory: packages/contracts-bedrock
- run:
name: Check L2 Config
command: npx hardhat check-l2-config
working_directory: packages/contracts-bedrock
integration-tests:
......
......@@ -15,6 +15,7 @@ import './tasks/deposits'
import './tasks/rekey'
import './tasks/rollup-config'
import './tasks/check-op-node'
import './tasks/check-l2-config'
subtask(TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS).setAction(
async (_, __, runSuper) => {
......
import { task, types } from 'hardhat/config'
import { providers } from 'ethers'
import '@nomiclabs/hardhat-ethers'
import { predeploys, getContractInterface } from '../src'
task('check-l2-config', 'Validate L2 config')
.addParam(
'l2ProviderUrl',
'L2 provider URL.',
'http://localhost:9545',
types.string
)
.setAction(async (args, hre) => {
const { l2ProviderUrl } = args
const l2Provider = new providers.JsonRpcProvider(l2ProviderUrl)
const OptimismMintableERC20Factory = new hre.ethers.Contract(
predeploys.OptimismMintableERC20Factory,
getContractInterface('OptimismMintableERC20Factory'),
l2Provider
)
const bridge = await OptimismMintableERC20Factory.bridge()
console.log(`OptimismMintableERC20Factory.bridge() -> ${bridge}`)
if (bridge !== predeploys.L2StandardBridge) {
throw new Error(
`L2StandardBridge not set correctly. Got ${bridge}, expected ${predeploys.L2StandardBridge}`
)
}
})
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