-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.js
100 lines (94 loc) · 2.27 KB
/
hardhat.config.js
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
//import { resolve } from "path";
require("dotenv").config();
// import { HardhatUserConfig } from "hardhat/config";
// import { NetworkUserConfig } from "hardhat/types";
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-etherscan");
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-truffle5");
require("hardhat-typechain");
require("hardhat-contract-sizer");
if (!process.env.MUMBAI_PRIVKEY) throw new Error("MUMBAI_PRIVKEY missing from .env file");
if (!process.env.MAINNET_PRIVKEY) throw new Error("MAINNET_PRIVKEY missing from .env file");
module.exports = {
defaultNetwork: "hardhat",
networks: {
localhost: {
url: `http://127.0.0.1:8545`,
},
// hardhat: {
// forking: {
// url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_KEY}`,
// blockNumber: 11589707,
// },
// },
mumbai: {
chainId: 80001,
url: `https://polygon-mumbai.g.alchemy.com/v2/${process.env.ALCHEMY_KEY}`,
accounts: [process.env.MUMBAI_PRIVKEY],
},
matic: {
chainId: 137,
url: "https://polygon-rpc.com",
accounts: [process.env.MAINNET_PRIVKEY],
gasPrice: 8000000000,
},
bsctest: {
accounts: [process.env.MUMBAI_PRIVKEY || ""],
chainId: 97,
url: "https://data-seed-prebsc-1-s1.binance.org:8545",
timeout: 99999,
gasPrice: 20e9,
gas: 35e5,
},
bsc: {
accounts: [process.env.MAINNET_PRIVKEY || ""],
chainId: 56,
url: "https://bsc-dataseed1.ninicoin.io/",
timeout: 999999,
gasPrice: 20e9,
gas: 35e5,
},
},
etherscan: {
apiKey: process.env.POLYSCAN_API,
},
paths: {
artifacts: "./artifacts",
cache: "./cache",
sources: "./contracts",
tests: "./test",
},
solidity: {
compilers: [
{
version: "0.8.9",
settings: {},
},
{
version: "0.6.12",
settings: {},
},
],
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
mocha: {
timeout: 2000000000,
},
typechain: {
outDir: "types/contracts",
target: "truffle-v5",
},
contractSizer: {
alphaSort: true,
disambiguatePaths: false,
runOnCompile: true,
strict: true,
only: ["SAM*"],
},
};