forked from bearn-defi/bdollar-smartcontracts
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathhardhat.config.ts
114 lines (109 loc) · 2.61 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
import { config as dotEnvConfig } from "dotenv";
dotEnvConfig();
import { HardhatUserConfig } from "hardhat/types";
import "hardhat-typechain";
import "hardhat-deploy";
import "hardhat-deploy-ethers";
import "hardhat-contract-sizer";
import "hardhat-gas-reporter";
import "@nomiclabs/hardhat-truffle5";
import "@nomiclabs/hardhat-etherscan";
import { HardhatNetworkAccountsUserConfig } from "hardhat/types/config";
const INFURA_API_KEY = process.env.INFURA_API_KEY;
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY;
const MNEMONIC = process.env.MNEMONIC;
const accounts: HardhatNetworkAccountsUserConfig = {
mnemonic: MNEMONIC ?? "test test test test test test test test test test test junk"
};
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
namedAccounts: {
deployer: 0,
bob: 1,
proxyAdmin: 4,
weth: {
kovan: "0xf8397e7c7eb51d1d417c23201e8e95238b791d8c"
}
},
etherscan: {
apiKey: ETHERSCAN_API_KEY
},
solidity: {
compilers: [
{
version: "0.6.12", settings: {
optimizer: {
enabled: true,
runs: 200
}
}
}
]
},
networks: {
hardhat: {
tags: process.env.DEFAULT_TAG ? process.env.DEFAULT_TAG.split(",") : ["local"],
live: false,
saveDeployments: false,
chainId: 1,
accounts
},
localhost: {
tags: ["local"],
live: false,
saveDeployments: false,
url: "http://localhost:8545",
accounts,
timeout: 60000
},
rinkeby: {
tags: ["local", "staging"],
live: true,
saveDeployments: true,
url: `https://rinkeby.infura.io/v3/${INFURA_API_KEY}`,
accounts
},
kovan: {
tags: ["local", "staging"],
live: true,
saveDeployments: true,
accounts,
loggingEnabled: true,
url: `https://kovan.infura.io/v3/${INFURA_API_KEY}`
},
ganache: {
tags: ["local"],
live: true,
saveDeployments: false,
accounts,
url: "http://127.0.0.1:8555" // Coverage launches its own ganache-cli client
},
coverage: {
tags: ["local"],
live: false,
saveDeployments: false,
accounts,
url: "http://127.0.0.1:8555" // Coverage launches its own ganache-cli client
}
},
typechain: {
outDir: "typechain",
target: "ethers-v5"
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts"
},
external: {},
mocha: {
timeout: 200000
},
contractSizer: {
alphaSort: true,
runOnCompile: true,
disambiguatePaths: false
}
};
export default config;