forked from wolfcito/mode-spray-hardhat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
176 lines (172 loc) · 4.61 KB
/
hardhat.config.ts
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
import { HardhatUserConfig } from 'hardhat/config'
import '@nomicfoundation/hardhat-toolbox'
require('hardhat-deploy')
import '@openzeppelin/hardhat-upgrades'
import * as dotenv from 'dotenv'
dotenv.config()
const {
DEPLOYER_PRIVATE_KEY,
ETHERSCAN_API_KEY,
DEPLOYER_BASE_PRIVATE_KEY,
BASESCAN_API_KEY,
OPSCAN_API_KEY,
} = process.env
const providerApiKey =
process.env.ALCHEMY_API_KEY || 'oKxs-03sij-U_N0iOlrSsZFr29-IqbuF'
const config: HardhatUserConfig = {
networks: {
hardhat: {
forking: {
url: `https://eth-mainnet.alchemyapi.io/v2/${providerApiKey}`,
enabled: process.env.MAINNET_FORKING_ENABLED === 'true',
},
},
// mode chains
modetest: {
url: 'https://sepolia.mode.network',
chainId: 919,
accounts: [DEPLOYER_PRIVATE_KEY as string], //BE VERY CAREFUL, DO NOT PUSH THIS TO GITHUB
gasPrice: 10000,
},
mode: {
url: 'https://mainnet.mode.network',
chainId: 34443,
accounts: [DEPLOYER_PRIVATE_KEY as string], //BE VERY CAREFUL, DO NOT PUSH THIS TO GITHUB
// gasPrice: 10000,
},
// base chains
// for mainnet
'base-mainnet': {
url: 'https://mainnet.base.org',
accounts: [DEPLOYER_BASE_PRIVATE_KEY as string],
gasPrice: 1000000000,
},
// for testnet
'base-sepolia': {
url: 'https://sepolia.base.org',
accounts: [DEPLOYER_BASE_PRIVATE_KEY as string],
gasPrice: 1000000000,
},
// for local dev environment
'base-local': {
url: 'http://localhost:8545',
accounts: [DEPLOYER_BASE_PRIVATE_KEY as string],
gasPrice: 1000000000,
},
'optimism-sepolia': {
url: 'https://sepolia.optimism.io',
chainId: 11155420,
accounts: [DEPLOYER_PRIVATE_KEY as string], //BE VERY CAREFUL, DO NOT PUSH THIS TO GITHUB
gasPrice: 10000,
},
optimism: {
url: 'https://mainnet.optimism.io',
chainId: 10,
accounts: [DEPLOYER_PRIVATE_KEY as string], //BE VERY CAREFUL, DO NOT PUSH THIS TO GITHUB
// gasPrice: 10000,
},
'scroll-sepolia': {
url: 'https://sepolia-rpc.scroll.io',
chainId: 534351,
accounts: [DEPLOYER_PRIVATE_KEY as string], //BE VERY CAREFUL, DO NOT PUSH THIS TO GITHUB
gasPrice: 1000000000,
},
scroll: {
url: 'https://rpc.scroll.io',
chainId: 534352,
accounts: [DEPLOYER_PRIVATE_KEY as string], //BE VERY CAREFUL, DO NOT PUSH THIS TO GITHUB
gasPrice: 1000000000,
},
},
solidity: {
version: '0.8.20',
settings: {
// optimizer: {
// enabled: true,
// runs: 200,
// },
evmVersion: 'london',
},
},
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
currency: 'USD',
},
sourcify: {
enabled: true,
},
etherscan: {
apiKey: {
mode: ETHERSCAN_API_KEY as string,
'base-mainnet': BASESCAN_API_KEY as string,
optimism: OPSCAN_API_KEY as string,
},
customChains: [
{
network: 'modetest',
chainId: 919,
urls: {
apiURL: 'https://sepolia.explorer.mode.network/api',
browserURL: 'https://sepolia.explorer.mode.network/',
},
},
{
network: 'mode',
chainId: 34443,
urls: {
apiURL: 'https://explorer.mode.network/api',
browserURL: 'https://explorer.mode.network/',
},
},
{
network: 'base-sepolia',
chainId: 84532,
urls: {
apiURL: 'https://api-sepolia.basescan.org/api',
browserURL: 'https://sepolia.basescan.org',
},
},
{
network: 'base-mainnet',
chainId: 8453,
urls: {
apiURL: 'https://api.basescan.org/api',
browserURL: 'https://basescan.org',
},
},
{
network: 'optimism-sepolia',
chainId: 11155420,
urls: {
apiURL: 'https://sepolia-optimistic.etherscan.io/api',
browserURL: 'https://sepolia-optimistic.etherscan.io/',
},
},
{
network: 'optimism',
chainId: 10,
urls: {
apiURL: 'https://optimistic.etherscan.io/api',
browserURL: 'https://optimistic.etherscan.io/',
},
},
{
network: 'scroll-sepolia',
chainId: 534351,
urls: {
apiURL: 'https://sepolia.scrollscan.com/api',
browserURL: 'https://sepolia.scrollscan.com/',
},
},
{
network: 'scroll',
chainId: 534352,
urls: {
apiURL: 'https://scrollscan.com/api',
browserURL: 'https://scrollscan.com/',
},
},
],
},
}
export default config