diff --git a/.changeset/cool-rats-do.md b/.changeset/cool-rats-do.md new file mode 100644 index 0000000000..2d49973182 --- /dev/null +++ b/.changeset/cool-rats-do.md @@ -0,0 +1,5 @@ +--- +"@nomiclabs/hardhat-etherscan": patch +--- + +Add support for the Avalanche Mainnet and Fuji chains (thanks @marcelomorgado!) diff --git a/packages/hardhat-etherscan/src/network/prober.ts b/packages/hardhat-etherscan/src/network/prober.ts index 41d39db82d..569da90604 100644 --- a/packages/hardhat-etherscan/src/network/prober.ts +++ b/packages/hardhat-etherscan/src/network/prober.ts @@ -40,6 +40,9 @@ enum NetworkID { // Arbitrum ARBITRUM_ONE = 42161, ARBITRUM_TESTNET = 421611, + // Avalanche + AVALANCHE = 43114, + AVALANCHE_FUJI_TESTNET = 43113, } const networkIDtoEndpoints: NetworkMap = { @@ -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(