-
Notifications
You must be signed in to change notification settings - Fork 19
/
hardhat.config.ts
71 lines (67 loc) · 1.52 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
import { HardhatUserConfig } from 'hardhat/types/config'
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-etherscan'
import '@nomiclabs/hardhat-solhint'
import 'hardhat-abi-exporter'
import 'hardhat-contract-sizer'
import 'hardhat-deploy'
import 'hardhat-docgen'
import 'hardhat-gas-reporter'
import 'hardhat-typechain'
import 'hardhat-watcher'
import 'solidity-coverage'
import '@openzeppelin/hardhat-upgrades'
const INFURA_API_KEY = 'YOU_API_KEY'
const PRIVATE_KEY: string = process.env.PRIVATE_KEY || '0x1a'
const ETHERSCAN_API_KEY = 'YOU_API_KEY'
const config: HardhatUserConfig = {
paths: {
sources: './contracts',
},
defaultNetwork: 'hardhat',
solidity: {
version: '0.7.4',
settings: {
optimizer: {
enabled: true,
runs: 1,
},
evmVersion: 'istanbul',
},
},
networks: {
rinkeby: {
chainId: 4,
url: `https://rinkeby.infura.io/v3/${INFURA_API_KEY}`,
accounts: [PRIVATE_KEY],
},
bsct: {
chainId: 97,
url: 'https://data-seed-prebsc-2-s1.binance.org:8545/',
accounts: [PRIVATE_KEY],
},
bsc: {
chainId: 56,
url: 'https://bsc-dataseed.binance.org',
accounts: [PRIVATE_KEY],
},
},
etherscan: {
apiKey: ETHERSCAN_API_KEY,
},
typechain: {
outDir: 'typechain',
target: 'ethers-v5',
},
gasReporter: {
currency: 'USD',
gasPrice: 21,
enabled: true,
},
contractSizer: {
alphaSort: true,
runOnCompile: true,
disambiguatePaths: false,
},
}
export default config