-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathhardhat.config.js
36 lines (35 loc) · 1.21 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
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-ethers");
require("dotenv").config(); // For loading environment variables
// This is a sample Hardhat configuration file
module.exports = {
solidity: {
version: "0.8.0", // Specify the Solidity version
settings: {
optimizer: {
enabled: true, // Enable the optimizer
runs: 200, // Optimize for how many times you intend to run the code
},
},
},
networks: {
hardhat: {
chainId: 1337, // Default Hardhat network chain ID
},
rinkeby: {
url: process.env.RINKEBY_URL, // Infura or Alchemy URL for Rinkeby
accounts: [process.env.PRIVATE_KEY], // Private key for deploying contracts
},
mainnet: {
url: process.env.MAINNET_URL, // Infura or Alchemy URL for Mainnet
accounts: [process.env.PRIVATE_KEY], // Private key for deploying contracts
},
// Add more networks as needed
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY, // Etherscan API key for contract verification
},
mocha: {
timeout: 20000, // Set timeout for tests
},
};