-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patharbitrum.config.ts
48 lines (43 loc) · 1.35 KB
/
arbitrum.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
import { ChainId, NetworkExplorer, NetworkName, rpcUrls } from '@constants/network';
import defaultConfig from './hardhat.config';
import { log } from './helpers/logger';
const { PRIVATE_KEY, ARBISCAN_API_KEY } = process.env;
if (!PRIVATE_KEY) {
throw new Error('MantleConfig: The private key is required');
}
log(`Using Arbitrum config`);
defaultConfig.networks = {
...defaultConfig.networks,
[NetworkName.ArbitrumOne]: {
url: rpcUrls[ChainId.ArbitrumOne],
accounts: [PRIVATE_KEY],
chainId: ChainId.ArbitrumOne,
},
[NetworkName.ArbitrumSepolia]: {
url: rpcUrls[ChainId.ArbitrumSepolia],
accounts: [PRIVATE_KEY],
chainId: ChainId.ArbitrumSepolia,
},
};
defaultConfig.etherscan = {
apiKey: ARBISCAN_API_KEY,
customChains: [
{
network: NetworkName.ArbitrumOne,
chainId: ChainId.ArbitrumOne,
urls: {
apiURL: 'https://api.arbiscan.io/api',
browserURL: NetworkExplorer.ArbitrumOne,
},
},
{
network: NetworkName.ArbitrumSepolia,
chainId: ChainId.ArbitrumSepolia,
urls: {
apiURL: 'https://api-sepolia.arbiscan.io/api',
browserURL: NetworkExplorer.ArbitrumSepolia,
},
},
],
};
export default defaultConfig;