-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
84 lines (72 loc) · 1.66 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
require('dotenv').config()
const { PRIVATE_KEY, COINMARKETCAP_KEY, ALCHEMY_API_KEY, ETHERSCAN_API_KEY } = process.env || null;
require("@nomiclabs/hardhat-waffle");
require('hardhat-contract-sizer');
require("solidity-docgen");
require("hardhat-gas-reporter");
require("@nomiclabs/hardhat-etherscan");
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.9",
defaultNetwork: "hardhat",
networks: {
hardhat: {
/*
forking: {
url: `https://polygon-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}`,
}
*/
},
maticTest: {
url: "https://rpc-mumbai.maticvigil.com", // mumbai testnet
accounts: [PRIVATE_KEY],
gasMultiplier: 2,
},
maticMain: {
url: "https://polygon-rpc.com",
accounts: [PRIVATE_KEY],
gasMultiplier: 2
},
optimismKovan: {
url: "https://kovan.optimism.io",
accounts: [PRIVATE_KEY],
gasMultiplier: 2
},
optimismGoerli: {
url: "https://goerli.optimism.io/",
accounts: [PRIVATE_KEY],
gasMultiplier: 2
},
optimism: {
url: "https://optimism-mainnet.public.blastapi.io",
accounts: [PRIVATE_KEY],
gasMultiplier: 2
},
},
solidity: {
compilers:
[
{
version: "0.8.5"
},
],
settings:
{
optimizer:
{
enabled: true,
runs: 200
}
},
},
docgen: {},
gasReporter: {
currency: "USD",
token: "MATIC",
gasPriceApi: "https://api.polygonscan.com/api?module=proxy&action=eth_gasPrice",
coinmarketcap: COINMARKETCAP_KEY
},
etherscan: {
apiKey: ETHERSCAN_API_KEY
},
};