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