-
Notifications
You must be signed in to change notification settings - Fork 3
/
hardhat.config.js
82 lines (79 loc) · 1.87 KB
/
hardhat.config.js
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
require('@nomiclabs/hardhat-waffle');
require('@nomiclabs/hardhat-etherscan');
require('hardhat-gas-reporter');
require('hardhat-tracer');
require('solidity-coverage');
const { resolve } = require('path');
const { config: dotenvConfig } = require('dotenv');
dotenvConfig({ path: resolve(__dirname, './.env') });
module.exports = {
defaultNetwork: 'hardhat',
networks: {
hardhat: {},
mumbai: {
url: `https://polygon-mumbai.g.alchemy.com/v2/${process.env.ALCHEMY_MUMBAI_API_KEY}`,
accounts: [process.env.DEPLOYER_PRIVATE_KEY],
},
polygon: {
url: `https://polygon-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_POLYGON_API_KEY}`,
accounts: [process.env.DEPLOYER_PRIVATE_KEY],
saveDeployments: true,
},
goerli: {
url: `https://eth-goerli.g.alchemy.com/v2/${process.env.ALCHEMY_GOELRI_API_KEY}`,
accounts: [process.env.DEPLOYER_PRIVATE_KEY],
},
},
gasReporter: {
currency: 'USD',
gasPrice: 100,
},
etherscan: {
apiKey: {
polygon: process.env.POLYSCAN_API_KEY,
goerli: process.env.ETHERSCAN_API_KEY,
polygonMumbai: process.env.POLYSCAN_API_KEY,
},
},
solidity: {
compilers: [
{
version: '0.8.18',
settings: {
optimizer: {
enabled: true,
runs: 10000,
},
outputSelection: {
'*': {
'*': ['storageLayout'],
},
},
},
},
{
version: '0.8.0',
settings: {
optimizer: {
enabled: true,
runs: 10000,
},
outputSelection: {
'*': {
'*': ['storageLayout'],
},
},
},
},
],
},
paths: {
sources: './contracts',
tests: './test',
cache: './cache',
artifacts: './artifacts',
},
mocha: {
timeout: 40000,
},
};