From 0191594d48060c13f3ab095003091a512c8546c4 Mon Sep 17 00:00:00 2001 From: Marcelo Morgado Date: Thu, 4 Nov 2021 14:33:03 +0000 Subject: [PATCH 1/2] Avalanche verify support --- packages/hardhat-etherscan/src/network/prober.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) 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( From 2e5d6aeb2e93b44a5f8765ee1de16370a148cd93 Mon Sep 17 00:00:00 2001 From: Franco Victorio Date: Mon, 8 Nov 2021 15:05:20 -0300 Subject: [PATCH 2/2] Add changeset --- .changeset/cool-rats-do.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/cool-rats-do.md 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!)