-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathhardhat.networks.js
55 lines (49 loc) · 1.37 KB
/
hardhat.networks.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
const networks = {
hardhat: {
forking: {
url: process.env.MAINNET_RPC_URL,
blockNumber: 16822491,
},
},
};
if (process.env.MAINNET_RPC_URL && process.env.MAINNET_PRIVATE_KEY) {
networks.mainnet = {
url: process.env.MAINNET_RPC_URL,
chainId: 1,
gasPrice: 55000000000,
accounts: [process.env.MAINNET_PRIVATE_KEY],
};
}
if (process.env.BSC_RPC_URL && process.env.BSC_PRIVATE_KEY) {
networks.bsc = {
url: process.env.BSC_RPC_URL,
chainId: 56,
gasPrice: 10000000000,
accounts: [process.env.BSC_PRIVATE_KEY],
};
}
if (process.env.KOVAN_RPC_URL && process.env.KOVAN_PRIVATE_KEY) {
networks.kovan = {
url: process.env.KOVAN_RPC_URL,
chainId: 42,
gasPrice: 1000000000,
accounts: [process.env.KOVAN_PRIVATE_KEY],
};
}
if (process.env.MATIC_RPC_URL && process.env.MATIC_PRIVATE_KEY) {
networks.matic = {
url: process.env.MATIC_RPC_URL,
chainId: 137,
gasPrice: 1000000000,
accounts: [process.env.MATIC_PRIVATE_KEY],
};
}
if (process.env.ARBITRUM_RPC_URL && process.env.ARBITRUM_PRIVATE_KEY) {
networks.arbitrum = {
url: process.env.ARBITRUM_RPC_URL,
chainId: 42161,
gasPrice: 250000000,
accounts: [process.env.ARBITRUM_PRIVATE_KEY],
};
}
module.exports = networks;