Commit 9d534997 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

Merge pull request #6131 from ethereum-optimism/cleanup/periphery-dead-code

contracts-periphery: delete dead code
parents da9ddd77 609bf2a7
#!/bin/bash
set -e
L1_NETWORK=ops-l1
L2_NETWORK=ops-l2
# Step 1: deploy the Proxy to the predeploy address on L2
npx hardhat deploy --tags L2ERC721BridgeProxy --network $L2_NETWORK
# Step 2: deploy the Proxy for the L1ERC721Bridge to L1
npx hardhat deploy --tags L1ERC721BridgeProxy --network $L1_NETWORK
# Step 3: deploy the L2ERC721Bridge implementation
npx hardhat deploy --tags L2ERC721BridgeImplementation --network $L2_NETWORK
# Step 4: deploy the L1ERC721Bridge implementation to L1
npx hardhat deploy --tags L1ERC721BridgeImplementation --network $L1_NETWORK
# Step 5: deploy the Proxy for the OptimismMintableERC721Factory to L2
npx hardhat deploy --tags OptimismMintableERC721FactoryProxy --network $L2_NETWORK
# Step 6: deploy the OptimismMintableERC721Factory to L2
npx hardhat deploy --tags OptimismMintableERC721FactoryImplementation --network $L2_NETWORK
import { utils } from 'ethers'
// https://optimistic.etherscan.io/address/0x2501c477d0a35545a387aa4a3eee4292a9a8b3f0
export const l2MainnetMultisig = '0x2501c477D0A35545a387Aa4A3EEe4292A9a8B3F0'
// https://etherscan.io/address/0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A
export const l1MainnetMultisig = '0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A'
// https://goerli.etherscan.io/address/0xf80267194936da1E98dB10bcE06F3147D580a62e
export const goerliAdmin = '0xf80267194936da1E98dB10bcE06F3147D580a62e'
export const predeploy = '0x4200000000000000000000000000000000000014'
export const predeployDeployer = '0xdfc82d475833a50de90c642770f34a9db7deb725'
export const isTargetL2Network = (network: string): boolean => {
switch (network) {
case 'optimism':
case 'optimism-goerli':
case 'ops-l2':
case 'optimism-kovan':
return true
default:
return false
}
}
export const isTargetL1Network = (network: string): boolean => {
switch (network) {
case 'mainnet':
case 'ethereum':
case 'goerli':
case 'ops-l1':
case 'kovan':
return true
default:
return false
}
}
export const getProxyAdmin = (network: string): string => {
switch (network) {
case 'optimism':
return l2MainnetMultisig
case 'mainnet':
case 'ethereum':
return l1MainnetMultisig
case 'kovan':
case 'optimism-kovan':
return goerliAdmin
case 'goerli':
case 'optimism-goerli':
return goerliAdmin
case 'ops-l1':
case 'ops-l2':
return predeployDeployer
default:
throw new Error(`unknown network ${network}`)
}
}
export const validateERC721Bridge = async (hre, address: string, expected) => {
const L1ERC721Bridge = await hre.ethers.getContractAt('ERC721Bridge', address)
const messenger = await L1ERC721Bridge.messenger()
const otherBridge = await L1ERC721Bridge.otherBridge()
if (utils.getAddress(messenger) !== utils.getAddress(expected.messenger)) {
throw new Error(`messenger mismatch`)
}
if (
utils.getAddress(otherBridge) !== utils.getAddress(expected.otherBridge)
) {
throw new Error(`otherBridge mismatch`)
}
}
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