-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
168 lines (161 loc) · 4.93 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
import * as dotenv from 'dotenv'
import { HardhatUserConfig, task } from 'hardhat/config'
import '@nomiclabs/hardhat-etherscan'
import '@nomiclabs/hardhat-waffle'
import '@typechain/hardhat'
import 'hardhat-gas-reporter'
import 'solidity-coverage'
import "@matterlabs/hardhat-zksync-deploy";
import "@matterlabs/hardhat-zksync-solc";
import "@matterlabs/hardhat-zksync-verify";
dotenv.config()
// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task('accounts', 'Prints the list of accounts', async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners()
for (const account of accounts) {
console.log(account.address)
}
})
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
const config: HardhatUserConfig = {
solidity: '0.8.4',
zksolc: {
version: "1.3.8",
compilerSource: "binary",
settings: {},
},
networks: {
rinkeby: {
url: process.env.RINKEBY_TEST || 'https://rinkeby-light.eth.linkpool.io',
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
mumbai: {
url: process.env.MUMBAI_TEST || 'https://matic-mumbai.chainstacklabs.com',
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
goerli: {
url: process.env.GOERLI_TEST,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
optimismKovan: {
url: process.env.OPTIMISM_KOVAN_TEST,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
arbitrumRinkeby: {
url: process.env.ARBITRUM_RINKEBY_TEST,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
arbitrum: {
url: process.env.ARBITRUM_RPC,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
aurora: {
url: process.env.AURORA_RPC,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
avalanche: {
url: process.env.AVALANCHE_RPC,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
bsc: {
url: process.env.BSC_RPC,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
ethereum: {
url: process.env.ETHEREUM_RPC,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
fantom: {
url: process.env.FANTOM_RPC,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
optimism: {
url: process.env.OPTIMISM_RPC,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
polygon: {
url: process.env.POLYGON_RPC,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
xdai: {
url: process.env.XDAI_RPC,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
zkSync:{
url: process.env.ZKSYNC_RPC,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
zksync: true,
ethNetwork: "ethereum",
verifyURL: "https://zksync2-mainnet-explorer.zksync.io/contract_verification"
},
zkevm: {
url: process.env.ZKEVM_RPC,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
auroratestnet: {
url: process.env.AURORA_TESTNET_RPC,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
zkSyncTestnet:{
url: process.env.ZKSYNC_TESTNET_RPC,
ethNetwork: "goerli", // or a Goerli RPC endpoint from Infura/Alchemy/Chainstack etc.
zksync: true,
},
baseTestnet: {
url: process.env.BASE_TESTNET_RPC,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
base: {
url: process.env.BASE_RPC,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
mantle: {
url: process.env.MANTLE_RPC,
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
linea: {
url: process.env.LINEA_RPC,
accounts:
process.env.SOCKET_DEPLOYER_KEY !== undefined ? [process.env.SOCKET_DEPLOYER_KEY] : [],
}
},
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
currency: 'USD',
},
etherscan: {
apiKey: {
linea: process.env.ETHERSCAN_API_KEY
},
customChains: [{
network: "linea",
chainId: 59144,
urls: {
browserURL: "https://lineascan.build/",
apiURL: "https://api.lineascan.build/api",
},
}]
},
}
export default config