-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.ts
109 lines (102 loc) · 2.61 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import * as dotenv from "dotenv";
import { HardhatUserConfig } from "hardhat/config";
import "@typechain/hardhat";
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-waffle";
import "@nomiclabs/hardhat-etherscan";
import "solidity-coverage";
import "hardhat-gas-reporter";
import "hardhat-contract-sizer";
require("hardhat-abi-exporter");
require("@openzeppelin/hardhat-upgrades");
dotenv.config();
/* This loads the variables in your .env file to `process.env` */
const { PRIVATEKEY, INFURA_PROJECT_ID, ETHERSCANAPI, Coinmarketcap_API } =
process.env;
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.7",
settings: {
optimizer: {
enabled: true,
runs: 20,
},
},
},
],
},
gasReporter: {
coinmarketcap: Coinmarketcap_API,
currency: "USD",
gasPrice: 21,
token: "ETH",
},
networks: {
mainnet: {
// ethereum mainnet
url: `https://mainnet.infura.io/v3/${INFURA_PROJECT_ID}`,
chainId: 1,
accounts: [`0x${PRIVATEKEY}`],
gasPrice: 470000000000, // gas price in gwei
},
bsc: {
//mainnet
url: `https://bsc-dataseed.binance.org/`,
chainId: 56,
accounts: [`0x${PRIVATEKEY}`],
gasPrice: 5000000000, // gas price in gwei
},
polygon: {
//mainnet
url: "https://polygon-rpc.com",
chainId: 137,
accounts: [`0x${PRIVATEKEY}`],
gasPrice: 35000000000, // gas price in gwei
},
bscTestnet: {
url: "https://data-seed-prebsc-1-s1.binance.org:8545",
chainId: 97,
accounts: [`0x${PRIVATEKEY}`],
gasPrice: 5000000000, // gas price in gwei
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${INFURA_PROJECT_ID}`,
chainId: 4,
accounts: [`0x${PRIVATEKEY}`],
gas: 4500000, // gas price in gwei
gasPrice: 10000000000, // gas is the gas limit
},
kovan: {
url: `https://kovan.infura.io/v3/${INFURA_PROJECT_ID}`,
chainId: 42,
accounts: [`0x${PRIVATEKEY}`],
gasPrice: 35000000000, // gas price in gwei
},
polygonMumbai: {
url: "https://rpc-mumbai.maticvigil.com ",
chainId: 80001,
accounts: [`0x${PRIVATEKEY}`],
gasPrice: 35000000000,
},
},
typechain: {
outDir: "types",
target: "ethers-v5",
},
etherscan: {
apiKey: { rinkeby: `${ETHERSCANAPI}`, polygon: "abc" },
},
mocha: {
timeout: 2000000000,
},
contractSizer: {
alphaSort: true,
disambiguatePaths: false,
runOnCompile: true,
strict: true,
only: ["Greeter$"],
},
};
export default config;