-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
150 lines (148 loc) · 4.33 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
import { HardhatUserConfig } from 'hardhat/config';
import '@nomicfoundation/hardhat-toolbox';
import '@layerzerolabs/toolbox-hardhat';
import 'solidity-coverage';
import 'hardhat-deploy';
import { EndpointId } from '@layerzerolabs/lz-definitions';
import dotenv from 'dotenv';
dotenv.config();
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: '0.8.24',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
evmVersion: 'cancun',
},
},
],
},
networks: {
ethereum_mainnet: {
eid: EndpointId.ETHEREUM_V2_MAINNET,
url: process.env.ETH_MAINNET as string,
accounts: [process.env.USER_PRIVATE_KEY as string],
},
ethereum_testnet: {
eid: EndpointId.SEPOLIA_V2_TESTNET,
url: process.env.ETH_SEPOLIA as string,
accounts: [process.env.ADMIN_PRIVATE_KEY as string],
},
linea_mainnet: {
eid: 30183,
url: process.env.LINEA_MAINNET as string,
accounts: [process.env.USER_PRIVATE_KEY as string],
},
linea_testnet: {
eid: EndpointId.LINEASEP_V2_TESTNET,
url: process.env.LINEA_SEPOLIA as string,
accounts: [process.env.ADMIN_PRIVATE_KEY as string],
},
scroll_mainnet: {
eid: EndpointId.SCROLL_V2_MAINNET,
url: process.env.SCROLL_MAINNET as string,
accounts: [process.env.USER_PRIVATE_KEY as string],
},
scroll_testnet: {
eid: EndpointId.SCROLL_V2_TESTNET,
url: process.env.SCROLL_SEPOLIA as string,
accounts: [process.env.ADMIN_PRIVATE_KEY as string],
},
xlayer_mainnet: {
eid: EndpointId.XLAYER_V2_MAINNET,
url: process.env.XLAYER_MAINNET as string,
accounts: [process.env.USER_PRIVATE_KEY as string],
},
xlayer_testnet: {
eid: EndpointId.XLAYER_V2_TESTNET,
url: process.env.XLAYER_TESTNET as string,
accounts: [process.env.USER_PRIVATE_KEY as string],
},
base_mainnet: {
eid: EndpointId.BASE_MAINNET,
url: process.env.BASE_MAINNET as string,
accounts: [process.env.USER_PRIVATE_KEY as string],
},
base_testnet: {
eid: EndpointId.BASESEP_V2_TESTNET,
url: process.env.BASE_SEPOLIA as string,
accounts: [process.env.ADMIN_PRIVATE_KEY as string],
},
morph_testnet: {
url: process.env.MORPH_TESTNET as string,
accounts: [process.env.USER_PRIVATE_KEY as string],
},
},
etherscan: {
apiKey: {
ethereum_mainnet: process.env.ETHERSCAN_API_KEY as string,
ethereum_testnet: process.env.ETHERSCAN_API_KEY as string,
linea_mainnet: process.env.LINEASCAN_API_KEY as string,
linea_testnet: process.env.LINEASCAN_API_KEY as string,
scroll_mainnet: process.env.SCROLLSCAN_API_KEY as string,
scroll_testnet: process.env.SCROLLSCAN_API_KEY as string,
base_mainnet: process.env.BASESCAN_API_KEY as string,
morph_testnet: 'anything',
},
customChains: [
{
network: 'linea_mainnet',
chainId: 59144,
urls: {
apiURL: 'https://api.lineascan.build/api',
browserURL: 'https://lineascan.build',
},
},
{
network: 'linea_testnet',
chainId: 59141,
urls: {
apiURL: 'https://api-sepolia.lineascan.build/api',
browserURL: 'https://sepolia.lineascan.build',
},
},
{
network: 'scroll_mainnet',
chainId: 534352,
urls: {
apiURL: 'https://api.scrollscan.com/api',
browserURL: 'https://scrollscan.build',
},
},
{
network: 'scroll_testnet',
chainId: 534351,
urls: {
apiURL: 'https://api-sepolia.scrollscan.com/api',
browserURL: 'https://sepolia.scrollscan.build',
},
},
{
network: 'base_mainnet',
chainId: 8453,
urls: {
apiURL: 'https://api.basescan.com/api',
browserURL: 'https://basescan.build',
},
},
{
network: 'morph_testnet',
chainId: 2810,
urls: {
apiURL: 'https://explorer-api-holesky.morphl2.io/api? ',
browserURL: 'https://explorer-holesky.morphl2.io/',
},
},
],
},
namedAccounts: {
deployer: {
default: 0, // wallet address of index[0], of the mnemonic in .env
},
},
};
export default config;