-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
51 lines (48 loc) · 1.16 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
import { HardhatUserConfig } from 'hardhat/config';
//utils
import '@nomicfoundation/hardhat-toolbox';
import '@nomiclabs/hardhat-ethers';
import 'hardhat-deploy';
import { config as dotenvConfig } from 'dotenv';
import { resolve } from 'path';
//config
import { getChainConfig } from './config/chains';
const dotenvConfigPath: string = process.env.DOTENV_CONFIG_PATH || './.env';
dotenvConfig({ path: resolve(__dirname, dotenvConfigPath) });
const config: HardhatUserConfig = {
defaultNetwork: 'hardhat',
networks: {
hardhat: {
live: false,
chainId: 31337,
},
localhost: {
live: false,
chainId: 31337,
},
polygon_mumbai: getChainConfig('polygon_mumbai'),
polygon: getChainConfig('polygon'),
},
namedAccounts: {
deployer: {
default: 0,
},
},
etherscan: {
apiKey: {
polygon: process.env.POLYGONSCAN_API_KEY || '',
polygonMumbai: process.env.POLYGONSCAN_API_KEY || '',
},
},
solidity: {
version: '0.8.18',
settings: {
optimizer: {
enabled: true,
// lower run to reduce GovernorContract size
runs: 200,
},
},
},
};
export default config;