-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.ts
51 lines (46 loc) · 1.12 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
require('dotenv').config();
import '@nomiclabs/hardhat-waffle';
import '@typechain/hardhat';
import '@nomiclabs/hardhat-ganache'; // for testing
import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-etherscan';
// NOTE: Any tasks that depend on the generated typechain makes the build flaky.
// Favour scripts instead
if (!process.env.ETHERSCAN_API_KEY) {
console.log(
"NOTE: environment variable ETHERSCAN_API_KEY isn't set. tasks that interact with etherscan won't work"
);
}
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
//
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
compilers: [
{
version: '0.8.4',
settings: {
optimizer: {
enabled: true,
runs: 999999,
},
},
},
],
},
typechain: {
target: 'ethers-v5',
outDir: './typechain',
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: process.env.ETHERSCAN_API_KEY,
},
mocha: {
timeout: 120000,
},
};