-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
71 lines (68 loc) · 1.4 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/config";
import "@nomicfoundation/hardhat-toolbox";
import "@nomicfoundation/hardhat-verify";
import "@openzeppelin/hardhat-upgrades";
import "hardhat-abi-exporter";
require("dotenv").config();
const { PRIVATE_KEY, BSCSCAN_KEY, POLYGON_KEY } = process.env;
const config: HardhatUserConfig = {
solidity: {
version: "0.8.19",
settings: {
optimizer: {
enabled: true,
runs: 1000,
},
},
},
defaultNetwork: "hardhat",
gasReporter: {
currency: "USD",
gasPrice: 100,
enabled: true,
},
abiExporter: {
clear: true,
path: "./abi",
runOnCompile: true,
flat: true,
spacing: 2,
pretty: false,
},
paths: {
sources: "./contracts",
tests: "./test/",
},
mocha: {
timeout: 0,
parallel: false,
fullTrace: true,
},
networks: {
hardhat: {
accounts: {
count: 10,
},
},
bsctest: {
url: "https://data-seed-prebsc-1-s1.binance.org:8545/",
accounts: [PRIVATE_KEY || ""],
},
polygon_mumbai: {
url: "https://rpc-mumbai.maticvigil.com/",
accounts: [PRIVATE_KEY || ""],
gasPrice: 5000000000,
},
},
etherscan: {
apiKey: {
bscTestnet: BSCSCAN_KEY || "",
polygonMumbai: POLYGON_KEY || "",
},
},
typechain: {
outDir: "typechain-types",
target: "ethers-v6",
},
};
export default config;