-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhardhat.config.js
More file actions
40 lines (38 loc) · 846 Bytes
/
hardhat.config.js
File metadata and controls
40 lines (38 loc) · 846 Bytes
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
require('@nomicfoundation/hardhat-toolbox');
function getAccounts() {
if (process.env.PRIVATE_KEY) return [process.env.PRIVATE_KEY];
return [];
}
module.exports = {
solidity: {
version: '0.8.24',
settings: { optimizer: { enabled: true, runs: 200 } },
},
etherscan: {
apiKey: {
base: process.env.ETHERSCAN_API_KEY || '',
},
customChains: [
{
network: 'base',
chainId: 8453,
urls: {
apiURL: 'https://api.etherscan.io/v2/api?chainid=8453',
browserURL: 'https://basescan.org',
},
},
],
},
networks: {
base: {
url: 'https://mainnet.base.org',
chainId: 8453,
accounts: getAccounts(),
},
'base-sepolia': {
url: 'https://sepolia.base.org',
chainId: 84532,
accounts: getAccounts(),
},
},
};