-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.networks.js
48 lines (42 loc) · 1.24 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
const networks = {};
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;