Skip to content

Commit 08f8627

Browse files
Add Etherscan configuration for new networks (#240)
## Description Add the necessary configuration lines for allowing contract verification on the Block explorers of the networks introduced in #239. BNB was already verified. Optimism and Polygon just worked out of the box. Avalanche defaults to [Snowtrace](https://snowtrace.io/), so I had to include a custom configuration for that network in order to use [SnowScan](https://snowscan.xyz/) and used: ```sh npx hardhat verify --network avalanche 0x9E7Ae8Bdba9AA346739792d219a808884996Db67 npx hardhat verify --network avalanche 0x9008D19f58AAbD9eD0D60971565AA8510560ab41 0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE 0xBA12222222228d8Ba445958a75a0704d566BF2C8 ``` I also enabled Sourcify because why not? ## Test Plan Check out the contract addresses on the block explorer. --------- Co-authored-by: Mateo <[email protected]>
1 parent 8930d74 commit 08f8627

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

hardhat.config.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,17 @@ export default {
187187
currency: "USD",
188188
gasPrice: 21,
189189
},
190+
sourcify: {
191+
enabled: true,
192+
},
190193
etherscan: {
191194
apiKey: {
192195
sepolia: ETHERSCAN_API_KEY,
193196
arbitrumOne: ETHERSCAN_API_KEY,
194197
base: ETHERSCAN_API_KEY,
198+
optimisticEthereum: ETHERSCAN_API_KEY,
199+
polygon: ETHERSCAN_API_KEY,
200+
avalanche: ETHERSCAN_API_KEY,
195201
},
196202
customChains: [
197203
{
@@ -202,6 +208,14 @@ export default {
202208
browserURL: "https://basescan.org",
203209
},
204210
},
211+
{
212+
network: "avalanche",
213+
chainId: 43114,
214+
urls: {
215+
apiURL: "https://api.snowscan.xyz/api",
216+
browserURL: "https://snowscan.xyz",
217+
},
218+
},
205219
],
206220
},
207221
};

0 commit comments

Comments
 (0)