-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhardhat.config.ts
75 lines (69 loc) · 1.63 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
import { resolve } from "path";
require("dotenv").config();
import { HardhatUserConfig } from "hardhat/config";
import { NetworkUserConfig } from "hardhat/types";
import "@nomiclabs/hardhat-waffle";
import "@nomiclabs/hardhat-etherscan";
import "@nomiclabs/hardhat-truffle5";
import "@openzeppelin/hardhat-upgrades";
import "hardhat-typechain";
import "solidity-coverage";
import "hardhat-contract-sizer";
//if (!process.env.MNEMONICS) throw new Error("MNEMONICS missing from .env file");
if (!process.env.MAINNET_PRIVKEY)
throw new Error("MAINNET_PRIVKEY missing from .env file");
//const mnemonics = process.env.MNEMONICS;
const config = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
allowUnlimitedContractSize: true,
blockGasLimit: 100000000,
gas: 100000000,
},
bsc: {
url: `https://bsc-dataseed.binance.org/`,
accounts: [process.env.MAINNET_PRIVKEY],
},
testnet: {
url: `https://data-seed-prebsc-1-s1.binance.org:8545/`,
accounts: [process.env.MAINNET_PRIVKEY],
},
},
etherscan: {
apiKey: process.env.BSCSCAN_API,
},
paths: {
artifacts: "./artifacts",
cache: "./cache",
sources: "./contracts",
tests: "./tests",
},
solidity: {
compilers: [
{
version: "0.8.4",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
mocha: {
timeout: 2000000000,
},
typechain: {
outDir: "types/contracts",
target: "truffle-v5",
},
};
export default config;