-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhardhat.config.ts
114 lines (110 loc) · 2.09 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
import 'dotenv/config'
import '@typechain/hardhat'
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-waffle'
import 'hardhat-contract-sizer'
import 'hardhat-abi-exporter'
import 'solidity-coverage'
import 'hardhat-spdx-license-identifier'
import 'hardhat-deploy'
import 'hardhat-deploy-ethers'
import 'hardhat-gas-reporter'
import { HardhatUserConfig } from 'hardhat/types'
const COMPILER_SETTINGS = {
optimizer: {
enabled: true,
runs: 1000000,
},
metadata: {
bytecodeHash: 'none',
},
}
const accounts = {
mnemonic: process.env.MNEMONIC,
}
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const config: HardhatUserConfig = {
abiExporter: {
path: './abi',
},
paths: {
artifacts: './artifacts',
cache: './cache',
sources: './contracts',
tests: './test',
},
typechain: {
outDir: './typechain',
target: 'ethers-v5',
},
defaultNetwork: 'hardhat',
mocha: {
timeout: 20000,
},
namedAccounts: {
deployer: {
default: 0,
},
dev: {
// Default to 1
default: 0,
},
treasury: {
default: 1,
},
investor: {
default: 2,
},
},
networks: {
hardhat: {},
km: {
url: 'https://rpc-mainnet.kcc.network',
accounts,
chainId: 321,
live: true,
saveDeployments: true,
tags: ['staging'],
gasMultiplier: 2,
blockGasLimit: 300000,
},
kt: {
url: 'https://rpc-testnet.kcc.network',
accounts,
chainId: 322,
live: true,
saveDeployments: true,
tags: ['staging'],
timeout: 4000000,
gasMultiplier: 2,
},
},
solidity: {
compilers: [
{
version: '0.4.18',
settings: COMPILER_SETTINGS,
},
{
version: '0.7.6',
settings: COMPILER_SETTINGS,
},
{
version: '0.8.6',
settings: COMPILER_SETTINGS,
},
],
},
spdxLicenseIdentifier: {
overwrite: false,
runOnCompile: true,
},
contractSizer: {
alphaSort: true,
runOnCompile: false,
disambiguatePaths: false,
},
}
export default config