-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.js
90 lines (78 loc) · 1.99 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
83
84
85
86
87
88
89
90
require("@nomiclabs/hardhat-waffle");
require("dotenv").config();
require("@nomiclabs/hardhat-etherscan");
require("hardhat-contract-sizer");
require("hardhat-gas-reporter");
const INFURA_API_KEY = process.env.INFURA_API_KEY;
const ALCHEMY_API_KEY = process.env.ALCHEMY_API_KEY;
module.exports = {
solidity: {
version: "0.8.9",
settings: {
optimizer: {
enabled: true,
runs: 200,
details: { yul: false },
},
},
},
defaultNetwork: "hardhat",
networks: {
hardhat: {
// forking: {
// url: `https://goerli.infura.io/v3/${process.env.INFURA_API_KEY}`,
// },
},
rinkeby: {
url: `https://eth-rinkeby.alchemyapi.io/v2/${INFURA_API_KEY}`,
accounts: [process.env.PRIVATE_KEY],
},
ropsten: {
url: `https://eth-ropsten.alchemyapi.io/v2/${INFURA_API_KEY}`,
accounts: [process.env.PRIVATE_KEY],
},
goerli: {
url: `https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}`,
accounts: [process.env.PRIVATE_KEY],
},
mumbai: {
url: `https://polygon-mumbai.infura.io/v3/${INFURA_API_KEY}`,
accounts: [process.env.PRIVATE_KEY],
},
matic: {
url: `https://polygon-mainnet.g.alchemy.com/v2/${INFURA_API_KEY}`,
accounts: [process.env.PRIVATE_KEY],
},
bscTestnet: {
url: "https://data-seed-prebsc-1-s1.binance.org:8545",
accounts: [process.env.PRIVATE_KEY],
},
},
etherscan: {
apiKey: process.env.ETHEREUM_API_KEY,
// apiKey: process.env.POLYGON_API_KEY,
// apiKey: process.env.BSC_API_KEY,
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
mocha: {
timeout: 4000000,
},
contractSizer: {
alphaSort: true,
disambiguatePaths: false,
runOnCompile: true,
strict: true,
// only: [":ERC20$"],
},
gasReporter: {
enabled: true,
currency: "USD",
token: "ETH",
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
},
};