-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathop.config.ts
53 lines (46 loc) · 1.36 KB
/
op.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
import { ChainId, NetworkExplorer, NetworkName, rpcUrls } from '@constants/network';
import defaultConfig from './hardhat.config';
import { log } from './helpers/logger';
const { PRIVATE_KEY, OP_API_KEY } = process.env;
if (!PRIVATE_KEY) {
throw new Error('MantleConfig: The private key is required');
}
log(`Using OP config`);
defaultConfig.networks = {
...defaultConfig.networks,
[NetworkName.OPMainnet]: {
url: rpcUrls[ChainId.OPMainnet],
accounts: [PRIVATE_KEY],
chainId: ChainId.OPMainnet,
},
[NetworkName.OPSepolia]: {
url: rpcUrls[ChainId.OPSepolia],
accounts: [PRIVATE_KEY],
chainId: ChainId.OPSepolia,
},
};
defaultConfig.etherscan = {
apiKey: OP_API_KEY,
customChains: [
{
network: NetworkName.OPMainnet,
chainId: ChainId.OPMainnet,
urls: {
apiURL: 'https://api-optimistic.etherscan.io/api',
browserURL: NetworkExplorer.OPMainnet,
},
},
{
network: NetworkName.OPSepolia,
chainId: ChainId.OPSepolia,
urls: {
apiURL: 'https://api-sepolia-optimistic.etherscan.io/api',
browserURL: NetworkExplorer.OPSepolia,
},
},
],
};
defaultConfig.sourcify = {
enabled: false,
};
export default defaultConfig;