-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.js
98 lines (98 loc) · 2.14 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
require("@nomicfoundation/hardhat-toolbox");
require("dotenv").config();
require("hardhat-contract-sizer");
require("hardhat-deploy");
require("@nomicfoundation/hardhat-verify");
/** @type import('hardhat/config').HardhatUserConfig */
const GORELLI_RPC_URL = process.env.GORELLI_RPC_URL;
const PRIVATE_KEY = process.env.PRIVATE_KEY;
const API_KEY = process.env.ETHERSCAN_API_KEY;
const POLYGON_API_KEY = process.env.POLYGON_API_KEY;
const COIN_MARKET_CAP_API_KEY = process.env.COIN_MARKET_CAP_API_KEY;
const SEPOLIA_RPC_URL = process.env.SEPOLIA_RPC_URL;
module.exports = {
defaultNetwork: "hardhat",
networks: {
goreli: {
url: GORELLI_RPC_URL,
accounts: [PRIVATE_KEY],
chainId: 5,
blockConfirmations: 6,
},
sepolia: {
url: SEPOLIA_RPC_URL,
chainId: 11155111,
accounts: [PRIVATE_KEY],
blockConfirmations: 6,
},
localhost: {
url: "http://127.0.0.1:8545/",
chainId: 31337,
blockConfirmations: 1,
},
polygon_mumbai: {
url: "https://polygon-mumbai.g.alchemy.com/v2/kTZxIUR6MKogwu-aarjjs5euIVls4j0j",
accounts: [PRIVATE_KEY],
blockConfirmations: 6,
chainId: 80001,
},
},
solidity: {
compilers: [
{
version: "0.8.0",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: "0.8.20",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: "0.6.12",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
namedAccounts: {
deployer: {
default: 0,
},
player: {
default: 1,
},
},
etherscan: {
apiKey: {
goerli: API_KEY,
polygonMumbai: POLYGON_API_KEY,
sepolia: API_KEY,
},
customChains: [],
},
gasReporter: {
enabled: true,
outputFile: "gas-report.txt",
noColors: true,
currency: "USD",
coinmarketcap: COIN_MARKET_CAP_API_KEY,
token: "MATIC",
},
mocha: {
timeout: 400000,
},
};