-
Notifications
You must be signed in to change notification settings - Fork 7
/
hardhat.config.ts
48 lines (42 loc) · 1002 Bytes
/
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
// hardhat.config.ts
import { HardhatUserConfig } from 'hardhat/types'
import { config as dotEnvConfig } from 'dotenv'
dotEnvConfig()
import '@typechain/hardhat'
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-waffle'
import 'hardhat-gas-reporter'
import 'solidity-coverage'
const PRIVATE_KEY = process.env.PRIVATE_KEY || ''
const config: HardhatUserConfig = {
defaultNetwork: 'hardhat',
solidity: {
version: '0.8.4',
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
paths: {
tests: './tests',
cache: './cache',
artifacts: './artifacts'
},
networks: {
hardhat: {
chainId: 1337, // TO WORK WITH METAMASK
gas: 8000000,
gasPrice: 1
},
polygon: {
url: 'https://polygon-mainnet.infura.io/v3/08791951999a4e71b9ba5ae174126de5',
accounts: [PRIVATE_KEY],
chainId: 137
},
localhost: {}
},
gasReporter: { gasPrice: 25, currency: 'USD' }
}
export default config