-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.js
110 lines (108 loc) · 2.66 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
100
101
102
103
104
105
106
107
108
109
110
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-etherscan");
require("hardhat-deploy");
require("solidity-coverage");
require("hardhat-gas-reporter");
require("hardhat-contract-sizer");
require("dotenv").config();
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const GORRLI_RPC_URL = process.env.GOERLI_RPC_URL;
const RINKEBY_RPC_URL = process.env.RINKEBY_RPC_URL;
const RINKEBY_PRIVATE_KEY = process.env.RINKEBY_PRIVATE_KEY;
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY;
const COINMARKET_KEY = process.env.COINMARKET_KEY;
const ARB_RPC_URL = process.env.ARB_RPC_URL;
const MUMBAI_RPC_URL = process.env.MUMBAI_RPC_URL;
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
module.exports = {
solidity: {
compilers: [
{ version: "0.4.22" },
{ version: "0.8.7" },
{ version: "0.6.6" },
{ version: "0.8.4" },
{ version: "0.8.0" },
{ version: "0.8.8" },
{ version: "0.8.13" },
{ version: "0.8.14" },
],
},
networks: {
polygon: {
url: "https://polygon-mainnet.infura.io/v3/be819d15039f41ca9e45081e212d1c9a", //
accounts: [RINKEBY_PRIVATE_KEY],
chainId: 137,
},
mumbai: {
url: "https://polygon-mumbai.g.alchemy.com/v2/KhO9Yy5q0IngUt5Ywg8-Flz5VbSPM0ym", //
accounts: [RINKEBY_PRIVATE_KEY],
chainId: 80001,
},
arb: {
chainId: 42161,
url: ARB_RPC_URL,
accounts: [RINKEBY_PRIVATE_KEY],
blockConfirmations: 6,
},
hardhat: {
allowUnlimitedContractSize: true,
// // If you want to do some forking, uncomment this
// forking: {
// url: MAINNET_RPC_URL
// }
chainId: 31337,
},
localhost: {
chainId: 31337,
},
rinkeby: {
url: RINKEBY_RPC_URL,
accounts: [RINKEBY_PRIVATE_KEY],
chainId: 4,
blockConfirmations: 6,
},
mumbai: {
url: MUMBAI_RPC_URL,
accounts: [RINKEBY_PRIVATE_KEY],
chainId: 80001,
blockConfirmations: 6,
},
goerli: {
url: GORRLI_RPC_URL,
accounts: [RINKEBY_PRIVATE_KEY],
chainId: 5,
blockConfirmations: 6,
},
},
namedAccounts: {
deployer: {
default: 0,
},
player: {
default: 1,
},
},
gasReporter: {
blockLimit: 100000000,
enabled: true,
outputFile: "gas-reports.txt",
noColors: true,
showTimeSpent: true,
currency: "USD",
coinmarketcap: COINMARKET_KEY,
coin: "ETH",
},
etherscan: {
apiKey: ETHERSCAN_API_KEY,
},
mocha: {
timeout: 2000000,
},
};