-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.config.js
82 lines (76 loc) · 1.88 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
/**
* @type import('hardhat/config').HardhatUserConfig
*/
require('dotenv').config();
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-etherscan");
require('@openzeppelin/hardhat-upgrades');
require("hardhat-gas-reporter");
require("hardhat-contract-sizer")
const isPolygon = false;
const {
MAINNET_API_URL, MAINNET_PRIVATE_KEY,
POLYGON_API_URL, POLYGON_PRIVATE_KEY,
RINKEBY_API_URL, RINKEBY_PRIVATE_KEY,
MUMBAI_API_URL, MUMBAI_PRIVATE_KEY,
GOERLI_API_URL, GOERLI_PRIVATE_KEY,
ETHERSCAN_API, POLYSCAN_API} = process.env;
module.exports = {
solidity: {
version: "0.8.7",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
defaultNetwork: "hardhat",
gasReporter: {
currency: 'USD',
gasPrice: 160,
enable: true,
coinmarketcap : "f77106bb-8d2f-4f30-be3c-821bd68ac7bd",
},
mocha: {
timeout: 120000
},
networks: {
hardhat: {
gas: 12000000,
blockGasLimit: 0x1fffffffffffff,
allowUnlimitedContractSize: true,
timeout: 1800000
//forking: { url: POLYGON_API_URL,//MAINNET_API_URL, }
},
mainnet: {
url: MAINNET_API_URL,
accounts: [`0x${MAINNET_PRIVATE_KEY}`]
},
polygon: {
url: POLYGON_API_URL,
accounts: [`0x${POLYGON_PRIVATE_KEY}`]
},
goerli: {
url: GOERLI_API_URL,
accounts: [`0x${GOERLI_PRIVATE_KEY}`]
},
rinkeby: {
url: RINKEBY_API_URL,
accounts: [`0x${RINKEBY_PRIVATE_KEY}`]
},
mumbai:{
url: MUMBAI_API_URL,
accounts: [`0x${MUMBAI_PRIVATE_KEY}`]
}
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: {
mainnet: ETHERSCAN_API,
polygon: POLYSCAN_API,
},
},
}
////