Skip to content

Commit

Permalink
Setup verification for all chains possible
Browse files Browse the repository at this point in the history
  • Loading branch information
TomiOhl committed Jun 19, 2024
1 parent cf34a97 commit cb94931
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 4 deletions.
21 changes: 18 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# Your Etherscan API key for contract source code verification.
ETHERSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
# Your infura.io project ID for deploying to Ethereum networks.
INFURA_ID=73157d26f55d413eb06614f4ead1de461
# The private key of your address for deploying contracts on public networks.
PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1
PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1
# Your block explorer API keys for contract source code verification.
ETHERSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
BSCSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
POLYGONSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
GNOSISSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
ARBISCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
BASESCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
OPTIMISTICSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
CRONOSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
MANTLESCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
LINEASCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
TAIKOSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
BLASTSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
OKLINK_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
COREDAOSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
ZKEVM_POLYGONSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
SCROLLSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
89 changes: 88 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,95 @@ const config: HardhatUserConfig = {
showTimeSpent: true
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY
apiKey: {
mainnet: process.env.ETHERSCAN_API_KEY || "",
bsc: process.env.BSCSCAN_API_KEY || "",
polygon: process.env.POLYGONSCAN_API_KEY || "",
gnosis: process.env.GNOSISSCAN_API_KEY || "",
arbitrumOne: process.env.ARBISCAN_API_KEY || "",
base: process.env.BASESCAN_API_KEY || "",
optimisticEthereum: process.env.OPTIMISTICSCAN_API_KEY || "",
cronos: process.env.CRONOSCAN_API_KEY || "",
mantle: process.env.MANTLESCAN_API_KEY || "",
// ontology: "", // no etherscan
linea: process.env.LINEASCAN_API_KEY || "",
// cyber: "", // no etherscan
taiko: process.env.TAIKOSCAN_API_KEY || "",
blast: process.env.BLASTSCAN_API_KEY || "",
xlayer: process.env.OKLINK_API_KEY || "",
coredao: process.env.COREDAOSCAN_API_KEY || "",
metis: "metis",
neon: "neon",
polygonZkEVM: process.env.ZKEVM_POLYGONSCAN_API_KEY || "",
scroll: process.env.SCROLLSCAN_API_KEY || ""
// zeta: "", // no etherscan
},
customChains: [
{
network: "cronos",
chainId: 25,
urls: { apiURL: "https://api.cronoscan.com/api", browserURL: "https://cronoscan.com" }
},
{
network: "mantle",
chainId: 5000,
urls: { apiURL: "https://api.mantlescan.xyz/api", browserURL: "https://mantlescan.xyz" }
},
{
network: "linea",
chainId: 59144,
urls: { apiURL: "https://api.lineascan.build/api", browserURL: "https://lineascan.build" }
},
{
network: "taiko",
chainId: 167000,
urls: { apiURL: "https://api.taikoscan.io/api", browserURL: "https://taikoscan.io" }
},
{
network: "blast",
chainId: 81457,
urls: { apiURL: "https://api.blastscan.io/api", browserURL: "https://blastscan.io" }
},
{
network: "xlayer",
chainId: 196,
urls: {
apiURL: "https://www.oklink.com/api/v5/explorer/contract/verify-source-code-plugin/XLAYER",
browserURL: "https://oklink.con"
}
},
{
network: "coredao",
chainId: 1116,
urls: { apiURL: "https://openapi.coredao.org/api", browserURL: "https://scan.coredao.org" }
},
{
network: "metis",
chainId: 1088,
urls: {
apiURL: "https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan",
browserURL: "https://explorer.metis.io"
}
},
{
network: "neon",
chainId: 245022934,
urls: {
apiURL: "https://api.neonscan.org/hardhat/verify",
browserURL: "https://neonscan.org"
}
},
{
network: "scroll",
chainId: 534352,
urls: {
apiURL: "https://api.scrollscan.com/api",
browserURL: "https://scrollscan.com"
}
}
]
},
// sourcify: { enabled: false },
docgen: { pages: "files", templates: "./docs/templates" }
};

Expand Down

0 comments on commit cb94931

Please sign in to comment.