Commit e81a6ff5 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

contracts-periphery: deploy erc721 bridge (#3621)

* ctp: deploy goerli nft bridge fixes

Test on kovan

* ctp: goerli nft bridge deployment artifacts

* ctp: delete kovan bridge artifacts

* ctp: revert deploy script

* ctp: add goerli nft bridge deployment changeset
parent 80993f5e
---
'@eth-optimism/contracts-periphery': patch
---
Goerli nft bridge deployment
...@@ -27,6 +27,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -27,6 +27,7 @@ const deployFn: DeployFunction = async (hre) => {
const goerliDeployer = getAddress( const goerliDeployer = getAddress(
'0x5c679a57e018f5f146838138d3e032ef4913d551' '0x5c679a57e018f5f146838138d3e032ef4913d551'
) )
const kovanDeployer = getAddress('0xa81224490b9fa4930a2e920550cd1c9106bb6d9e')
const localDeployer = getAddress('0xdfc82d475833a50de90c642770f34a9db7deb725') const localDeployer = getAddress('0xdfc82d475833a50de90c642770f34a9db7deb725')
// Deploy the L2ERC721BridgeProxy as a predeploy address // Deploy the L2ERC721BridgeProxy as a predeploy address
...@@ -42,6 +43,10 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -42,6 +43,10 @@ const deployFn: DeployFunction = async (hre) => {
if (getAddress(deployer) !== localDeployer) { if (getAddress(deployer) !== localDeployer) {
throw new Error(`Incorrect deployer: ${deployer}`) throw new Error(`Incorrect deployer: ${deployer}`)
} }
} else if (hre.network.name === 'optimism-kovan') {
if (getAddress(deployer) !== kovanDeployer) {
throw new Error(`Incorrect deployer: ${deployer}`)
}
} else { } else {
throw new Error(`Unknown network: ${hre.network.name}`) throw new Error(`Unknown network: ${hre.network.name}`)
} }
......
...@@ -36,6 +36,8 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -36,6 +36,8 @@ const deployFn: DeployFunction = async (hre) => {
remoteChainId = 5 remoteChainId = 5
} else if (hre.network.name === 'ops-l2') { } else if (hre.network.name === 'ops-l2') {
remoteChainId = 31337 remoteChainId = 31337
} else if (hre.network.name === 'optimism-kovan') {
remoteChainId = 42
} else { } else {
remoteChainId = hre.deployConfig.remoteChainId remoteChainId = hre.deployConfig.remoteChainId
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -64,6 +64,9 @@ const config: HardhatUserConfig = { ...@@ -64,6 +64,9 @@ const config: HardhatUserConfig = {
apiKey: getenv('OPTIMISTIC_ETHERSCAN_API_KEY'), apiKey: getenv('OPTIMISTIC_ETHERSCAN_API_KEY'),
}, },
}, },
companionNetworks: {
l1: 'kovan',
},
}, },
'optimism-goerli': { 'optimism-goerli': {
chainId: 420, chainId: 420,
...@@ -123,6 +126,9 @@ const config: HardhatUserConfig = { ...@@ -123,6 +126,9 @@ const config: HardhatUserConfig = {
apiKey: getenv('ETHEREUM_ETHERSCAN_API_KEY'), apiKey: getenv('ETHEREUM_ETHERSCAN_API_KEY'),
}, },
}, },
companionNetworks: {
l2: 'optimism-kovan',
},
}, },
'ops-l2': { 'ops-l2': {
chainId: 17, chainId: 17,
...@@ -149,6 +155,18 @@ const config: HardhatUserConfig = { ...@@ -149,6 +155,18 @@ const config: HardhatUserConfig = {
paths: { paths: {
deployConfig: './config/deploy', deployConfig: './config/deploy',
}, },
external: {
contracts: [
{
artifacts: '../contracts/artifacts',
},
],
deployments: {
goerli: ['../contracts/deployments/goerli'],
kovan: ['../contracts/deployments/kovan'],
ethereum: ['../contracts/deployments/mainnet'],
},
},
deployConfigSpec: configSpec, deployConfigSpec: configSpec,
mocha: { mocha: {
timeout: 50000, timeout: 50000,
......
...@@ -20,5 +20,5 @@ npx hardhat deploy --tags L1ERC721BridgeImplementation --network $L1_NETWORK ...@@ -20,5 +20,5 @@ npx hardhat deploy --tags L1ERC721BridgeImplementation --network $L1_NETWORK
# Step 5: deploy the Proxy for the OptimismMintableERC721Factory to L2 # Step 5: deploy the Proxy for the OptimismMintableERC721Factory to L2
npx hardhat deploy --tags OptimismMintableERC721FactoryProxy --network $L2_NETWORK npx hardhat deploy --tags OptimismMintableERC721FactoryProxy --network $L2_NETWORK
# Step 5: deploy the OptimismMintableERC721Factory to L2 # Step 6: deploy the OptimismMintableERC721Factory to L2
npx hardhat deploy --tags OptimismMintableERC721FactoryImplementation --network $L2_NETWORK npx hardhat deploy --tags OptimismMintableERC721FactoryImplementation --network $L2_NETWORK
...@@ -14,6 +14,7 @@ export const isTargetL2Network = (network: string): boolean => { ...@@ -14,6 +14,7 @@ export const isTargetL2Network = (network: string): boolean => {
case 'optimism': case 'optimism':
case 'optimism-goerli': case 'optimism-goerli':
case 'ops-l2': case 'ops-l2':
case 'optimism-kovan':
return true return true
default: default:
return false return false
...@@ -25,6 +26,7 @@ export const isTargetL1Network = (network: string): boolean => { ...@@ -25,6 +26,7 @@ export const isTargetL1Network = (network: string): boolean => {
case 'mainnet': case 'mainnet':
case 'goerli': case 'goerli':
case 'ops-l1': case 'ops-l1':
case 'kovan':
return true return true
default: default:
return false return false
...@@ -37,6 +39,9 @@ export const getProxyAdmin = (network: string): string => { ...@@ -37,6 +39,9 @@ export const getProxyAdmin = (network: string): string => {
return l2MainnetMultisig return l2MainnetMultisig
case 'mainnet': case 'mainnet':
return l1MainnetMultisig return l1MainnetMultisig
case 'kovan':
case 'optimism-kovan':
return goerliAdmin
case 'goerli': case 'goerli':
case 'optimism-goerli': case 'optimism-goerli':
return goerliAdmin return goerliAdmin
......
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