-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.js
78 lines (74 loc) · 2.2 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
require("@nomicfoundation/hardhat-toolbox");
require("dotenv").config();
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY;
const POLYGONSCAN_API_KEY = process.env.POLYGONSCAN_API_KEY;
const ALCHEMY_API_KEY = process.env.ALCHEMY_API_KEY;
// change these for different networks
const ALCHEMY_URL = `https://polygon-mumbai.g.alchemy.com/v2/${ALCHEMY_API_KEY}`;
//const ALCHEMY_URL = `https://polygon-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}`;
//const ALCHEMY_URL = `https://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}`;
//const ALCHEMY_URL = `https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}`;
const STUNT_WALLET_PRIVATE_KEY = process.env.STUNT_WALLET_PRIVATE_KEY;
const COINMARKETCAP_API_KEY = process.env.COINMARKETCAP_API_KEY;
module.exports = {
etherscan: {
apiKey: {
mainnet: ETHERSCAN_API_KEY,
sepolia: ETHERSCAN_API_KEY,
polygon: POLYGONSCAN_API_KEY,
polygonMumbai: POLYGONSCAN_API_KEY,
},
},
gasReporter: {
enabled: process.env.REPORT_GAS ? true : false,
currency: "USD",
coinmarketcap: COINMARKETCAP_API_KEY,
token: "MATIC",
outputFile: "gas-report.txt",
noColors: true,
},
defaultNetwork: "polygonMumbai", // hardhat for testing, change this for different networks
networks: {
hardhat: {
chainId: 31337,
},
polygonMumbai: {
url: ALCHEMY_URL,
accounts: [STUNT_WALLET_PRIVATE_KEY],
gasPrice: 35000000000,
chainId: 80001,
},
polygon: {
url: ALCHEMY_URL,
accounts: [STUNT_WALLET_PRIVATE_KEY],
gasPrice: 35000000000,
chainId: 137,
},
sepolia: {
url: ALCHEMY_URL,
accounts: [STUNT_WALLET_PRIVATE_KEY],
gasPrice: 35000000000,
chainId: 11155111,
},
ethereum: {
url: ALCHEMY_URL,
accounts: [STUNT_WALLET_PRIVATE_KEY],
gasPrice: 35000000000,
chainId: 1,
},
},
solidity: {
version: "0.8.20", // use an exact version here and in contract to avoid verification problems
settings: {
optimizer: {
enabled: false, // may cause verification problems if true
},
},
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
};