-
Notifications
You must be signed in to change notification settings - Fork 53
/
hardhat.config.ts
52 lines (47 loc) · 1.31 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
import '@typechain/hardhat';
import '@nomicfoundation/hardhat-ethers';
import '@nomicfoundation/hardhat-chai-matchers';
import 'hardhat-gas-reporter';
import 'hardhat-deploy';
import '@nomicfoundation/hardhat-verify';
import 'solidity-docgen';
import 'solidity-coverage';
import dotenv from 'dotenv';
import { HardhatUserConfig } from 'hardhat/config';
import { HardhatNetworkUserConfig } from 'hardhat/types';
import { Networks, getNetwork } from './hardhat-setup';
dotenv.config();
declare module 'hardhat/types/runtime' {
interface HardhatRuntimeEnvironment {
__SOLIDITY_COVERAGE_RUNNING?: boolean | undefined;
}
}
const { networks, etherscan } = new Networks();
const config: HardhatUserConfig = {
solidity: {
version: '0.8.25',
settings: {
optimizer: {
enabled: true,
runs: 1000000,
},
evmVersion: (networks[getNetwork()] as HardhatNetworkUserConfig)?.hardfork || 'cancun',
viaIR: true,
},
},
etherscan,
networks,
gasReporter: {
enabled: true,
},
typechain: {
target: 'ethers-v6',
},
docgen: {
outputDir: 'docs/contracts',
templates: 'docgen/templates',
pages: 'files',
exclude: ['tests'],
},
};
export default config;