Skip to content

Commit

Permalink
Restore Goerli conficuration for cross-chain projects
Browse files Browse the repository at this point in the history
As Wormhole does not support Sepolia-base L2 chains yet, we decided to still use
Goerli for the cross-chainprojects (it's still live, despite EOL planned for
2023 EOY). So we're restoring the Goerli config in those projecst and we will
remove it once Wormhole supports Sepolia L2s (or Goerli becomes unusable).
  • Loading branch information
michalinacienciala committed Jan 10, 2024
1 parent bf67690 commit 34a9332
Show file tree
Hide file tree
Showing 12 changed files with 600 additions and 0 deletions.
1 change: 1 addition & 0 deletions cross-chain/arbitrum/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/deployments/*
!/deployments/mainnet/
!/deployments/arbitrumOne/
!/deployments/arbitrumGoerli/
!/deployments/arbitrumSepolia/

# OZ
Expand Down
31 changes: 31 additions & 0 deletions cross-chain/arbitrum/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ const config: HardhatUserConfig = {
"deploy_l2",
],
},
goerli: {
url: process.env.L1_CHAIN_API_URL || "",
chainId: 5,
deploy: ["deploy_l1"],
accounts: process.env.L1_ACCOUNTS_PRIVATE_KEYS
? process.env.L1_ACCOUNTS_PRIVATE_KEYS.split(",")
: undefined,
tags: ["etherscan"],
},
mainnet: {
url: process.env.L1_CHAIN_API_URL || "",
chainId: 1,
Expand All @@ -44,6 +53,18 @@ const config: HardhatUserConfig = {
: undefined,
tags: ["etherscan"],
},
arbitrumGoerli: {
url: process.env.L2_CHAIN_API_URL || "",
chainId: 421613,
deploy: ["deploy_l2"],
accounts: process.env.L2_ACCOUNTS_PRIVATE_KEYS
? process.env.L2_ACCOUNTS_PRIVATE_KEYS.split(",")
: undefined,
tags: ["arbiscan"],
// companionNetworks: {
// l1: "goerli",
// },
},
arbitrumOne: {
url: process.env.L2_CHAIN_API_URL || "",
chainId: 42161,
Expand All @@ -60,31 +81,41 @@ const config: HardhatUserConfig = {

external: {
deployments: {
goerli: ["./external/goerli"],
mainnet: ["./external/mainnet"],
arbitrumGoerli: ["./external/arbitrumGoerli"],
arbitrumOne: ["./external/arbitrumOne"],
},
},

deploymentArtifactsExport: {
goerli: "artifacts/l1",
mainnet: "artifacts/l1",
arbitrumGoerli: "artifacts/l2",
arbitrumOne: "artifacts/l2",
},

etherscan: {
apiKey: {
goerli: process.env.ETHERSCAN_API_KEY,
mainnet: process.env.ETHERSCAN_API_KEY,
arbitrumGoerli: process.env.ARBISCAN_API_KEY,
arbitrumOne: process.env.ARBISCAN_API_KEY,
},
},

namedAccounts: {
deployer: {
default: 1,
goerli: 0,
arbitrumGoerli: 0,
mainnet: "0x123694886DBf5Ac94DDA07135349534536D14cAf",
arbitrumOne: "0x123694886DBf5Ac94DDA07135349534536D14cAf",
},
governance: {
default: 2,
goerli: 0,
arbitrumGoerli: 0,
mainnet: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f",
arbitrumOne: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f",
},
Expand Down
1 change: 1 addition & 0 deletions cross-chain/arbitrum/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"lint:config": "prettier --check '**/*.@(json|yaml)'",
"lint:config:fix": "prettier --write '**/*.@(json|yaml)'",
"prepack": "tsc -p tsconfig.export.json && hardhat export-artifacts export/artifacts",
"export-artifacts:goerli": "yarn hardhat export-deployment-artifacts --network arbitrumGoerli",
"export-artifacts:mainnet": "yarn hardhat export-deployment-artifacts --network arbitrumOne",
"prepublishOnly": "npm run export-artifacts:$npm_config_network",
"test": "hardhat test"
Expand Down
1 change: 1 addition & 0 deletions cross-chain/base/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/deployments/*
!/deployments/mainnet/
!/deployments/base/
!/deployments/baseGoerli/

# OZ
/.openzeppelin/unknown-*.json
Expand Down
42 changes: 42 additions & 0 deletions cross-chain/base/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ const config: HardhatUserConfig = {
"deploy_l2",
],
},
goerli: {
url: process.env.L1_CHAIN_API_URL || "",
chainId: 5,
deploy: ["deploy_l1"],
accounts: process.env.L1_ACCOUNTS_PRIVATE_KEYS
? process.env.L1_ACCOUNTS_PRIVATE_KEYS.split(",")
: undefined,
tags: ["etherscan"],
},
mainnet: {
url: process.env.L1_CHAIN_API_URL || "",
chainId: 1,
Expand All @@ -44,6 +53,21 @@ const config: HardhatUserConfig = {
: undefined,
tags: ["etherscan"],
},
baseGoerli: {
url: process.env.L2_CHAIN_API_URL || "",
chainId: 84531,
deploy: ["deploy_l2"],
accounts: process.env.L2_ACCOUNTS_PRIVATE_KEYS
? process.env.L2_ACCOUNTS_PRIVATE_KEYS.split(",")
: undefined,
tags: ["basescan"],
// In case of deployment failing with underpriced transaction error set
// the `gasPrice` parameter.
// gasPrice: 1000000000,
// companionNetworks: {
// l1: "goerli",
// },
},
base: {
url: process.env.L2_CHAIN_API_URL || "",
chainId: 8453,
Expand All @@ -63,22 +87,36 @@ const config: HardhatUserConfig = {

external: {
deployments: {
goerli: ["./external/goerli"],
mainnet: ["./external/mainnet"],
baseGoerli: ["./external/baseGoerli"],
base: ["./external/base"],
},
},

deploymentArtifactsExport: {
goerli: "artifacts/l1",
mainnet: "artifacts/l1",
baseGoerli: "artifacts/l2",
base: "artifacts/l2",
},

etherscan: {
apiKey: {
goerli: process.env.ETHERSCAN_API_KEY,
mainnet: process.env.ETHERSCAN_API_KEY,
"base-goerli": process.env.BASESCAN_API_KEY,
"base-mainnet": process.env.BASESCAN_API_KEY,
},
customChains: [
{
network: "base-goerli",
chainId: 84531,
urls: {
apiURL: "https://api-goerli.basescan.org/api",
browserURL: "https://goerli.basescan.org",
},
},
{
network: "base-mainnet",
chainId: 8453,
Expand All @@ -93,11 +131,15 @@ const config: HardhatUserConfig = {
namedAccounts: {
deployer: {
default: 1,
goerli: 0,
baseGoerli: 0,
mainnet: "0x123694886DBf5Ac94DDA07135349534536D14cAf",
base: "0x123694886DBf5Ac94DDA07135349534536D14cAf",
},
governance: {
default: 2,
goerli: 0,
baseGoerli: 0,
mainnet: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f", // Threshold Council
base: "0x518385dd31289F1000fE6382b0C65df4d1Cd3bfC", // Threshold Council
},
Expand Down
1 change: 1 addition & 0 deletions cross-chain/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"lint:config": "prettier --check '**/*.@(json|yaml)'",
"lint:config:fix": "prettier --write '**/*.@(json|yaml)'",
"prepack": "tsc -p tsconfig.export.json && hardhat export-artifacts export/artifacts",
"export-artifacts:goerli": "yarn hardhat export-deployment-artifacts --network baseGoerli",
"export-artifacts:mainnet": "yarn hardhat export-deployment-artifacts --network base",
"prepublishOnly": "npm run export-artifacts:$npm_config_network",
"test": "hardhat test"
Expand Down
1 change: 1 addition & 0 deletions cross-chain/optimism/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/deployments/*
!/deployments/mainnet/
!/deployments/optimism/
!/deployments/optimismGoerli/

# OZ
/.openzeppelin/unknown-*.json
Loading

0 comments on commit 34a9332

Please sign in to comment.