Skip to content

Commit

Permalink
Optimism and base networks verification (#996)
Browse files Browse the repository at this point in the history
  • Loading branch information
rin-st authored Dec 2, 2024
1 parent beefe9d commit 95f05f9
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/hardhat/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
# To access the values stored in this .env file you can use: process.env.VARIABLENAME
ALCHEMY_API_KEY=
DEPLOYER_PRIVATE_KEY=
ETHERSCAN_API_KEY=
ETHERSCAN_MAINNET_API_KEY=
30 changes: 28 additions & 2 deletions packages/hardhat/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ import "hardhat-deploy-ethers";
// If not set, it uses the hardhat account 0 private key.
const deployerPrivateKey =
process.env.DEPLOYER_PRIVATE_KEY ?? "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80";
// If not set, it uses ours Etherscan default API key.
const etherscanApiKey = process.env.ETHERSCAN_API_KEY || "DNXJA8RX2Q3VZ4URQIWP7Z68CJXQZSC6AW";
// If not set, it uses our block explorers default API keys.
const etherscanApiKey = process.env.ETHERSCAN_MAINNET_API_KEY || "DNXJA8RX2Q3VZ4URQIWP7Z68CJXQZSC6AW";
const etherscanOptimisticApiKey = process.env.ETHERSCAN_OPTIMISTIC_API_KEY || "RM62RDISS1RH448ZY379NX625ASG1N633R";
const basescanApiKey = process.env.BASESCAN_API_KEY || "ZZZEIPMT1MNJ8526VV2Y744CA7TNZR64G6";

// If not set, it uses ours Alchemy's default API key.
// You can get your own at https://dashboard.alchemyapi.io
Expand Down Expand Up @@ -70,10 +72,22 @@ const config: HardhatUserConfig = {
optimism: {
url: `https://opt-mainnet.g.alchemy.com/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
verify: {
etherscan: {
apiUrl: "https://api-optimistic.etherscan.io",
apiKey: etherscanOptimisticApiKey,
},
},
},
optimismSepolia: {
url: `https://opt-sepolia.g.alchemy.com/v2/${providerApiKey}`,
accounts: [deployerPrivateKey],
verify: {
etherscan: {
apiUrl: "https://api-sepolia-optimistic.etherscan.io",
apiKey: etherscanOptimisticApiKey,
},
},
},
polygon: {
url: `https://polygon-mainnet.g.alchemy.com/v2/${providerApiKey}`,
Expand Down Expand Up @@ -102,10 +116,22 @@ const config: HardhatUserConfig = {
base: {
url: "https://mainnet.base.org",
accounts: [deployerPrivateKey],
verify: {
etherscan: {
apiUrl: "https://api.basescan.org",
apiKey: basescanApiKey,
},
},
},
baseSepolia: {
url: "https://sepolia.base.org",
accounts: [deployerPrivateKey],
verify: {
etherscan: {
apiUrl: "https://api-sepolia.basescan.org",
apiKey: basescanApiKey,
},
},
},
scrollSepolia: {
url: "https://sepolia-rpc.scroll.io",
Expand Down

0 comments on commit 95f05f9

Please sign in to comment.