@proton/wrap-constants 0.1.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/coins.d.ts +42 -9
- package/dist/constants.d.ts +10 -0
- package/dist/graph.d.ts +30 -0
- package/dist/index.d.ts +2 -0
- package/dist/math.d.ts +17 -0
- package/dist/parsers/actions.d.ts +1323 -0
- package/dist/parsers/address.d.ts +932 -0
- package/dist/parsers/auth.d.ts +1816 -0
- package/dist/parsers/base.d.ts +35 -0
- package/dist/parsers/currency.d.ts +236 -0
- package/dist/parsers/deposit.d.ts +63 -0
- package/dist/parsers/dex.d.ts +291 -0
- package/dist/parsers/index.d.ts +12 -0
- package/dist/parsers/otc.d.ts +46 -0
- package/dist/parsers/pool.d.ts +51 -0
- package/dist/parsers/withdraw.d.ts +1053 -0
- package/dist/parsers/withdrawalHistory.d.ts +98 -0
- package/dist/parsers/wrap.d.ts +109 -0
- package/dist/utils.d.ts +1 -0
- package/dist/wrap-constants.cjs.development.js +1236 -289
- package/dist/wrap-constants.cjs.development.js.map +1 -1
- package/dist/wrap-constants.cjs.production.min.js +1 -1
- package/dist/wrap-constants.cjs.production.min.js.map +1 -1
- package/dist/wrap-constants.esm.js +1216 -293
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +14 -8
- package/src/coins.ts +578 -150
- package/src/constants.ts +41 -14
- package/src/graph.ts +126 -0
- package/src/index.ts +3 -1
- package/src/math.ts +112 -0
- package/src/parsers/actions.ts +82 -0
- package/src/parsers/address.ts +27 -0
- package/src/parsers/auth.ts +22 -0
- package/src/parsers/base.ts +18 -0
- package/src/parsers/currency.ts +89 -0
- package/src/parsers/deposit.ts +30 -0
- package/src/parsers/dex.ts +156 -0
- package/src/parsers/index.ts +12 -0
- package/src/parsers/otc.ts +23 -0
- package/src/parsers/pool.ts +51 -0
- package/src/parsers/withdraw.ts +39 -0
- package/src/parsers/withdrawalHistory.ts +23 -0
- package/src/parsers/wrap.ts +41 -0
- package/src/utils.ts +12 -1
- package/dist/parsers.d.ts +0 -849
- package/dist/pools.d.ts +0 -31
- package/src/parsers.ts +0 -258
- package/src/pools.ts +0 -26
package/src/coins.ts
CHANGED
|
@@ -6,14 +6,28 @@ export enum Chains {
|
|
|
6
6
|
EthereumMainnet = 'Ethereum',
|
|
7
7
|
EthereumRopsten = 'Ethereum (Ropsten)',
|
|
8
8
|
LitecoinMainnet = 'Litecoin',
|
|
9
|
+
LitecoinTestnet = 'Litecoin (Testnet)',
|
|
9
10
|
BitcoinCashMainnet = 'Bitcoin Cash',
|
|
11
|
+
BitcoinCashTestnet = 'Bitcoin Cash (Testnet)',
|
|
10
12
|
StellarMainnet = 'Stellar',
|
|
13
|
+
StellarTestnet = 'Stellar (Testnet)',
|
|
11
14
|
ProtonMainnet = 'Proton',
|
|
12
15
|
ProtonTestnet = 'Proton (Testnet)',
|
|
13
16
|
PolkadotMainnet = 'Polkadot',
|
|
14
17
|
BinanceBEP2 = 'Binance (BEP2)',
|
|
15
18
|
BinanceBEP20 = 'Binance (BEP20)',
|
|
16
19
|
EosMainnet = 'EOS',
|
|
20
|
+
EosTestnet = 'EOS (Jungle Testnet)',
|
|
21
|
+
HederaMainnet = 'Hedera (Mainnet)',
|
|
22
|
+
HederaTestnet = 'Hedera (Testnet)',
|
|
23
|
+
DogeMainnet = 'Dogecoin',
|
|
24
|
+
CardanoMainnet = 'Cardano',
|
|
25
|
+
AvalancheXChain = 'Avalanche X-Chain',
|
|
26
|
+
AvalancheCChain = 'Avalanche C-Chain',
|
|
27
|
+
PolygonMainnet = 'Polygon',
|
|
28
|
+
TerraMainnet = 'Terra',
|
|
29
|
+
RippleMainnet = 'Ripple',
|
|
30
|
+
SolanaMainnet = 'Solana'
|
|
17
31
|
}
|
|
18
32
|
|
|
19
33
|
export enum Networks {
|
|
@@ -22,6 +36,12 @@ export enum Networks {
|
|
|
22
36
|
Ropsten = 'ropsten',
|
|
23
37
|
ERC20 = 'erc20',
|
|
24
38
|
BEP20 = 'bep20',
|
|
39
|
+
XLM = 'xlm',
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const similarChains = {
|
|
43
|
+
[Chains.EthereumMainnet]: [Chains.BinanceBEP20],
|
|
44
|
+
[Chains.BinanceBEP20]: [Chains.EthereumMainnet],
|
|
25
45
|
}
|
|
26
46
|
|
|
27
47
|
export interface Coin {
|
|
@@ -36,6 +56,7 @@ export interface Coin {
|
|
|
36
56
|
xtokenContract : string;
|
|
37
57
|
wallets : Wallet[];
|
|
38
58
|
image : string;
|
|
59
|
+
coingeckoId : string;
|
|
39
60
|
balance? : Asset;
|
|
40
61
|
}
|
|
41
62
|
|
|
@@ -57,98 +78,159 @@ export const explorerLinkByChain = {
|
|
|
57
78
|
[Chains.EthereumMainnet] : (txid: string) => `https://etherscan.io/tx/${txid}`,
|
|
58
79
|
[Chains.EthereumRopsten] : (txid: string) => `https://ropsten.etherscan.io/tx/${txid}`,
|
|
59
80
|
[Chains.LitecoinMainnet] : (txid: string) => `https://blockchair.com/litecoin/transaction/${txid}`,
|
|
81
|
+
[Chains.LitecoinTestnet] : (txid: string) => `https://blockexplorer.one/litecoin/testnet/blockHash/${txid}`,
|
|
60
82
|
[Chains.BitcoinCashMainnet]: (txid: string) => `https://blockchair.com/bitcoin-cash/transaction/${txid}`,
|
|
83
|
+
[Chains.BitcoinCashTestnet]: (txid: string) => `https://blockexplorer.one/bitcoin-cash/testnet/blockHash/${txid}`,
|
|
61
84
|
[Chains.StellarMainnet] : (txid: string) => `https://blockchair.com/stellar/transaction/${txid}`,
|
|
62
|
-
[Chains.
|
|
63
|
-
[Chains.
|
|
85
|
+
[Chains.StellarTestnet] : (txid: string) => `https://testnet.steexp.com/tx/${txid}`,
|
|
86
|
+
[Chains.ProtonMainnet] : (txid: string, traces?: boolean) => `https://proton.bloks.io/transaction/${txid}${traces ? '?tab=traces' : ''}`,
|
|
87
|
+
[Chains.ProtonTestnet] : (txid: string, traces?: boolean) => `https://proton-test.bloks.io/transaction/${txid}${traces ? '?tab=traces' : ''}`,
|
|
64
88
|
[Chains.PolkadotMainnet] : (txid: string) => `https://polkadot.subscan.io/extrinsic/${txid}`,
|
|
65
|
-
[Chains.EosMainnet] : (txid: string) => `https://bloks.io/transaction/${txid}`,
|
|
66
89
|
[Chains.BinanceBEP2] : (txid: string) => `https://binance.mintscan.io/txs/${txid}`,
|
|
67
|
-
[Chains.BinanceBEP20] : (txid: string) => `https://bscscan.com/tx/${txid}
|
|
90
|
+
[Chains.BinanceBEP20] : (txid: string) => `https://bscscan.com/tx/${txid}`,
|
|
91
|
+
[Chains.EosMainnet] : (txid: string) => `https://bloks.io/transaction/${txid}`,
|
|
92
|
+
[Chains.EosTestnet] : (txid: string) => `https://jungle.bloks.io/transaction/${txid}`,
|
|
93
|
+
[Chains.HederaMainnet] : (txid: string) => `https://app.dragonglass.me/transactions/${txid}`,
|
|
94
|
+
[Chains.HederaTestnet] : (txid: string) => `https://testnet.dragonglass.me/transactions/${txid}`,
|
|
95
|
+
[Chains.DogeMainnet] : (txid: string) => `https://blockchair.com/dogecoin/transaction/${txid}`,
|
|
96
|
+
[Chains.CardanoMainnet] : (txid: string) => `https://explorer.cardano.org/en/transaction?id=${txid}`,
|
|
97
|
+
[Chains.AvalancheXChain] : (txid: string) => `https://avascan.info/blockchain/x/tx/${txid}`,
|
|
98
|
+
[Chains.AvalancheCChain] : (txid: string) => `https://snowtrace.io/tx/${txid}`,
|
|
99
|
+
[Chains.PolygonMainnet] : (txid: string) => `https://polygonscan.com/tx/${txid}`,
|
|
100
|
+
[Chains.TerraMainnet] : (txid: string) => `https://terra.stake.id/?#/tx/${txid}`,
|
|
101
|
+
[Chains.RippleMainnet] : (txid: string) => `https://xrpscan.com/tx/${txid}`,
|
|
102
|
+
[Chains.SolanaMainnet] : (txid: string) => `https://explorer.solana.com/tx/${txid}`,
|
|
68
103
|
}
|
|
69
104
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
bridgeCoins: Coin[];
|
|
74
|
-
lendCoins: Coin[];
|
|
75
|
-
borrowCoins: Coin[];
|
|
76
|
-
loanCoins: Coin[];
|
|
77
|
-
allEnabledCoins: Coin[];
|
|
78
|
-
}
|
|
105
|
+
export const protonExplorerTxUrl = (chain: string, txId: string, traces?: boolean) => chain === 'proton'
|
|
106
|
+
? explorerLinkByChain[Chains.ProtonMainnet](txId, traces)
|
|
107
|
+
: explorerLinkByChain[Chains.ProtonTestnet](txId, traces)
|
|
79
108
|
|
|
80
|
-
|
|
109
|
+
// Initialize
|
|
110
|
+
export const initializeCoins = (protonChain: string): {
|
|
111
|
+
allCoins : Coin[];
|
|
112
|
+
swapCoins : Coin[];
|
|
113
|
+
bridgeCoins : Coin[];
|
|
114
|
+
lendCoins : Coin[];
|
|
115
|
+
borrowCoins : Coin[];
|
|
116
|
+
loanCoins : Coin[];
|
|
117
|
+
allEnabledCoins: Coin[];
|
|
118
|
+
} => {
|
|
81
119
|
const IS_MAINNET = protonChain === 'proton'
|
|
82
120
|
const IS_TESTNET = protonChain === 'proton-test'
|
|
83
121
|
|
|
84
122
|
const coins: Coin[] = [
|
|
85
123
|
{
|
|
86
124
|
allowSwap: true,
|
|
87
|
-
allowBridge:
|
|
88
|
-
allowLend:
|
|
89
|
-
allowBorrow:
|
|
125
|
+
allowBridge: IS_MAINNET,
|
|
126
|
+
allowLend: true,
|
|
127
|
+
allowBorrow: true,
|
|
90
128
|
name: 'Proton',
|
|
91
129
|
coin: 'XPR',
|
|
92
130
|
xtokenSymbol: 'XPR',
|
|
93
131
|
xtokenPrecision: 4,
|
|
94
132
|
xtokenContract: 'eosio.token',
|
|
95
133
|
wallets: [
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
134
|
+
...(IS_MAINNET ? [
|
|
135
|
+
{
|
|
136
|
+
wallet: 'XPR-ERC20',
|
|
137
|
+
symbol: 'XPR',
|
|
138
|
+
chain: Chains.EthereumMainnet,
|
|
139
|
+
network: Networks.ERC20,
|
|
140
|
+
precision: 4,
|
|
141
|
+
contract: '0xD7EFB00D12C2C13131FD319336FDF952525DA2AF',
|
|
142
|
+
hasWithdrawMemo: false
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
wallet: 'XPR-BEP20',
|
|
146
|
+
symbol: 'XPR',
|
|
147
|
+
chain: Chains.BinanceBEP20,
|
|
148
|
+
network: Networks.BEP20,
|
|
149
|
+
precision: 4,
|
|
150
|
+
contract: '0x5DE3939B2F811A61D830E6F52D13B066881412AB',
|
|
151
|
+
hasWithdrawMemo: false
|
|
152
|
+
}
|
|
153
|
+
]: []),
|
|
114
154
|
],
|
|
115
|
-
image: '/
|
|
155
|
+
image: 'https://www.proton.org/images/tokens/eosio-tokenXPR.png',
|
|
156
|
+
coingeckoId: 'proton'
|
|
116
157
|
},
|
|
117
158
|
{
|
|
118
159
|
allowSwap: true,
|
|
119
160
|
allowBridge: true,
|
|
120
|
-
allowLend:
|
|
121
|
-
allowBorrow:
|
|
161
|
+
allowLend: true,
|
|
162
|
+
allowBorrow: true,
|
|
122
163
|
name: 'USD Coin',
|
|
123
164
|
coin: 'USDC',
|
|
124
165
|
xtokenSymbol: 'XUSDC',
|
|
125
166
|
xtokenPrecision: 6,
|
|
126
167
|
xtokenContract: 'xtokens',
|
|
127
168
|
wallets: [
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
169
|
+
...(IS_MAINNET ? [
|
|
170
|
+
{
|
|
171
|
+
wallet: 'USDC',
|
|
172
|
+
symbol: 'USDC',
|
|
173
|
+
chain: Chains.EthereumMainnet,
|
|
174
|
+
network: Networks.ERC20,
|
|
175
|
+
precision: 6,
|
|
176
|
+
contract: '0xA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48',
|
|
177
|
+
hasWithdrawMemo: false
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
wallet: 'USDC-BEP20',
|
|
181
|
+
symbol: 'USDC',
|
|
182
|
+
chain: Chains.BinanceBEP20,
|
|
183
|
+
network: Networks.BEP20,
|
|
184
|
+
precision: 18,
|
|
185
|
+
contract: '0x8AC76A51CC950D9822D68B83FE1AD97B32CD580D',
|
|
186
|
+
hasWithdrawMemo: false
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
wallet: 'USDC-XLM',
|
|
190
|
+
symbol: 'USDC',
|
|
191
|
+
chain: Chains.StellarMainnet,
|
|
192
|
+
network: Networks.XLM,
|
|
193
|
+
precision: 7,
|
|
194
|
+
contract: undefined,
|
|
195
|
+
hasWithdrawMemo: true
|
|
196
|
+
},
|
|
197
|
+
]: []),
|
|
198
|
+
...(IS_TESTNET ? [
|
|
199
|
+
{
|
|
200
|
+
wallet: 'USDC',
|
|
201
|
+
symbol: 'USDC',
|
|
202
|
+
chain: Chains.EthereumRopsten,
|
|
203
|
+
network: Networks.Ropsten,
|
|
204
|
+
precision: 6,
|
|
205
|
+
contract: '0xA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48',
|
|
206
|
+
hasWithdrawMemo: false
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
wallet: 'USDC-XLM',
|
|
210
|
+
symbol: 'USDC',
|
|
211
|
+
chain: Chains.StellarTestnet,
|
|
212
|
+
network: Networks.XLM,
|
|
213
|
+
precision: 7,
|
|
214
|
+
contract: undefined,
|
|
215
|
+
hasWithdrawMemo: true
|
|
216
|
+
},
|
|
217
|
+
]: [])
|
|
137
218
|
],
|
|
138
|
-
image: '/
|
|
219
|
+
image: 'https://www.proton.org/images/tokens/xtokensXUSDC.png',
|
|
220
|
+
coingeckoId: 'usd-coin'
|
|
139
221
|
},
|
|
140
222
|
{
|
|
141
223
|
allowSwap: true,
|
|
142
|
-
allowBridge:
|
|
143
|
-
allowLend:
|
|
144
|
-
allowBorrow:
|
|
145
|
-
name: 'Metal',
|
|
224
|
+
allowBridge: IS_MAINNET,
|
|
225
|
+
allowLend: true,
|
|
226
|
+
allowBorrow: true,
|
|
227
|
+
name: 'Metal DAO',
|
|
146
228
|
coin: 'MTL',
|
|
147
229
|
xtokenSymbol: 'XMT',
|
|
148
230
|
xtokenPrecision: 8,
|
|
149
231
|
xtokenContract: 'xtokens',
|
|
150
232
|
wallets: [
|
|
151
|
-
{
|
|
233
|
+
...(IS_MAINNET ? [{
|
|
152
234
|
wallet: 'MTL',
|
|
153
235
|
symbol: 'MTL',
|
|
154
236
|
chain: Chains.EthereumMainnet,
|
|
@@ -156,22 +238,37 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
156
238
|
precision: 8,
|
|
157
239
|
contract: '0xF433089366899D83A9F26A773D59EC7ECF30355E',
|
|
158
240
|
hasWithdrawMemo: false
|
|
159
|
-
}
|
|
241
|
+
}]: [])
|
|
160
242
|
],
|
|
161
|
-
image: '/
|
|
243
|
+
image: 'https://www.proton.org/images/tokens/xtokensXMT.png',
|
|
244
|
+
coingeckoId: 'metal'
|
|
162
245
|
},
|
|
163
246
|
{
|
|
164
|
-
allowSwap:
|
|
165
|
-
allowBridge:
|
|
247
|
+
allowSwap: IS_MAINNET,
|
|
248
|
+
allowBridge: false,
|
|
166
249
|
allowLend: false,
|
|
167
250
|
allowBorrow: false,
|
|
251
|
+
name: 'Metal Blockchain',
|
|
252
|
+
coin: 'METAL',
|
|
253
|
+
xtokenSymbol: 'METAL',
|
|
254
|
+
xtokenPrecision: 8,
|
|
255
|
+
xtokenContract: 'xtokens',
|
|
256
|
+
wallets: [],
|
|
257
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/metal-chain.png',
|
|
258
|
+
coingeckoId: ''
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
allowSwap: true,
|
|
262
|
+
allowBridge: true,
|
|
263
|
+
allowLend: true,
|
|
264
|
+
allowBorrow: true,
|
|
168
265
|
name: 'Bitcoin',
|
|
169
266
|
coin: 'BTC',
|
|
170
267
|
xtokenSymbol: 'XBTC',
|
|
171
268
|
xtokenPrecision: 8,
|
|
172
269
|
xtokenContract: 'xtokens',
|
|
173
270
|
wallets: [
|
|
174
|
-
{
|
|
271
|
+
...(IS_MAINNET ? [{
|
|
175
272
|
wallet: 'BTC',
|
|
176
273
|
symbol: 'BTC',
|
|
177
274
|
chain: Chains.BitcoinMainnet,
|
|
@@ -179,9 +276,9 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
179
276
|
precision: 8,
|
|
180
277
|
contract: undefined,
|
|
181
278
|
hasWithdrawMemo: false
|
|
182
|
-
},
|
|
279
|
+
}]: []),
|
|
183
280
|
...(IS_TESTNET ? [{
|
|
184
|
-
wallet: 'BTC
|
|
281
|
+
wallet: 'BTC',
|
|
185
282
|
symbol: 'BTC',
|
|
186
283
|
chain: Chains.BitcoinTestnet,
|
|
187
284
|
network: Networks.Testnet,
|
|
@@ -190,20 +287,21 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
190
287
|
hasWithdrawMemo: false
|
|
191
288
|
}]: [])
|
|
192
289
|
],
|
|
193
|
-
image: '/
|
|
290
|
+
image: 'https://www.proton.org/images/tokens/xtokensXBTC.png',
|
|
291
|
+
coingeckoId: 'bitcoin'
|
|
194
292
|
},
|
|
195
293
|
{
|
|
196
294
|
allowSwap: true,
|
|
197
295
|
allowBridge: true,
|
|
198
|
-
allowLend:
|
|
199
|
-
allowBorrow:
|
|
296
|
+
allowLend: true,
|
|
297
|
+
allowBorrow: true,
|
|
200
298
|
name: 'Ethereum',
|
|
201
299
|
coin: 'ETH',
|
|
202
300
|
xtokenSymbol: 'XETH',
|
|
203
301
|
xtokenPrecision: 8,
|
|
204
302
|
xtokenContract: 'xtokens',
|
|
205
303
|
wallets: [
|
|
206
|
-
{
|
|
304
|
+
...(IS_MAINNET ? [{
|
|
207
305
|
wallet: 'ETH',
|
|
208
306
|
symbol: 'ETH',
|
|
209
307
|
chain: Chains.EthereumMainnet,
|
|
@@ -211,9 +309,9 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
211
309
|
precision: 18,
|
|
212
310
|
contract: '0x0000000000000000000000000000000000000000',
|
|
213
311
|
hasWithdrawMemo: false
|
|
214
|
-
},
|
|
312
|
+
}]: []),
|
|
215
313
|
...(IS_TESTNET ? [{
|
|
216
|
-
wallet: 'ETH
|
|
314
|
+
wallet: 'ETH',
|
|
217
315
|
symbol: 'ETH',
|
|
218
316
|
chain: Chains.EthereumRopsten,
|
|
219
317
|
network: Networks.Ropsten,
|
|
@@ -222,10 +320,25 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
222
320
|
hasWithdrawMemo: false
|
|
223
321
|
}]: [])
|
|
224
322
|
],
|
|
225
|
-
image: '/
|
|
323
|
+
image: 'https://www.proton.org/images/tokens/xtokensXETH.png',
|
|
324
|
+
coingeckoId: 'ethereum'
|
|
226
325
|
},
|
|
227
326
|
{
|
|
228
|
-
allowSwap:
|
|
327
|
+
allowSwap: true,
|
|
328
|
+
allowBridge: false,
|
|
329
|
+
allowLend: false,
|
|
330
|
+
allowBorrow: false,
|
|
331
|
+
name: 'Loan',
|
|
332
|
+
coin: 'LOAN',
|
|
333
|
+
xtokenSymbol: 'LOAN',
|
|
334
|
+
xtokenPrecision: 4,
|
|
335
|
+
xtokenContract: 'loan.token',
|
|
336
|
+
wallets: [],
|
|
337
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/loan.png',
|
|
338
|
+
coingeckoId: 'proton-loan'
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
allowSwap: true,
|
|
229
342
|
allowBridge: true,
|
|
230
343
|
allowLend: false,
|
|
231
344
|
allowBorrow: false,
|
|
@@ -235,7 +348,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
235
348
|
xtokenPrecision: 6,
|
|
236
349
|
xtokenContract: 'xtokens',
|
|
237
350
|
wallets: [
|
|
238
|
-
{
|
|
351
|
+
...(IS_MAINNET ? [{
|
|
239
352
|
wallet: 'USDT',
|
|
240
353
|
symbol: 'USDT',
|
|
241
354
|
chain: Chains.EthereumMainnet,
|
|
@@ -243,13 +356,32 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
243
356
|
precision: 6,
|
|
244
357
|
contract: '0xDAC17F958D2EE523A2206206994597C13D831EC7',
|
|
245
358
|
hasWithdrawMemo: false
|
|
246
|
-
}
|
|
359
|
+
}]: []),
|
|
360
|
+
...(IS_MAINNET ? [{
|
|
361
|
+
wallet: 'USDT-BEP20',
|
|
362
|
+
symbol: 'USDT',
|
|
363
|
+
chain: Chains.BinanceBEP20,
|
|
364
|
+
network: Networks.BEP20,
|
|
365
|
+
precision: 18,
|
|
366
|
+
contract: '0x55d398326f99059fF775485246999027B3197955',
|
|
367
|
+
hasWithdrawMemo: false
|
|
368
|
+
}]: []),
|
|
369
|
+
...(IS_TESTNET ? [{
|
|
370
|
+
wallet: 'USDT',
|
|
371
|
+
symbol: 'USDT',
|
|
372
|
+
chain: Chains.EthereumRopsten,
|
|
373
|
+
network: Networks.Ropsten,
|
|
374
|
+
precision: 6,
|
|
375
|
+
contract: '0xDAC17F958D2EE523A2206206994597C13D831EC7',
|
|
376
|
+
hasWithdrawMemo: false
|
|
377
|
+
}]: [])
|
|
247
378
|
],
|
|
248
|
-
image: '/
|
|
379
|
+
image: 'https://www.proton.org/images/tokens/xtokensXUSDT.png',
|
|
380
|
+
coingeckoId: 'tether'
|
|
249
381
|
},
|
|
250
382
|
{
|
|
251
383
|
allowSwap: false,
|
|
252
|
-
allowBridge:
|
|
384
|
+
allowBridge: IS_MAINNET,
|
|
253
385
|
allowLend: false,
|
|
254
386
|
allowBorrow: false,
|
|
255
387
|
name: 'TrueUSD',
|
|
@@ -258,7 +390,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
258
390
|
xtokenPrecision: 6,
|
|
259
391
|
xtokenContract: 'xtokens',
|
|
260
392
|
wallets: [
|
|
261
|
-
{
|
|
393
|
+
...(IS_MAINNET ? [{
|
|
262
394
|
wallet: 'TUSD',
|
|
263
395
|
symbol: 'TUSD',
|
|
264
396
|
chain: Chains.EthereumMainnet,
|
|
@@ -266,13 +398,14 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
266
398
|
precision: 18,
|
|
267
399
|
contract: '0x0000000000085D4780B73119B644AE5ECD22B376',
|
|
268
400
|
hasWithdrawMemo: false
|
|
269
|
-
}
|
|
401
|
+
}]: [])
|
|
270
402
|
],
|
|
271
|
-
image: '/
|
|
403
|
+
image: 'https://www.proton.org/images/tokens/xtokensXTUSD.png',
|
|
404
|
+
coingeckoId: 'true-usd'
|
|
272
405
|
},
|
|
273
406
|
{
|
|
274
407
|
allowSwap: false,
|
|
275
|
-
allowBridge:
|
|
408
|
+
allowBridge: IS_MAINNET,
|
|
276
409
|
allowLend: false,
|
|
277
410
|
allowBorrow: false,
|
|
278
411
|
name: 'Paxos Standard',
|
|
@@ -281,7 +414,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
281
414
|
xtokenPrecision: 6,
|
|
282
415
|
xtokenContract: 'xtokens',
|
|
283
416
|
wallets: [
|
|
284
|
-
{
|
|
417
|
+
...(IS_MAINNET ? [{
|
|
285
418
|
wallet: 'PAX',
|
|
286
419
|
symbol: 'PAX',
|
|
287
420
|
chain: Chains.EthereumMainnet,
|
|
@@ -289,9 +422,10 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
289
422
|
precision: 18,
|
|
290
423
|
contract: '0x8E870D67F660D95D5BE530380D0EC0BD388289E1',
|
|
291
424
|
hasWithdrawMemo: false
|
|
292
|
-
}
|
|
425
|
+
}]: [])
|
|
293
426
|
],
|
|
294
|
-
image: '/
|
|
427
|
+
image: 'https://www.proton.org/images/tokens/xtokensXPAX.png',
|
|
428
|
+
coingeckoId: 'paxos-standard'
|
|
295
429
|
},
|
|
296
430
|
{
|
|
297
431
|
allowSwap: false,
|
|
@@ -304,7 +438,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
304
438
|
xtokenPrecision: 8,
|
|
305
439
|
xtokenContract: 'xtokens',
|
|
306
440
|
wallets: [
|
|
307
|
-
{
|
|
441
|
+
...(IS_MAINNET ? [{
|
|
308
442
|
wallet: 'PAXG',
|
|
309
443
|
symbol: 'PAXG',
|
|
310
444
|
chain: Chains.EthereumMainnet,
|
|
@@ -312,13 +446,65 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
312
446
|
precision: 18,
|
|
313
447
|
contract: '0x45804880DE22913DAFE09F4980848ECE6ECBAF78',
|
|
314
448
|
hasWithdrawMemo: false
|
|
315
|
-
}
|
|
449
|
+
}]: []),
|
|
450
|
+
...(IS_TESTNET ? [{
|
|
451
|
+
wallet: 'PAXG',
|
|
452
|
+
symbol: 'PAXG',
|
|
453
|
+
chain: Chains.EthereumRopsten,
|
|
454
|
+
network: Networks.Ropsten,
|
|
455
|
+
precision: 18,
|
|
456
|
+
contract: '0x45804880DE22913DAFE09F4980848ECE6ECBAF78',
|
|
457
|
+
hasWithdrawMemo: false
|
|
458
|
+
}]: [])
|
|
316
459
|
],
|
|
317
|
-
image: '/
|
|
460
|
+
image: 'https://www.proton.org/images/tokens/xtokensXPAXG.png',
|
|
461
|
+
coingeckoId: 'pax-gold'
|
|
318
462
|
},
|
|
319
463
|
{
|
|
320
464
|
allowSwap: IS_MAINNET,
|
|
321
|
-
allowBridge:
|
|
465
|
+
allowBridge: false,
|
|
466
|
+
allowLend: false,
|
|
467
|
+
allowBorrow: false,
|
|
468
|
+
name: 'Storex',
|
|
469
|
+
coin: 'STRX',
|
|
470
|
+
xtokenSymbol: 'STRX',
|
|
471
|
+
xtokenPrecision: 4,
|
|
472
|
+
xtokenContract: 'storex',
|
|
473
|
+
wallets: [],
|
|
474
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/strx.png',
|
|
475
|
+
coingeckoId: ''
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
allowSwap: IS_MAINNET,
|
|
479
|
+
allowBridge: false,
|
|
480
|
+
allowLend: false,
|
|
481
|
+
allowBorrow: false,
|
|
482
|
+
name: 'Mint',
|
|
483
|
+
coin: 'MINT',
|
|
484
|
+
xtokenSymbol: 'MINT',
|
|
485
|
+
xtokenPrecision: 4,
|
|
486
|
+
xtokenContract: 'protonmint',
|
|
487
|
+
wallets: [],
|
|
488
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/PMLogo-04.png',
|
|
489
|
+
coingeckoId: ''
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
allowSwap: IS_MAINNET,
|
|
493
|
+
allowBridge: false,
|
|
494
|
+
allowLend: false,
|
|
495
|
+
allowBorrow: false,
|
|
496
|
+
name: 'Snipcoins',
|
|
497
|
+
coin: 'SNIPS',
|
|
498
|
+
xtokenSymbol: 'SNIPS',
|
|
499
|
+
xtokenPrecision: 4,
|
|
500
|
+
xtokenContract: 'snipcoins',
|
|
501
|
+
wallets: [],
|
|
502
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/snips.png',
|
|
503
|
+
coingeckoId: ''
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
allowSwap: IS_MAINNET,
|
|
507
|
+
allowBridge: true,
|
|
322
508
|
allowLend: false,
|
|
323
509
|
allowBorrow: false,
|
|
324
510
|
name: 'Uniswap',
|
|
@@ -327,7 +513,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
327
513
|
xtokenPrecision: 6,
|
|
328
514
|
xtokenContract: 'xtokens',
|
|
329
515
|
wallets: [
|
|
330
|
-
{
|
|
516
|
+
...(IS_MAINNET ? [{
|
|
331
517
|
wallet: 'UNI',
|
|
332
518
|
symbol: 'UNI',
|
|
333
519
|
chain: Chains.EthereumMainnet,
|
|
@@ -335,9 +521,19 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
335
521
|
precision: 18,
|
|
336
522
|
contract: '0x1F9840A85D5AF5BF1D1762F925BDADDC4201F984',
|
|
337
523
|
hasWithdrawMemo: false
|
|
338
|
-
}
|
|
524
|
+
}]: []),
|
|
525
|
+
...(IS_TESTNET ? [{
|
|
526
|
+
wallet: 'UNI',
|
|
527
|
+
symbol: 'UNI',
|
|
528
|
+
chain: Chains.EthereumRopsten,
|
|
529
|
+
network: Networks.Ropsten,
|
|
530
|
+
precision: 18,
|
|
531
|
+
contract: '0x1F9840A85D5AF5BF1D1762F925BDADDC4201F984',
|
|
532
|
+
hasWithdrawMemo: false
|
|
533
|
+
}]: [])
|
|
339
534
|
],
|
|
340
|
-
image: '/
|
|
535
|
+
image: 'https://www.proton.org/images/tokens/xtokensXUNI.png',
|
|
536
|
+
coingeckoId: 'uniswap'
|
|
341
537
|
},
|
|
342
538
|
{
|
|
343
539
|
allowSwap: false,
|
|
@@ -350,7 +546,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
350
546
|
xtokenPrecision: 6,
|
|
351
547
|
xtokenContract: 'xtokens',
|
|
352
548
|
wallets: [
|
|
353
|
-
{
|
|
549
|
+
...(IS_MAINNET ? [{
|
|
354
550
|
wallet: '1INCH',
|
|
355
551
|
symbol: '1INCH',
|
|
356
552
|
chain: Chains.EthereumMainnet,
|
|
@@ -358,9 +554,10 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
358
554
|
precision: 18,
|
|
359
555
|
contract: '0x111111111117DC0AA78B770FA6A738034120C302',
|
|
360
556
|
hasWithdrawMemo: false
|
|
361
|
-
}
|
|
557
|
+
}]: [])
|
|
362
558
|
],
|
|
363
|
-
image: '/
|
|
559
|
+
image: 'https://www.proton.org/images/tokens/xtokensXINCH.png',
|
|
560
|
+
coingeckoId: '1inch'
|
|
364
561
|
},
|
|
365
562
|
{
|
|
366
563
|
allowSwap: false,
|
|
@@ -373,7 +570,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
373
570
|
xtokenPrecision: 6,
|
|
374
571
|
xtokenContract: 'xtokens',
|
|
375
572
|
wallets: [
|
|
376
|
-
{
|
|
573
|
+
...(IS_MAINNET ? [{
|
|
377
574
|
wallet: 'LINK',
|
|
378
575
|
symbol: 'LINK',
|
|
379
576
|
chain: Chains.EthereumMainnet,
|
|
@@ -381,13 +578,14 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
381
578
|
precision: 18,
|
|
382
579
|
contract: '0x514910771AF9CA656AF840DFF83E8264ECF986CA',
|
|
383
580
|
hasWithdrawMemo: false
|
|
384
|
-
}
|
|
581
|
+
}]: [])
|
|
385
582
|
],
|
|
386
|
-
image: '/
|
|
583
|
+
image: 'https://www.proton.org/images/tokens/xtokensXLINK.png',
|
|
584
|
+
coingeckoId: 'chainlink'
|
|
387
585
|
},
|
|
388
586
|
{
|
|
389
587
|
allowSwap: IS_MAINNET,
|
|
390
|
-
allowBridge:
|
|
588
|
+
allowBridge: true,
|
|
391
589
|
allowLend: false,
|
|
392
590
|
allowBorrow: false,
|
|
393
591
|
name: 'Litecoin',
|
|
@@ -396,7 +594,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
396
594
|
xtokenPrecision: 8,
|
|
397
595
|
xtokenContract: 'xtokens',
|
|
398
596
|
wallets: [
|
|
399
|
-
{
|
|
597
|
+
...(IS_MAINNET ? [{
|
|
400
598
|
wallet: 'LTC',
|
|
401
599
|
symbol: 'LTC',
|
|
402
600
|
chain: Chains.LitecoinMainnet,
|
|
@@ -404,13 +602,23 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
404
602
|
precision: 8,
|
|
405
603
|
contract: undefined,
|
|
406
604
|
hasWithdrawMemo: false
|
|
407
|
-
}
|
|
605
|
+
}]: []),
|
|
606
|
+
...(IS_TESTNET ? [{
|
|
607
|
+
wallet: 'LTC',
|
|
608
|
+
symbol: 'LTC',
|
|
609
|
+
chain: Chains.LitecoinTestnet,
|
|
610
|
+
network: Networks.Testnet,
|
|
611
|
+
precision: 8,
|
|
612
|
+
contract: undefined,
|
|
613
|
+
hasWithdrawMemo: false
|
|
614
|
+
}]: [])
|
|
408
615
|
],
|
|
409
|
-
image: '/
|
|
616
|
+
image: 'https://www.proton.org/images/tokens/xtokensXLTC.png',
|
|
617
|
+
coingeckoId: 'litecoin'
|
|
410
618
|
},
|
|
411
619
|
{
|
|
412
620
|
allowSwap: IS_MAINNET,
|
|
413
|
-
allowBridge:
|
|
621
|
+
allowBridge: true,
|
|
414
622
|
allowLend: false,
|
|
415
623
|
allowBorrow: false,
|
|
416
624
|
name: 'Bitcoin Cash',
|
|
@@ -419,7 +627,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
419
627
|
xtokenPrecision: 8,
|
|
420
628
|
xtokenContract: 'xtokens',
|
|
421
629
|
wallets: [
|
|
422
|
-
{
|
|
630
|
+
...(IS_MAINNET ? [{
|
|
423
631
|
wallet: 'BCH',
|
|
424
632
|
symbol: 'BCH',
|
|
425
633
|
chain: Chains.BitcoinCashMainnet,
|
|
@@ -427,13 +635,23 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
427
635
|
precision: 8,
|
|
428
636
|
contract: undefined,
|
|
429
637
|
hasWithdrawMemo: false
|
|
430
|
-
}
|
|
638
|
+
}]: []),
|
|
639
|
+
...(IS_TESTNET ? [{
|
|
640
|
+
wallet: 'BCH',
|
|
641
|
+
symbol: 'BCH',
|
|
642
|
+
chain: Chains.BitcoinCashTestnet,
|
|
643
|
+
network: Networks.Testnet,
|
|
644
|
+
precision: 8,
|
|
645
|
+
contract: undefined,
|
|
646
|
+
hasWithdrawMemo: false
|
|
647
|
+
}]: [])
|
|
431
648
|
],
|
|
432
|
-
image: '/
|
|
649
|
+
image: 'https://www.proton.org/images/tokens/xtokensXBCH.png',
|
|
650
|
+
coingeckoId: 'bitcoin-cash'
|
|
433
651
|
},
|
|
434
652
|
{
|
|
435
653
|
allowSwap: false,
|
|
436
|
-
allowBridge:
|
|
654
|
+
allowBridge: IS_TESTNET,
|
|
437
655
|
allowLend: false,
|
|
438
656
|
allowBorrow: false,
|
|
439
657
|
name: 'Stellar',
|
|
@@ -442,20 +660,30 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
442
660
|
xtokenPrecision: 6,
|
|
443
661
|
xtokenContract: 'xtokens',
|
|
444
662
|
wallets: [
|
|
445
|
-
{
|
|
663
|
+
...(IS_MAINNET ? [{
|
|
446
664
|
wallet: 'XLM',
|
|
447
665
|
symbol: 'XLM',
|
|
448
666
|
chain: Chains.StellarMainnet,
|
|
449
667
|
network: Networks.Mainnet,
|
|
450
668
|
precision: 7,
|
|
451
669
|
contract: undefined,
|
|
452
|
-
hasWithdrawMemo:
|
|
453
|
-
}
|
|
670
|
+
hasWithdrawMemo: true
|
|
671
|
+
}]: []),
|
|
672
|
+
...(IS_TESTNET ? [{
|
|
673
|
+
wallet: 'XLM',
|
|
674
|
+
symbol: 'XLM',
|
|
675
|
+
chain: Chains.StellarTestnet,
|
|
676
|
+
network: Networks.Testnet,
|
|
677
|
+
precision: 7,
|
|
678
|
+
contract: undefined,
|
|
679
|
+
hasWithdrawMemo: true
|
|
680
|
+
}]: [])
|
|
454
681
|
],
|
|
455
|
-
image: '/
|
|
682
|
+
image: 'https://www.proton.org/images/tokens/xtokensXXLM.png',
|
|
683
|
+
coingeckoId: 'stellar'
|
|
456
684
|
},
|
|
457
685
|
{
|
|
458
|
-
allowSwap:
|
|
686
|
+
allowSwap: false,
|
|
459
687
|
allowBridge: false,
|
|
460
688
|
allowLend: false,
|
|
461
689
|
allowBorrow: false,
|
|
@@ -465,7 +693,8 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
465
693
|
xtokenPrecision: 4,
|
|
466
694
|
xtokenContract: 'sense',
|
|
467
695
|
wallets: [],
|
|
468
|
-
image: '/
|
|
696
|
+
image: 'https://www.proton.org/images/tokens/senseXSENSE.png',
|
|
697
|
+
coingeckoId: 'sense'
|
|
469
698
|
},
|
|
470
699
|
{
|
|
471
700
|
allowSwap: false,
|
|
@@ -478,7 +707,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
478
707
|
xtokenPrecision: 8,
|
|
479
708
|
xtokenContract: 'xtokens',
|
|
480
709
|
wallets: [
|
|
481
|
-
{
|
|
710
|
+
...(IS_MAINNET ? [{
|
|
482
711
|
wallet: 'DOT',
|
|
483
712
|
symbol: 'DOT',
|
|
484
713
|
chain: Chains.PolkadotMainnet,
|
|
@@ -486,13 +715,14 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
486
715
|
precision: 10,
|
|
487
716
|
contract: undefined,
|
|
488
717
|
hasWithdrawMemo: false
|
|
489
|
-
}
|
|
718
|
+
}]: [])
|
|
490
719
|
],
|
|
491
|
-
image: '/
|
|
720
|
+
image: 'https://www.proton.org/images/tokens/xtokensXDOT.png',
|
|
721
|
+
coingeckoId: 'polkadot'
|
|
492
722
|
},
|
|
493
723
|
{
|
|
494
724
|
allowSwap: true,
|
|
495
|
-
allowBridge:
|
|
725
|
+
allowBridge: IS_MAINNET,
|
|
496
726
|
allowLend: false,
|
|
497
727
|
allowBorrow: false,
|
|
498
728
|
name: 'Binance Coin',
|
|
@@ -501,17 +731,42 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
501
731
|
xtokenPrecision: 8,
|
|
502
732
|
xtokenContract: 'xtokens',
|
|
503
733
|
wallets: [
|
|
504
|
-
{
|
|
734
|
+
...(IS_MAINNET ? [{
|
|
505
735
|
wallet: 'BNB',
|
|
506
736
|
symbol: 'BNB',
|
|
507
|
-
chain: Chains.
|
|
508
|
-
network: Networks.
|
|
509
|
-
precision:
|
|
737
|
+
chain: Chains.BinanceBEP20,
|
|
738
|
+
network: Networks.BEP20,
|
|
739
|
+
precision: 18,
|
|
510
740
|
contract: undefined,
|
|
511
|
-
hasWithdrawMemo:
|
|
512
|
-
}
|
|
741
|
+
hasWithdrawMemo: false
|
|
742
|
+
}]: [])
|
|
743
|
+
],
|
|
744
|
+
image: 'https://www.proton.org/images/tokens/xtokensXBNB.png',
|
|
745
|
+
coingeckoId: 'binancecoin'
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
allowSwap: false,
|
|
749
|
+
allowBridge: IS_MAINNET,
|
|
750
|
+
allowLend: false,
|
|
751
|
+
allowBorrow: false,
|
|
752
|
+
name: 'Binance USD',
|
|
753
|
+
coin: 'BUSD',
|
|
754
|
+
xtokenSymbol: 'XBUSD',
|
|
755
|
+
xtokenPrecision: 6,
|
|
756
|
+
xtokenContract: 'xtokens',
|
|
757
|
+
wallets: [
|
|
758
|
+
...(IS_MAINNET ? [{
|
|
759
|
+
wallet: 'BUSD-BEP20',
|
|
760
|
+
symbol: 'BUSD',
|
|
761
|
+
chain: Chains.BinanceBEP20,
|
|
762
|
+
network: Networks.BEP20,
|
|
763
|
+
precision: 18,
|
|
764
|
+
contract: '0xe9e7cea3dedca5984780bafc599bd69add087d56',
|
|
765
|
+
hasWithdrawMemo: false
|
|
766
|
+
}]: [])
|
|
513
767
|
],
|
|
514
|
-
image: '/
|
|
768
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/xbusd.png',
|
|
769
|
+
coingeckoId: 'binance-usd'
|
|
515
770
|
},
|
|
516
771
|
{
|
|
517
772
|
allowSwap: true,
|
|
@@ -524,7 +779,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
524
779
|
xtokenPrecision: 4,
|
|
525
780
|
xtokenContract: 'xtokens',
|
|
526
781
|
wallets: [
|
|
527
|
-
{
|
|
782
|
+
...(IS_MAINNET ? [{
|
|
528
783
|
wallet: 'EOS',
|
|
529
784
|
symbol: 'EOS',
|
|
530
785
|
chain: Chains.EosMainnet,
|
|
@@ -532,28 +787,47 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
532
787
|
precision: 4,
|
|
533
788
|
contract: undefined,
|
|
534
789
|
hasWithdrawMemo: true
|
|
535
|
-
}
|
|
790
|
+
}]: []),
|
|
791
|
+
...(IS_TESTNET ? [{
|
|
792
|
+
wallet: 'EOS',
|
|
793
|
+
symbol: 'EOS',
|
|
794
|
+
chain: Chains.EosTestnet,
|
|
795
|
+
network: Networks.Testnet,
|
|
796
|
+
precision: 4,
|
|
797
|
+
contract: undefined,
|
|
798
|
+
hasWithdrawMemo: true
|
|
799
|
+
}]: [])
|
|
536
800
|
],
|
|
537
|
-
image: '/
|
|
801
|
+
image: 'https://www.proton.org/images/tokens/xtokensXEOS.png',
|
|
802
|
+
coingeckoId: 'eos'
|
|
538
803
|
},
|
|
539
|
-
|
|
540
|
-
// Synthethic
|
|
541
804
|
{
|
|
542
805
|
allowSwap: IS_MAINNET,
|
|
543
|
-
allowBridge:
|
|
544
|
-
allowLend:
|
|
545
|
-
allowBorrow:
|
|
806
|
+
allowBridge: IS_MAINNET,
|
|
807
|
+
allowLend: true,
|
|
808
|
+
allowBorrow: true,
|
|
546
809
|
name: 'Dogecoin',
|
|
547
810
|
coin: 'DOGE',
|
|
548
811
|
xtokenSymbol: 'XDOGE',
|
|
549
812
|
xtokenPrecision: 6,
|
|
550
813
|
xtokenContract: 'xtokens',
|
|
551
|
-
wallets: [
|
|
552
|
-
|
|
814
|
+
wallets: [
|
|
815
|
+
...(IS_MAINNET ? [{
|
|
816
|
+
wallet: 'DOGE',
|
|
817
|
+
symbol: 'DOGE',
|
|
818
|
+
chain: Chains.DogeMainnet,
|
|
819
|
+
network: Networks.Mainnet,
|
|
820
|
+
precision: 8,
|
|
821
|
+
contract: undefined,
|
|
822
|
+
hasWithdrawMemo: false
|
|
823
|
+
}]: []),
|
|
824
|
+
],
|
|
825
|
+
image: 'https://www.proton.org/images/tokens/xtokensXDOGE.png',
|
|
826
|
+
coingeckoId: 'dogecoin'
|
|
553
827
|
},
|
|
554
828
|
{
|
|
555
829
|
allowSwap: IS_MAINNET,
|
|
556
|
-
allowBridge:
|
|
830
|
+
allowBridge: IS_MAINNET,
|
|
557
831
|
allowLend: false,
|
|
558
832
|
allowBorrow: false,
|
|
559
833
|
name: 'Cardano',
|
|
@@ -561,51 +835,205 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
561
835
|
xtokenSymbol: 'XADA',
|
|
562
836
|
xtokenPrecision: 6,
|
|
563
837
|
xtokenContract: 'xtokens',
|
|
564
|
-
wallets: [
|
|
565
|
-
|
|
838
|
+
wallets: [
|
|
839
|
+
...(IS_MAINNET ? [{
|
|
840
|
+
wallet: 'ADA',
|
|
841
|
+
symbol: 'ADA',
|
|
842
|
+
chain: Chains.CardanoMainnet,
|
|
843
|
+
network: Networks.Mainnet,
|
|
844
|
+
precision: 6,
|
|
845
|
+
contract: undefined,
|
|
846
|
+
hasWithdrawMemo: false
|
|
847
|
+
}]: [])
|
|
848
|
+
],
|
|
849
|
+
image: 'https://www.proton.org/images/tokens/xtokensXADA.png',
|
|
850
|
+
coingeckoId: 'cardano'
|
|
566
851
|
},
|
|
852
|
+
|
|
853
|
+
// Adding
|
|
567
854
|
{
|
|
568
855
|
allowSwap: false,
|
|
569
|
-
allowBridge:
|
|
856
|
+
allowBridge: IS_MAINNET,
|
|
570
857
|
allowLend: false,
|
|
571
858
|
allowBorrow: false,
|
|
572
|
-
name: '
|
|
573
|
-
coin: '
|
|
574
|
-
xtokenSymbol: '
|
|
859
|
+
name: 'Terra',
|
|
860
|
+
coin: 'LUNA',
|
|
861
|
+
xtokenSymbol: 'XLUNA',
|
|
575
862
|
xtokenPrecision: 6,
|
|
576
863
|
xtokenContract: 'xtokens',
|
|
577
|
-
wallets: [
|
|
578
|
-
|
|
864
|
+
wallets: [
|
|
865
|
+
...(IS_MAINNET ? [{
|
|
866
|
+
wallet: 'LUNA',
|
|
867
|
+
symbol: 'LUNA',
|
|
868
|
+
chain: Chains.TerraMainnet,
|
|
869
|
+
network: Networks.Mainnet,
|
|
870
|
+
precision: 6,
|
|
871
|
+
contract: undefined,
|
|
872
|
+
hasWithdrawMemo: true
|
|
873
|
+
}]: [])
|
|
874
|
+
],
|
|
875
|
+
image: 'https://www.proton.org/images/tokens/xtokensXLUNA.png',
|
|
876
|
+
coingeckoId: 'terra-luna'
|
|
579
877
|
},
|
|
580
878
|
{
|
|
581
879
|
allowSwap: false,
|
|
582
|
-
allowBridge:
|
|
880
|
+
allowBridge: IS_MAINNET,
|
|
583
881
|
allowLend: false,
|
|
584
882
|
allowBorrow: false,
|
|
585
|
-
name: '
|
|
586
|
-
coin: '
|
|
587
|
-
xtokenSymbol: '
|
|
883
|
+
name: 'TerraUSD',
|
|
884
|
+
coin: 'UST',
|
|
885
|
+
xtokenSymbol: 'XUST',
|
|
588
886
|
xtokenPrecision: 6,
|
|
589
887
|
xtokenContract: 'xtokens',
|
|
590
|
-
wallets: [
|
|
591
|
-
|
|
888
|
+
wallets: [
|
|
889
|
+
...(IS_MAINNET ? [{
|
|
890
|
+
wallet: 'UST',
|
|
891
|
+
symbol: 'UST',
|
|
892
|
+
chain: Chains.TerraMainnet,
|
|
893
|
+
network: Networks.Mainnet,
|
|
894
|
+
precision: 6,
|
|
895
|
+
contract: undefined,
|
|
896
|
+
hasWithdrawMemo: true
|
|
897
|
+
}]: [])
|
|
898
|
+
],
|
|
899
|
+
image: 'https://www.proton.org/images/tokens/xtokensXUST.png',
|
|
900
|
+
coingeckoId: 'terrausd'
|
|
592
901
|
},
|
|
593
902
|
{
|
|
594
903
|
allowSwap: false,
|
|
595
|
-
allowBridge:
|
|
904
|
+
allowBridge: IS_MAINNET,
|
|
596
905
|
allowLend: false,
|
|
597
906
|
allowBorrow: false,
|
|
598
|
-
name: '
|
|
599
|
-
coin: '
|
|
600
|
-
xtokenSymbol: '
|
|
907
|
+
name: 'Solana',
|
|
908
|
+
coin: 'SOL',
|
|
909
|
+
xtokenSymbol: 'XSOL',
|
|
601
910
|
xtokenPrecision: 6,
|
|
602
911
|
xtokenContract: 'xtokens',
|
|
603
|
-
wallets: [
|
|
604
|
-
|
|
912
|
+
wallets: [
|
|
913
|
+
...(IS_MAINNET ? [{
|
|
914
|
+
wallet: 'SOL',
|
|
915
|
+
symbol: 'SOL',
|
|
916
|
+
chain: Chains.SolanaMainnet,
|
|
917
|
+
network: Networks.Mainnet,
|
|
918
|
+
precision: 9,
|
|
919
|
+
contract: undefined,
|
|
920
|
+
hasWithdrawMemo: false
|
|
921
|
+
}]: [])
|
|
922
|
+
],
|
|
923
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/xsol.png',
|
|
924
|
+
coingeckoId: 'solana'
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
allowSwap: false,
|
|
928
|
+
allowBridge: IS_MAINNET,
|
|
929
|
+
allowLend: false,
|
|
930
|
+
allowBorrow: false,
|
|
931
|
+
name: 'Ripple',
|
|
932
|
+
coin: 'XRP',
|
|
933
|
+
xtokenSymbol: 'XXRP',
|
|
934
|
+
xtokenPrecision: 6,
|
|
935
|
+
xtokenContract: 'xtokens',
|
|
936
|
+
wallets: [
|
|
937
|
+
...(IS_MAINNET ? [{
|
|
938
|
+
wallet: 'XRP',
|
|
939
|
+
symbol: 'XRP',
|
|
940
|
+
chain: Chains.RippleMainnet,
|
|
941
|
+
network: Networks.Mainnet,
|
|
942
|
+
precision: 6,
|
|
943
|
+
contract: undefined,
|
|
944
|
+
hasWithdrawMemo: true
|
|
945
|
+
}]: [])
|
|
946
|
+
],
|
|
947
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/xxrp.png',
|
|
948
|
+
coingeckoId: 'ripple'
|
|
949
|
+
},
|
|
950
|
+
|
|
951
|
+
// Future
|
|
952
|
+
{
|
|
953
|
+
allowSwap: false,
|
|
954
|
+
allowBridge: false,
|
|
955
|
+
allowLend: false,
|
|
956
|
+
allowBorrow: false,
|
|
957
|
+
name: 'Avalanche',
|
|
958
|
+
coin: 'AVAX',
|
|
959
|
+
xtokenSymbol: 'XAVAX',
|
|
960
|
+
xtokenPrecision: 9,
|
|
961
|
+
xtokenContract: 'xtokens',
|
|
962
|
+
wallets: [
|
|
963
|
+
...(IS_MAINNET ? [
|
|
964
|
+
{
|
|
965
|
+
wallet: 'AVAX',
|
|
966
|
+
symbol: 'AVAX',
|
|
967
|
+
chain: Chains.AvalancheCChain,
|
|
968
|
+
network: Networks.Mainnet,
|
|
969
|
+
precision: 9,
|
|
970
|
+
contract: undefined,
|
|
971
|
+
hasWithdrawMemo: false
|
|
972
|
+
}
|
|
973
|
+
]: [])
|
|
974
|
+
],
|
|
975
|
+
image: 'https://www.proton.org/images/tokens/xtokensXAVAX.png',
|
|
976
|
+
coingeckoId: 'avalanche-2'
|
|
605
977
|
},
|
|
606
|
-
|
|
978
|
+
{
|
|
979
|
+
allowSwap: false,
|
|
980
|
+
allowBridge: false,
|
|
981
|
+
allowLend: false,
|
|
982
|
+
allowBorrow: false,
|
|
983
|
+
name: 'Polygon',
|
|
984
|
+
coin: 'MATIC',
|
|
985
|
+
xtokenSymbol: 'XMATIC',
|
|
986
|
+
xtokenPrecision: 8,
|
|
987
|
+
xtokenContract: 'xtokens',
|
|
988
|
+
wallets: [
|
|
989
|
+
...(IS_MAINNET ? [{
|
|
990
|
+
wallet: 'MATIC',
|
|
991
|
+
symbol: 'MATIC',
|
|
992
|
+
chain: Chains.PolygonMainnet,
|
|
993
|
+
network: Networks.Mainnet,
|
|
994
|
+
precision: 18,
|
|
995
|
+
contract: '0x0000000000000000000000000000000000000000',
|
|
996
|
+
hasWithdrawMemo: false
|
|
997
|
+
}]: [])
|
|
998
|
+
],
|
|
999
|
+
image: 'https://www.proton.org/images/tokens/xtokensXMATIC.png',
|
|
1000
|
+
coingeckoId: 'matic-network'
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
allowSwap: false,
|
|
1004
|
+
allowBridge: IS_TESTNET,
|
|
1005
|
+
allowLend: false,
|
|
1006
|
+
allowBorrow: false,
|
|
1007
|
+
name: 'HBAR',
|
|
1008
|
+
coin: 'HBAR',
|
|
1009
|
+
xtokenSymbol: 'XHBAR',
|
|
1010
|
+
xtokenPrecision: 6,
|
|
1011
|
+
xtokenContract: 'xtokens',
|
|
1012
|
+
wallets: [
|
|
1013
|
+
...(IS_TESTNET ? [{
|
|
1014
|
+
wallet: 'HBAR',
|
|
1015
|
+
symbol: 'HBAR',
|
|
1016
|
+
chain: Chains.HederaTestnet,
|
|
1017
|
+
network: Networks.Testnet,
|
|
1018
|
+
precision: 8,
|
|
1019
|
+
contract: undefined,
|
|
1020
|
+
hasWithdrawMemo: true
|
|
1021
|
+
}]: [])
|
|
1022
|
+
],
|
|
1023
|
+
image: 'https://www.proton.org/images/tokens/xtokensXHBAR.png',
|
|
1024
|
+
coingeckoId: 'hedera-hashgraph'
|
|
1025
|
+
}
|
|
607
1026
|
]
|
|
608
1027
|
|
|
1028
|
+
// Validation
|
|
1029
|
+
const walletWithDuplicateChains = coins.find(coin => {
|
|
1030
|
+
const chains = coin.wallets.map(wallet => wallet.chain)
|
|
1031
|
+
return new Set(chains).size !== chains.length
|
|
1032
|
+
})
|
|
1033
|
+
if (walletWithDuplicateChains) {
|
|
1034
|
+
throw new Error(`Coin ${walletWithDuplicateChains.coin} has duplicate chains in wallet`)
|
|
1035
|
+
}
|
|
1036
|
+
|
|
609
1037
|
return {
|
|
610
1038
|
allCoins: coins,
|
|
611
1039
|
swapCoins: coins.filter(coin => coin.allowSwap),
|