forked from LaGuerrePiece/p2pBridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prod.config.js
125 lines (121 loc) · 3.23 KB
/
prod.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
const fs = require("fs");
const walletConnectProvider = require("@walletconnect/web3-provider");
const coinbaseWalletSDK = require("@coinbase/wallet-sdk");
const chains = {
338: {
chainName: "Cronos Test",
rpcUrls: ["https://evm-t3.cronos.org/", "wss://evm-t3.cronos.org/"],
bridgeAddress: "0xe822b5A438634d6A172480d6E7493A353a8da1dC",
tokensAddress: {
USDT: "0x1719DED8e908d7b1fe54ba6c6fD280A605e977ee",
BUSD: "0x1719DED8e908d7b1fe54ba6c6fD280A605e977ee",
},
},
77: {
chainName: "Gnosis Test",
rpcUrls: ["https://sokol.poa.network/", "wss://sokol.poa.network/"],
bridgeAddress: "0xe822b5A438634d6A172480d6E7493A353a8da1dC",
tokensAddress: {
USDT: "0x1719DED8e908d7b1fe54ba6c6fD280A605e977ee",
BUSD: "0x1719DED8e908d7b1fe54ba6c6fD280A605e977ee",
},
},
1: {
chainName: "Ethereum",
rpcUrls: [
"https://mainnet.infura.io/v3/fd5dad2d869c4b20a703ea9f100333f7",
"wss://mainnet.infura.io/v3/fd5dad2d869c4b20a703ea9f100333f7",
],
bridgeAddress: "0x0E492C37FDe1b467559f498014A344e5Fb8dC4F7",
tokensAddress: {
USDT: "0x1234",
BUSD: "0x1234",
DAI: "0x1234",
ETH: "0x1234",
AVAX: "0x1234",
},
},
56: {
chainName: "BSC",
rpcUrls: [
"https://bsc-dataseed1.binance.org/",
"wss://bsc-dataseed1.binance.org/",
],
bridgeAddress: "0x0E492C37FDe1b467559f498014A344e5Fb8dC4F7",
tokensAddress: {
USDT: "0x1234",
BUSD: "0x1234",
DAI: "0x1234",
ETH: "0x1234",
AVAX: "0x1234",
},
},
137: {
chainName: "Polygon",
rpcUrls: ["https://polygon-rpc.com/", "wss://polygon-rpc.com/"],
bridgeAddress: "0x0E492C37FDe1b467559f498014A344e5Fb8dC4F7",
tokensAddress: {
USDT: "0x1234",
BUSD: "0x1234",
DAI: "0x1234",
ETH: "0x1234",
AVAX: "0x1234",
},
},
1337: {
chainName: "Ganache",
rpcUrls: ["http://127.0.0.1:8545", "wss://127.0.0.1:8545"],
bridgeAddress: "0xCa7095f58336d0C5dBBA48fD25529742Ee3c247E",
tokensAddress: { DUMMY: "0x22241e099dbf01766ab8895493473268a2dD014f" },
},
43114: {
chainName: "Avalanche",
rpcUrls: [
"https://api.avax.network/ext/bc/C/rpc",
"wss://api.avax.network/ext/bc/C/rpc",
],
bridgeAddress: "0x0E492C37FDe1b467559f498014A344e5Fb8dC4F7",
tokensAddress: {
USDT: "0x1234",
BUSD: "0x1234",
DAI: "0x1234",
ETH: "0x1234",
AVAX: "0x1234",
},
},
};
// };
const abi = {
BridgeAbi: JSON.parse(fs.readFileSync("./build/contracts/BridgeDex.json"))[
"abi"
],
ERC20Abi: JSON.parse(fs.readFileSync("./build/contracts/ERC20.json"))["abi"],
};
const providerOptions = {
walletConnect: {
package: walletConnectProvider,
options: {
rpc: {
77: chains[77].rpcUrls[0],
338: chains[338].rpcUrls[0],
// 56: chains[56].rpcUrls[0],
// 137: chains[137].rpcUrls[0],
// 1337: chains[1337].rpcUrls[0],
// 43114: chains[43114].rpcUrls[0],
},
},
},
coinbaseWallet: {
package: coinbaseWalletSDK,
options: {
appName: "BridgeDex",
rpc: chains[77].rpcUrls[0],
chainId: 77,
},
},
};
module.exports = {
chains: chains,
abi: abi,
providerOptions: providerOptions,
};