-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhardhat.config.ts
74 lines (68 loc) · 1.84 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
import "@nomiclabs/hardhat-waffle";
import "@nomiclabs/hardhat-etherscan";
import "hardhat-gas-reporter";
import { HardhatUserConfig } from "hardhat/types";
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
let accounts = {
mnemonic: process.env.MNEMONIC,
initialIndex: 0,
count: 20,
accountsBalance: "990000000000000000000",
};
if (!process.env.MNEMONIC) accounts = undefined;
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const config: HardhatUserConfig = {
solidity: {
version: "0.8.4",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
networks: {
hardhat: {
accounts: process.env.MNEMONIC && accounts,
forking: {
url: "https://bsc.getblock.io/mainnet/\?api_key\=92709805-c310-4657-970f-fe82aab71ac8",
// url: process.env.FORKMATIC
// ? "https://matic.getblock.io/mainnet/?api_key=660a41be-e64a-4519-a8b6-0a2d3dfc2882"
// : "https://bsc-dataseed.binance.org/",
// url: `https://eth-ropsten.alchemyapi.io/v2/${process.env.ALCHEMY_ROPSTEN_API_KEY}`,
},
mining: {
auto: true,
interval: 3000,
},
},
localhost: {
url: "http://127.0.0.1:8545",
accounts: accounts,
timeout: 30000,
},
mainnet: {
url: "https://bsc-dataseed.binance.org/",
chainId: 56,
accounts: accounts,
},
polygon: {
url: "https://matic.getblock.io/mainnet/?api_key=660a41be-e64a-4519-a8b6-0a2d3dfc2882",
chainId: 137,
accounts,
},
},
gasReporter: {
currency: "USD",
coinmarketcap: "f23881e4-61d8-4f11-a129-280693461115",
gasPrice: 5,
enabled: process.env.REPORT_GAS ? true : false,
},
etherscan: {
apiKey: "7BS63ZC78Z1BM34YDE28CX8V2B6W7BC8DR",
},
};
export default config;