-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathhardhat.config.ts
70 lines (64 loc) · 1.46 KB
/
hardhat.config.ts
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
import '@nomiclabs/hardhat-waffle';
import "@nomiclabs/hardhat-etherscan";
import '@typechain/hardhat';
import "solidity-coverage"
import "hardhat-prettier";
import "hardhat-contract-sizer"
import * as fs from 'fs';
import * as dotenv from 'dotenv'
dotenv.config()
const mnemonic = fs.existsSync('.secret')
? fs
.readFileSync('.secret')
.toString()
.trim()
: "test test test test test test test test test test test junk"
const infuraKey = process.env.INFURA_KEY
const etherscanKey = process.env.ETHERSCAN_KEY
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
export default {
networks: {
hardhat: {
forking: {
url: `https://mainnet.infura.io/v3/${infuraKey}`,
enabled: process.env.FORK === 'true'
},
// gas: 12000000,
// blockGasLimit: 0x1fffffffffffff,
// allowUnlimitedContractSize: true,
},
ropsten: {
url: `https://ropsten.infura.io/v3/${infuraKey}`,
accounts: {
mnemonic: mnemonic,
},
},
kovan: {
url: `https://kovan.infura.io/v3/${infuraKey}`,
accounts: {
mnemonic: mnemonic,
},
},
},
solidity: '0.7.6',
settings: {
optimizer: {
enabled: true,
runs: 1
}
},
typechain: {
outDir: 'typechain',
target: 'ethers-v5',
},
contractSizer: {
alphaSort: true,
},
etherscan: {
apiKey: etherscanKey
},
mocha: {
timeout: 150000
}
};