-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.ts
73 lines (64 loc) · 1.51 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
// add global task
import '@nomiclabs/hardhat-ethers';
import 'dotenv/config';
import '@typechain/hardhat';
import '@nomicfoundation/hardhat-chai-matchers';
import '@nomiclabs/hardhat-etherscan';
import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-solhint';
import 'hardhat-deploy';
import 'hardhat-deploy-ethers';
import 'hardhat-spdx-license-identifier';
import 'hardhat-contract-sizer';
import 'hardhat-abi-exporter';
import 'hardhat-gas-reporter';
import 'hardhat-watcher';
import 'hardhat-tracer';
import 'hardhat-storage-layout';
import 'solidity-coverage';
import type { HardhatUserConfig } from 'hardhat/config';
const { PRIVATE_KEY, REPORT_GAS, GAS_TOKEN, GAS_CURRENCY } = process.env;
/**
* @type import('hardhat/config').HardhatUserConfig
*/
export = {
solidity: {
version: '0.8.19',
settings: {
optimizer: {
enabled: false,
runs: 0,
},
},
},
networks: {
hardhat: {
gas: 'auto',
chainId: 1337,
},
},
gasReporter: {
enabled: REPORT_GAS !== undefined,
currency: GAS_CURRENCY || 'USD',
token: GAS_TOKEN || 'ETH',
maxMethodDiff: 1,
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
},
contractSizer: {
alphaSort: true,
runOnCompile: true,
disambiguatePaths: false,
},
abiExporter: {
path: './sdk/abi',
runOnCompile: true,
clear: true,
flat: false,
// only: [':ERC20$'],
spacing: 2,
},
typechain: {
outDir: './sdk/types',
target: 'ethers-v5',
},
} as HardhatUserConfig;