-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
84 lines (82 loc) · 2.71 KB
/
hardhat.config.js
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
require('@nomicfoundation/hardhat-toolbox');
require('dotenv').config();
const privateKey = process.env.PRIVATE_KEY;
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: {
version: '0.8.18',
settings: {
optimizer: {
enabled: true,
runs: 300,
},
},
},
networks: {
sepolia: {
url: process.env.SEPOLIA_RPC_URL ?? 'https://rpc2.sepolia.org',
accounts: [privateKey],
},
polygon: {
url: process.env.POLYGON_RPC_URL ?? 'https://polygon-rpc.com',
accounts: [privateKey],
},
polygonMumbai: {
url:
process.env.MUMBAI_RPC_URL ??
'https://rpc.ankr.com/polygon_mumbai',
accounts: [privateKey],
},
arbitrumOne: {
url: process.env.ARBITRUM_RPC_URL ?? 'https://arb1.arbitrum.io/rpc',
accounts: [privateKey],
},
arbitrumGoerli: {
url:
process.env.ARBITRUM_GOERLI_RPC_URL ??
'https://goerli-rollup.arbitrum.io/rpc',
accounts: [privateKey],
},
optimisticEthereum: {
url: 'https://optimism.publicnode.com',
accounts: [privateKey],
},
optimisticGoerli: {
url: 'https://optimism-goerli.publicnode.com',
accounts: [privateKey],
},
baseMainnet: {
url: 'https://developer-access-mainnet.base.org',
accounts: [privateKey],
},
baseGoerli: {
url: 'https://goerli.base.org',
accounts: [privateKey],
},
},
etherscan: {
apiKey: {
sepolia: process.env.ETHERSCAN_API_KEY,
polygon: process.env.POLYGONSCAN_API_KEY,
polygonMumbai: process.env.POLYGONSCAN_API_KEY,
arbitrumGoerli: process.env.ARBISCAN_API_KEY,
arbitrumOne: process.env.ARBISCAN_API_KEY,
optimisticEthereum: process.env.OPTIMISM_EXPLORER_API_KEY,
optimisticGoerli: process.env.OPTIMISM_EXPLORER_API_KEY,
//baseMainnet: process.env.BASESCAN_API_KEY,
// Basescan doesn't require an API key for the Base Goerlie, however
// Hardhat still expects an arbitrary string to be provided.
//baseGoerli: 'PLACEHOLDER_STRING',
},
customChains: [
{
network: 'baseGoerli',
chainId: 84531,
urls: {
apiURL: 'https://api-goerli.basescan.org/api',
browserURL: 'https://goerli.basescan.org/',
},
},
],
},
};