-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhardhat.config.ts
85 lines (80 loc) · 2.22 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
import '@typechain/hardhat'
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-solhint'
import '@nomiclabs/hardhat-waffle'
import '@nomiclabs/hardhat-etherscan'
import 'hardhat-deploy'
import 'hardhat-gas-reporter'
import 'hardhat-contract-sizer'
import 'solidity-coverage'
import 'tsconfig-paths/register'
import { HardhatUserConfig } from 'hardhat/types'
import { task } from 'hardhat/config'
import { pathStore } from './libs/shared/store-path/src'
task('accounts', 'Prints the list of accounts', async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners()
for (const account of accounts) {
console.log(account.address)
}
})
const walletMnemonic = process.env.WALLET_MNEMONIC || ''
const etherscanApiKey = process.env.ETHERSCAN_API_KEY || ''
const ropstenRpcUrl = process.env.ROPSTEN_RPC_URL || ''
const ropstenMnemonic = process.env.ROPSTEN_MNEMONIC || ''
const testReportGas = process.env.TEST_REPORT_GAS || '1'
const config: HardhatUserConfig = {
defaultNetwork: 'hardhat',
networks: {
// Hardhat dev Ethereum network node running on localhost
hardhat: {
chainId: 1337,
accounts: {
count: 10,
mnemonic: walletMnemonic,
},
initialBaseFeePerGas: 0,
},
// Hardhat dev Ethereum network node running in local dev Kubernetes
hardhatK8s: {
chainId: 1337,
accounts: {
count: 100,
mnemonic: walletMnemonic,
},
url: 'http://ethereum-node:8545',
},
ropsten: {
chainId: 3,
gas: 5000000,
gasPrice: 50000000000,
gasMultiplier: 1,
timeout: 90000,
url: ropstenRpcUrl,
accounts: {
mnemonic: ropstenMnemonic,
},
},
},
gasReporter: {
enabled: testReportGas === '1',
showMethodSig: true,
},
etherscan: {
apiKey: etherscanApiKey,
},
solidity: {
version: '0.8.9',
},
paths: {
root: './',
sources: './apps/contracts/src/contracts',
tests: './apps/contracts/src/tests',
cache: `${pathStore.root}/dist/apps/contracts/cache`,
artifacts: `${pathStore.root}/dist/apps/contracts/artifacts`,
},
typechain: {
outDir: `${pathStore.root}/libs/shared/util-contract/src`,
target: 'ethers-v5',
},
}
export default config