Skip to content

Commit

Permalink
Enable sourcify verification, fix "optimistic etherscan" key name, gi…
Browse files Browse the repository at this point in the history
…ve defaults to providers and private keys
  • Loading branch information
adamgall committed Apr 15, 2024
1 parent 839931f commit 9fe2592
Showing 1 changed file with 28 additions and 13 deletions.
41 changes: 28 additions & 13 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import "solidity-docgen";

dotenv.config();

// first address from `test test test test test test test test test test test junk`
const dummyPrivateKey =
"0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80";

const config: HardhatUserConfig = {
solidity: {
version: "0.8.19",
Expand Down Expand Up @@ -39,45 +43,53 @@ const config: HardhatUserConfig = {
networks: {
mainnet: {
chainId: 1,
url: process.env.MAINNET_PROVIDER || "",
url:
process.env.MAINNET_PROVIDER || "https://ethereum-rpc.publicnode.com",
accounts: process.env.MAINNET_DEPLOYER_PRIVATE_KEY
? [process.env.MAINNET_DEPLOYER_PRIVATE_KEY]
: [],
: [dummyPrivateKey],
},
sepolia: {
chainId: 11155111,
url: process.env.SEPOLIA_PROVIDER || "",
url:
process.env.SEPOLIA_PROVIDER ||
"https://ethereum-sepolia-rpc.publicnode.com",
accounts: process.env.SEPOLIA_DEPLOYER_PRIVATE_KEY
? [process.env.SEPOLIA_DEPLOYER_PRIVATE_KEY]
: [],
: [dummyPrivateKey],
},
polygon: {
chainId: 137,
url: process.env.POLYGON_PROVIDER || "",
url:
process.env.POLYGON_PROVIDER ||
"https://polygon-bor-rpc.publicnode.com",
accounts: process.env.POLYGON_DEPLOYER_PRIVATE_KEY
? [process.env.POLYGON_DEPLOYER_PRIVATE_KEY]
: [],
: [dummyPrivateKey],
},
baseSepolia: {
chainId: 84532,
url: process.env.BASE_SEPOLIA_PROVIDER || "",
url:
process.env.BASE_SEPOLIA_PROVIDER ||
"https://base-sepolia-rpc.publicnode.com",
accounts: process.env.BASE_SEPOLIA_DEPLOYER_PRIVATE_KEY
? [process.env.BASE_SEPOLIA_DEPLOYER_PRIVATE_KEY]
: [],
: [dummyPrivateKey],
},
base: {
chainId: 8453,
url: process.env.BASE_PROVIDER || "",
url: process.env.BASE_PROVIDER || "https://base-rpc.publicnode.com",
accounts: process.env.BASE_DEPLOYER_PRIVATE_KEY
? [process.env.BASE_DEPLOYER_PRIVATE_KEY]
: [],
: [dummyPrivateKey],
},
optimism: {
chainId: 10,
url: process.env.OPTIMISM_PROVIDER || "",
url:
process.env.OPTIMISM_PROVIDER || "https://optimism-rpc.publicnode.com",
accounts: process.env.OPTIMISM_DEPLOYER_PRIVATE_KEY
? [process.env.OPTIMISM_DEPLOYER_PRIVATE_KEY]
: [],
: [dummyPrivateKey],
},
},
etherscan: {
Expand All @@ -87,7 +99,7 @@ const config: HardhatUserConfig = {
polygon: process.env.POLYGONSCAN_API_KEY || "",
baseSepolia: process.env.BASESCAN_API_KEY || "",
base: process.env.BASESCAN_API_KEY || "",
optimism: process.env.OPTIMISTIC_ETHERSCAN_API_KEY || "",
optimisticEthereum: process.env.OPTIMISTIC_ETHERSCAN_API_KEY || "",
},
customChains: [
{
Expand All @@ -100,6 +112,9 @@ const config: HardhatUserConfig = {
},
],
},
sourcify: {
enabled: true,
},
paths: {
deploy: "deploy/core",
},
Expand Down

0 comments on commit 9fe2592

Please sign in to comment.