-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.ts
77 lines (67 loc) · 1.45 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
import Dotenv from 'dotenv';
// Hardhat plugins
import '@nomicfoundation/hardhat-chai-matchers';
import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-etherscan';
import '@typechain/hardhat';
import 'hardhat-abi-exporter';
import 'hardhat-contract-sizer';
import 'hardhat-spdx-license-identifier';
Dotenv.config();
const { ETH_MAIN_KEY, ETH_TEST_KEY, ETHERSCAN_KEY } = process.env;
const pkeyMainnet =
ETH_MAIN_KEY == undefined || ETH_MAIN_KEY.length == 0
? 'f'.repeat(64)
: ETH_MAIN_KEY;
const pkeyTestnet =
ETH_TEST_KEY == undefined || ETH_TEST_KEY.length == 0
? 'f'.repeat(64)
: ETH_TEST_KEY;
export default {
solidity: {
compilers: [
{
version: '0.8.19',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
networks: {
mainnet: {
url: `https://rpc.ankr.com/eth`,
accounts: [pkeyMainnet],
timeout: 100000,
},
goerli: {
url: `https://rpc.ankr.com/eth_goerli`,
accounts: [pkeyTestnet],
blockGasLimit: 120000000000,
timeout: 300000,
},
},
abiExporter: {
runOnCompile: true,
path: './abi',
clear: true,
flat: true,
},
etherscan: {
apiKey: ETHERSCAN_KEY,
},
spdxLicenseIdentifier: {
overwrite: false,
runOnCompile: true,
},
typechain: {
alwaysGenerateOverloads: true,
outDir: 'typechain',
},
mocha: {
timeout: 60000,
},
};