-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.ts
94 lines (79 loc) · 1.93 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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
// import "@sebasgoldberg/hardhat-wsprovider";
import { config as dotenvConfig } from "dotenv";
import { resolve } from "path";
const dotenvConfigPath: string = process.env.DOTENV_CONFIG_PATH || "./.env";
dotenvConfig({ path: resolve(__dirname, dotenvConfigPath) });
const {
PRIVATE_KEY = '',
GOERLI_URL_NET = '',
GOERLI_API_KEY = '',
MUMBAI_URL_NET = '',
MUMBAI_API_KEY = '',
TEST_BSC_URL_NET = '',
POLYGON_URL_NET = '',
POLYGON_API_KEY = '',
MAINNET_URL_NET = '',
MAINNET_API_KEY = '',
COINMARKETCAP_API_KEY = '',
GAS_REPORT = false,
TEST_GAS = false,
} = process.env;
const config: HardhatUserConfig = {
solidity: {
version: "0.8.17",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
outputSelection: {
"*": {
"*": ["storageLayout"],
},
},
},
},
networks: {
localhost: {
url: "http://127.0.0.1:8545",
},
goerli: {
url: GOERLI_URL_NET + GOERLI_API_KEY,
accounts: [PRIVATE_KEY],
},
mumbai: {
url: MUMBAI_URL_NET + MUMBAI_API_KEY,
accounts: [PRIVATE_KEY],
},
testBsc: {
url: TEST_BSC_URL_NET,
accounts: [PRIVATE_KEY],
},
// polygon: {
// url: POLYGON_URL_NET + POLYGON_API_KEY,
// accounts: [PRIVATE_KEY],
// },
// mainnet: {
// url: MAINNET_URL_NET + MAINNET_API_KEY,
// accounts: [MAINNET_PRIVATE_KEY],
// },
},
paths: {
tests: TEST_GAS ? './gas' : './test',
},
gasReporter: {
enabled: GAS_REPORT ? true : false,
showTimeSpent: true,
showMethodSig: true,
onlyCalledMethods: true,
// currency: "RUB",
coinmarketcap: COINMARKETCAP_API_KEY,
// noColors: true,
// gasPrice: 15,
// excludeContracts: ['Migrations.sol', 'Wallets/'],
// src: './contracts/',
},
};
export default config;