-
Notifications
You must be signed in to change notification settings - Fork 5
/
hardhat.config.js
81 lines (77 loc) · 2.04 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
require('dotenv').config();
require('solidity-coverage');
require('hardhat-gas-reporter');
require('hardhat-contract-sizer')
require('hardhat-abi-exporter');
require('@nomiclabs/hardhat-solhint');
require("@nomiclabs/hardhat-etherscan");
require('@openzeppelin/hardhat-upgrades');
require("@nomiclabs/hardhat-truffle5");
const INFURA_PROJECT_ID = process.env.INFURA_PROJECT_ID;
const KO_DEPLOYER_PRIVATE_KEY = process.env.KO_TESTNET_DEPLOYER_PRIVATE_KEY || process.env.KO_DEPLOYER_PRIVATE_KEY;
let nonDevelopmentNetworks = {}
// If we have a private key, we can setup non dev networks
if (KO_DEPLOYER_PRIVATE_KEY) {
nonDevelopmentNetworks = {
mainnet: {
url: `https://mainnet.infura.io/v3/${INFURA_PROJECT_ID}`,
accounts: [`0x${KO_DEPLOYER_PRIVATE_KEY}`],
timeout: 10000000,
timeoutBlocks: 30000,
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${INFURA_PROJECT_ID}`,
accounts: [`0x${KO_DEPLOYER_PRIVATE_KEY}`]
},
goerli: {
url: `https://goerli.infura.io/v3/${INFURA_PROJECT_ID}`,
accounts: [`0x${KO_DEPLOYER_PRIVATE_KEY}`]
},
}
}
module.exports = {
solidity: {
version: "0.8.4",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
gasReporter: {
currency: 'USD',
enabled: (process.env.REPORT_GAS) ? true : false,
gasPrice: 75,
coinmarketcap: process.env.COIN_MARKETCAP_KEY,
showTimeSpent: true,
showMethodSig: true,
},
networks: {
...nonDevelopmentNetworks,
coverage: {
url: 'http://localhost:8555',
},
},
etherscan: {
apiKey: process.env.ETHERSCAN_KEY
},
abiExporter: {
path: './abis',
clear: false,
flat: true,
only: [
'ClaimableFundsReceiverV1',
'ClaimableFundsSplitterV1',
'CollabRoyaltiesRegistry',
'KnownOriginDigitalAssetV3',
'KOAccessControls',
'KODAV3PrimaryMarketplace',
'KODAV3SecondaryMarketplace',
'KODAV3SecondaryMarketplace',
'KODAV3UpgradableGatedMarketplace',
'MintingFactory',
],
spacing: 2
}
};