-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.networks.ts
49 lines (41 loc) · 1.18 KB
/
hardhat.networks.ts
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
import { NetworksUserConfig } from "hardhat/types";
const networks : NetworksUserConfig = {
hardhat: {
forking: {
url: process.env.ETH_INFURA_RPC_URL! || "",
},
},
};
if (process.env.ETH_INFURA_RPC_URL && process.env.MAINNET_PRIVATE_KEY) {
networks.mainnet = {
url: process.env.ETH_INFURA_RPC_URL,
chainId: 1,
gasPrice: 30000000000,
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],
};
}
export default networks;