-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhardhat.config.ts
40 lines (36 loc) · 1.05 KB
/
hardhat.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@unlock-protocol/hardhat-plugin";
import "@nomiclabs/hardhat-etherscan";
import "hardhat-sourcify";
import networks from "@unlock-protocol/networks";
let accounts: string[] = [];
if (process.env.PKEY) {
accounts.push(process.env.PKEY);
}
const networksByNames = Object.keys(networks).reduce((acc, networkId) => {
const network = networks[networkId];
return {
...acc,
[network.chain]: {
accounts,
url: network.provider,
},
};
}, {});
const config: HardhatUserConfig = {
solidity: "0.8.17",
networks: networksByNames,
etherscan: {
apiKey: {
polygon: "W9TVEYKW2CDTQ94T3A2V93IX6U3IHQN5Y3",
goerli: "HPSH1KQDPJTNAPU3335G931SC6Y3ZYK3BF",
mainnet: "HPSH1KQDPJTNAPU3335G931SC6Y3ZYK3BF",
rinkeby: "HPSH1KQDPJTNAPU3335G931SC6Y3ZYK3BF",
bsc: "6YUDRP3TFPQNRGGZQNYAEI1UI17NK96XGK",
xdai: "api-key",
optimisticEthereum: "UYVMUG3JUSGAJC2Q62SDU9CYSVXHCYQ8NU",
},
},
};
export default config;