-
Notifications
You must be signed in to change notification settings - Fork 858
/
hardhat.config.js
85 lines (83 loc) · 2.23 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
85
require('@nomicfoundation/hardhat-toolbox');
require('@nomicfoundation/hardhat-foundry');
require('dotenv').config();
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: {
compilers: [
{
version: '0.8.23',
settings: {
optimizer: {
enabled: true,
runs: 200, // Optimize for a typical number of runs
},
},
},
{
version: '0.8.15',
settings: {
optimizer: {
enabled: true,
runs: 200, // Optimize for a typical number of runs
},
},
},
],
},
networks: {
// for Base testnet
base: {
url: 'https://sepolia.base.org',
alchemyRPC: `https://base-sepolia.g.alchemy.com/v2/${process.env.BASE_ALCHEMY_API_KEY}`,
accounts: [process.env.PRIVATE_KEY_1],
chainId: 84532,
},
// for OP testnet
optimism: {
url: 'https://sepolia.optimism.io',
alchemyRPC: `https://opt-sepolia.g.alchemy.com/v2/${process.env.OP_ALCHEMY_API_KEY}`,
accounts: [process.env.PRIVATE_KEY_1],
chainId: 11155420,
},
molten: {
url: 'https://sepolia.molten.io',
accounts: [process.env.PRIVATE_KEY_1],
chainId: 49483,
},
},
defaultNetwork: 'optimism',
paths: {
sources: './contracts',
tests: './test',
cache: './cache',
artifacts: './artifacts',
libraries: './lib',
},
etherscan: {
apiKey: {
optimism: process.env.OP_BLOCKSCOUT_API_KEY,
},
customChains: [
{
network: 'base',
chainId: 84532,
urls: {
apiURL: 'https://base-sepolia.blockscout.com/api',
apiKey: process.env.BASE_BLOCKSCOUT_API_KEY,
browserURL: 'https://base-sepolia.blockscout.com',
},
},
{
network: 'optimism',
chainId: 11155420,
urls: {
apiURL: 'https://optimism-sepolia.blockscout.com/api',
apiKey: process.env.OP_BLOCKSCOUT_API_KEY,
browserURL: 'https://optimism-sepolia.blockscout.com',
},
},
],
},
vibcConfigPath: 'config/config.json', // path to configuration file the scripts will use for Polymer's vibc, defaulting to config/config.json when not set
};