-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.js
85 lines (83 loc) · 2.3 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
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-etherscan");
require("@nomiclabs/hardhat-waffle");
require("hardhat-deploy");
require("hardhat-gas-reporter");
require("solidity-coverage");
require("hardhat-contract-sizer");
require("dotenv").config();
const GOERLI_RPC_URL = process.env.GOERLI_TESTNET_RPC_URL || "https://eth-goerli/";
const PRIVATE_KEY = process.env.PRIVATE_KEY || "0xkey";
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY || "";
const COINMARKETCAP_API_KEY = process.env.COINMARKETCAP_API_KEY || "";
const REPORT_GAS = process.env.REPORT_GAS || false;
module.exports = {
solidity: "0.8.17",
defaultNetwork: "hardhat",
paths: {
deploy: "deploy",
deployments: "deployments",
},
networks: {
localhost: {
chainId: 31337,
live: false,
saveDeployments: true,
tags: ["local"],
blockConfirmations: 1,
},
hardhat: {
chainId: 31337,
live: false,
saveDeployments: true,
tags: ["test", "local"],
blockConfirmations: 1,
gas: "auto",
},
goerli: {
chainId: 5,
live: true,
saveDeployments: true,
tags: ["staging", "live"],
url: GOERLI_RPC_URL,
accounts: PRIVATE_KEY !== undefined ? [PRIVATE_KEY] : [],
blockConfirmations: 6,
gas: "auto",
},
},
etherscan: {
// yarn hardhat verify --network <NETWORK> <CONTRACT_ADDRESS> <CONSTRUCTOR_PARAMETERS>
apiKey: {
mainnet: ETHERSCAN_API_KEY,
goerli: ETHERSCAN_API_KEY,
},
},
gasReporter: {
enabled: REPORT_GAS == "true" ? true : false,
outputFile: "gas-report.txt",
currency: "USD",
noColors: true,
token: "ETH", // ETH (default), BNB, MATIC, AVAX
// coinmarketcap: COINMARKETCAP_API_KEY,
},
contractSizer: {
runOnCompile: false,
},
namedAccounts: {
deployer: {
default: 0,
},
player1: {
default: 1,
},
player2: {
default: 2,
},
player3: {
default: 3,
},
},
mocha: {
timeout: 100000, // 100 seconds max
},
};