forked from KaladinStormBlessed16/RacksProjectManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
66 lines (64 loc) · 1.34 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
require("@nomiclabs/hardhat-etherscan");
require("@nomicfoundation/hardhat-chai-matchers");
require("hardhat-deploy");
require("solidity-coverage");
require("hardhat-contract-sizer");
// require("hardhat-gas-reporter");
require("@nomiclabs/hardhat-solhint");
require("dotenv").config({ path: ".env" });
const RPC_URL = process.env.RPC_URL || "https://polygon-mumbai.g.alchemy.com/v2/";
const POLYGON_MAINNET_RPC_URL = "https://poligon.alchemyapi.io/v2/your-api-key";
const PRIVATE_KEY = process.env.PRIVATE_KEY || "PRIVATE_KEY";
const POLYGONSCAN_API_KEY = process.env.POLYGONSCAN_API_KEY || "";
module.exports = {
defaultNetwork: "hardhat",
solidity: {
version: "0.8.19",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
compilers: [
{
version: "0.8.19",
},
{
version: "0.8.0",
},
],
},
networks: {
hardhat: {
chainId: 31337,
},
mumbai: {
url: "https://rpc-mumbai.maticvigil.com",
accounts: [PRIVATE_KEY],
chainId: 80001,
blockConfirmations: 6,
},
polygon: {
url: POLYGON_MAINNET_RPC_URL,
accounts: PRIVATE_KEY !== undefined ? [PRIVATE_KEY] : [],
saveDeployments: true,
chainId: 137,
},
},
etherscan: {
apiKey: POLYGONSCAN_API_KEY,
},
namedAccounts: {
deployer: {
default: 0,
1: 0,
},
player: {
default: 1,
},
},
mocha: {
timeout: 40000,
},
};