From c788c3d1a528e6fafb4e77bd6a31a5a8ae02eb20 Mon Sep 17 00:00:00 2001 From: Dzmitry Lahunouski Date: Wed, 20 Mar 2024 23:09:30 +0000 Subject: [PATCH] add op network --- .env.example | 17 ++++++++++++++--- deployment.config.js | 14 +++++++++++++- hardhat.config.js | 38 +++++++++++++++++++++++++++++++++----- 3 files changed, 60 insertions(+), 9 deletions(-) diff --git a/.env.example b/.env.example index 2ccd357..ae990bc 100644 --- a/.env.example +++ b/.env.example @@ -4,10 +4,21 @@ PRIVATE_KEY= ## Arbitrum ### key -ABISCAN_API_KEY= -### arbitrum-sepolia rpc +ARBISCAN_API_KEY= +### arbitrumSepolia rpc ARBITRUM_SEPOLIA_RPC= -## Localhost +## BASE +### key +BASE_API_KEY= +### baseSepolia rpc +BASE_SEPOLIA_RPC= + +## Optimism +### key +OP_API_KEY= +### baseSepolia rpc +OP_SEPOLIA_RPC= + ### rpc RPC_URL=http://localhost:8545 \ No newline at end of file diff --git a/deployment.config.js b/deployment.config.js index a78c624..20b5a33 100644 --- a/deployment.config.js +++ b/deployment.config.js @@ -9,7 +9,19 @@ module.exports = { config: config, }, localhost: { lockFile: "./local.deployment-lock.json", config: config }, - "arbitrum-sepolia": { + arbitrumSepolia: { + lockFile: "./deployment-lock.json", + verify: true, + plugins: [VerifyPlugin], + config: config, + }, + baseSepolia: { + lockFile: "./deployment-lock.json", + verify: true, + plugins: [VerifyPlugin], + config: config, + }, + opSepolia: { lockFile: "./deployment-lock.json", verify: true, plugins: [VerifyPlugin], diff --git a/hardhat.config.js b/hardhat.config.js index 3a5e71a..b2ba672 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -33,25 +33,53 @@ module.exports = { localhost: { deployment: deployments.localhost, }, - "arbitrum-sepolia": { - url: config?.RPC_URL || DEFAULT_RPC, + arbitrumSepolia: { + url: config?.ARBITRUM_SEPOLIA_RPC || DEFAULT_RPC, accounts: deployerAccounts, - deployment: deployments["arbitrum-sepolia"], + deployment: deployments.arbitrumSepolia, + }, + baseSepolia: { + url: config?.parsed?.BASE_SEPOLIA_RPC || DEFAULT_RPC, + accounts: deployerAccounts, + deployment: deployments.baseSepolia, + }, + opSepolia: { + url: config?.parsed?.OP_SEPOLIA_RPC || DEFAULT_RPC, + accounts: deployerAccounts, + deployment: deployments.opSepolia, }, }, etherscan: { apiKey: { - "arbitrum-sepolia": config?.parsed?.ABISCAN_API_KEY, + baseSepolia: config?.parsed?.BASE_API_KEY, + arbitrumSepolia: config?.parsed?.ARBISCAN_API_KEY, + opSepolia: config?.parsed?.OP_API_KEY, }, customChains: [ { - network: "arbitrum-sepolia", + network: "arbitrumSepolia", chainId: 421614, urls: { apiURL: "https://api-sepolia.arbiscan.io/api", browserURL: "https://sepolia-explorer.arbitrum.io", }, }, + { + network: "baseSepolia", + chainId: 84532, + urls: { + apiURL: "https://api-sepolia.basescan.org/api", + browserURL: "https://sepolia.basescan.org/", + }, + }, + { + network: "opSepolia", + chainId: 11155420, + urls: { + apiURL: "​https://api-sepolia-optimistic.etherscan.io/api​", + browserURL: "https://sepolia-optimistic.etherscan.io", + }, + }, ], }, };