-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.ts
101 lines (98 loc) · 2.83 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import '@nomicfoundation/hardhat-chai-matchers';
import '@nomiclabs/hardhat-truffle5';
import '@nomiclabs/hardhat-web3';
import '@nomiclabs/hardhat-solhint';
import '@nomiclabs/hardhat-etherscan';
import '@openzeppelin/hardhat-upgrades';
import '@typechain/hardhat';
import '@nomicfoundation/hardhat-toolbox';
import * as dotenv from 'dotenv';
import { HardhatUserConfig } from 'hardhat/types';
import 'hardhat-docgen';
dotenv.config();
const config: HardhatUserConfig = {
defaultNetwork: 'hardhat',
networks: {
hardhat: {
accounts: { count: 100 },
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: [`${process.env.PRIVATE_KEY}`],
},
goerli: {
url: `https://goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: [`${process.env.PRIVATE_KEY}`],
},
sepolia: {
url: `https://sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`,
accounts: [`${process.env.PRIVATE_KEY}`],
},
mumbai: {
url: `https://matic-mumbai.chainstacklabs.com/`,
accounts: [`${process.env.PRIVATE_KEY}`],
},
bsctestnet: {
url: `https://data-seed-prebsc-2-s1.binance.org:8545`,
accounts: [`${process.env.PRIVATE_KEY}`],
},
},
etherscan: {
apiKey: {
mainnet: `${process.env.ETHERSCAN_KEY}`,
bscTestnet: `${process.env.BSCSCAN_KEY}`,
goerli: `${process.env.ETHERSCAN_KEY}`,
polygonMumbai: `${process.env.POLYGONSCAN_KEY}`,
sepolia: `${process.env.ETHERSCAN_KEY}`,
},
},
solidity: {
compilers: [
{
version: '0.8.16',
settings: {
optimizer: {
enabled: true,
runs: 200,
details: {
yul: true,
},
},
viaIR: true,
},
},
{
version: '0.8.0',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
paths: {
sources: './contracts',
tests: './tests',
cache: './cache',
artifacts: './artifacts',
},
mocha: {
timeout: 200000,
reporter: 'mocha-multi-reporters',
reporterOptions: {
configFile: './mocha-report.json',
},
},
docgen: {
path: './docs',
clear: true,
runOnCompile: false,
},
typechain: {
outDir: 'typechain-types',
target: 'ethers-v5',
},
};
module.exports = config;