-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
71 lines (68 loc) · 1.92 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
// yarn hardhat compile per compilare tutto il progetto (compresi contratti, file js e test)
require("@nomicfoundation/hardhat-toolbox")
require("@nomiclabs/hardhat-waffle")
require("hardhat-gas-reporter")
require("./tasks/block-number")
require("@nomiclabs/hardhat-etherscan")
require("dotenv").config()
require("solidity-coverage")
require("hardhat-deploy")
// require("@nomiclabs/hardhat-deploy")
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const COINMARKETCAP_API_KEY = process.env.COINMARKETCAP_API_KEY || ""
const GOERLI_RPC_URL = process.env.GOERLI_RPC_URL
const GOERLI_PRIVATE_KEY = process.env.GOERLI_PRIVATE_KEY
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY || ""
const GANACHE_RPC_URL = process.env.GANACHE_RPC_URL
const GANACHE_PRIVATE_KEY = process.env.GANACHE_PRIVATE_KEY
module.exports = {
defaultNetwork: "hardhat",
networks: {
hardhat: {},
goerli: {
url: GOERLI_RPC_URL,
accounts: [GOERLI_PRIVATE_KEY],
chainId: 5,
},
localhost: {
url: "http://127.0.0.1:8545/",
chainId: 31337,
},
ganache: {
url: GANACHE_RPC_URL,
accounts: [GANACHE_PRIVATE_KEY],
chainId: 1337,
},
},
solidity: "0.8.7",
etherscan: {
apiKey: ETHERSCAN_API_KEY,
},
gasReporter: {
enabled: true,
currency: "EUR",
outputFile: "gas-report.txt",
noColors: true,
coinmarketcap: COINMARKETCAP_API_KEY,
},
mocha: {
timeout: 100000000,
},
solidity: {
version: "0.8.7",
settings: {
optimizer: {
enabled: true,
runs: 1000,
details: { yul: false },
// allowUnlimitedContractSize: true,
},
},
},
// allowUnlimitedContractSize: true,
contractSizer: {
// runOnCompile: false,
},
}