Skip to content

Commit

Permalink
Merge pull request NomicFoundation#2023 from marcelomorgado/hardhat-e…
Browse files Browse the repository at this point in the history
…therscan-avalanche

Avalanche verify support
  • Loading branch information
fvictorio authored Nov 8, 2021
2 parents 62f798d + 2e5d6ae commit d442b58
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/cool-rats-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nomiclabs/hardhat-etherscan": patch
---

Add support for the Avalanche Mainnet and Fuji chains (thanks @marcelomorgado!)
11 changes: 11 additions & 0 deletions packages/hardhat-etherscan/src/network/prober.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ enum NetworkID {
// Arbitrum
ARBITRUM_ONE = 42161,
ARBITRUM_TESTNET = 421611,
// Avalanche
AVALANCHE = 43114,
AVALANCHE_FUJI_TESTNET = 43113,
}

const networkIDtoEndpoints: NetworkMap = {
Expand Down Expand Up @@ -111,6 +114,14 @@ const networkIDtoEndpoints: NetworkMap = {
apiURL: "https://api-testnet.arbiscan.io/api",
browserURL: "https://testnet.arbiscan.io/",
},
[NetworkID.AVALANCHE]: {
apiURL: "https://api.snowtrace.io/api",
browserURL: "https://snowtrace.io/",
},
[NetworkID.AVALANCHE_FUJI_TESTNET]: {
apiURL: "https://api-testnet.snowtrace.io/api",
browserURL: "https://testnet.snowtrace.io/",
},
};

export async function getEtherscanEndpoints(
Expand Down

0 comments on commit d442b58

Please sign in to comment.