-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
65 lines (61 loc) · 1.66 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
require('dotenv').config();
require('@nomicfoundation/hardhat-toolbox');
require('hardhat-gas-reporter');
require('@nomiclabs/hardhat-solhint');
// import hardhat CLI tasks
require('./tasks/mock-erc20');
// eslint-disable-next-line prefer-destructuring
const ACCOUNT_PRIVATE_KEY = process.env.ACCOUNT_PRIVATE_KEY;
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: {
version: '0.8.20',
settings: {
optimizer: {
enabled: true,
runs: 1000,
},
},
},
networks: {
hardhat: {
chainId: 1337,
},
mainnet: {
url: `https://eth-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_MAINNET_API_KEY}`,
accounts: [`${ACCOUNT_PRIVATE_KEY}`],
chainId: 1,
gas: 'auto',
},
sepolia: {
url: `https://eth-sepolia.g.alchemy.com/v2/${process.env.ALCHEMY_SEPOLIA_API_KEY}`,
accounts: [`${ACCOUNT_PRIVATE_KEY}`],
chainId: 11155111,
gas: 'auto',
},
polygon: {
url: `https://polygon-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_POLYGON_API_KEY}`,
accounts: [`${ACCOUNT_PRIVATE_KEY}`],
chainId: 137,
gas: 'auto',
},
polygonMumbai: {
url: `https://polygon-mumbai.g.alchemy.com/v2/${process.env.ALCHEMY_MUMBAI_API_KEY}`,
accounts: [`${ACCOUNT_PRIVATE_KEY}`],
chainId: 80001,
gas: 'auto',
},
// add more networks here
},
etherscan: {
apiKey: {
mainnet: process.env.ETHERSCAN_API_KEY,
sepolia: process.env.ETHERSCAN_API_KEY,
polygon: process.env.POLYGONSCAN_API_KEY,
polygonMumbai: process.env.POLYGONSCAN_API_KEY,
},
},
gasReporter: {
enabled: true,
},
};