@proton/wrap-constants 0.1.1 → 0.2.0
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 +508 -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 +1325 -310
- 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 +1303 -311
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +14 -8
- package/src/coins.ts +563 -149
- 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 +167 -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:
|
|
224
|
+
allowBridge: IS_MAINNET,
|
|
225
|
+
allowLend: true,
|
|
226
|
+
allowBorrow: true,
|
|
145
227
|
name: 'Metal',
|
|
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,23 @@ 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
247
|
allowSwap: true,
|
|
165
248
|
allowBridge: true,
|
|
166
|
-
allowLend:
|
|
167
|
-
allowBorrow:
|
|
249
|
+
allowLend: true,
|
|
250
|
+
allowBorrow: true,
|
|
168
251
|
name: 'Bitcoin',
|
|
169
252
|
coin: 'BTC',
|
|
170
253
|
xtokenSymbol: 'XBTC',
|
|
171
254
|
xtokenPrecision: 8,
|
|
172
255
|
xtokenContract: 'xtokens',
|
|
173
256
|
wallets: [
|
|
174
|
-
{
|
|
257
|
+
...(IS_MAINNET ? [{
|
|
175
258
|
wallet: 'BTC',
|
|
176
259
|
symbol: 'BTC',
|
|
177
260
|
chain: Chains.BitcoinMainnet,
|
|
@@ -179,9 +262,9 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
179
262
|
precision: 8,
|
|
180
263
|
contract: undefined,
|
|
181
264
|
hasWithdrawMemo: false
|
|
182
|
-
},
|
|
265
|
+
}]: []),
|
|
183
266
|
...(IS_TESTNET ? [{
|
|
184
|
-
wallet: 'BTC
|
|
267
|
+
wallet: 'BTC',
|
|
185
268
|
symbol: 'BTC',
|
|
186
269
|
chain: Chains.BitcoinTestnet,
|
|
187
270
|
network: Networks.Testnet,
|
|
@@ -190,20 +273,21 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
190
273
|
hasWithdrawMemo: false
|
|
191
274
|
}]: [])
|
|
192
275
|
],
|
|
193
|
-
image: '/
|
|
276
|
+
image: 'https://www.proton.org/images/tokens/xtokensXBTC.png',
|
|
277
|
+
coingeckoId: 'bitcoin'
|
|
194
278
|
},
|
|
195
279
|
{
|
|
196
280
|
allowSwap: true,
|
|
197
281
|
allowBridge: true,
|
|
198
|
-
allowLend:
|
|
199
|
-
allowBorrow:
|
|
282
|
+
allowLend: true,
|
|
283
|
+
allowBorrow: true,
|
|
200
284
|
name: 'Ethereum',
|
|
201
285
|
coin: 'ETH',
|
|
202
286
|
xtokenSymbol: 'XETH',
|
|
203
287
|
xtokenPrecision: 8,
|
|
204
288
|
xtokenContract: 'xtokens',
|
|
205
289
|
wallets: [
|
|
206
|
-
{
|
|
290
|
+
...(IS_MAINNET ? [{
|
|
207
291
|
wallet: 'ETH',
|
|
208
292
|
symbol: 'ETH',
|
|
209
293
|
chain: Chains.EthereumMainnet,
|
|
@@ -211,9 +295,9 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
211
295
|
precision: 18,
|
|
212
296
|
contract: '0x0000000000000000000000000000000000000000',
|
|
213
297
|
hasWithdrawMemo: false
|
|
214
|
-
},
|
|
298
|
+
}]: []),
|
|
215
299
|
...(IS_TESTNET ? [{
|
|
216
|
-
wallet: 'ETH
|
|
300
|
+
wallet: 'ETH',
|
|
217
301
|
symbol: 'ETH',
|
|
218
302
|
chain: Chains.EthereumRopsten,
|
|
219
303
|
network: Networks.Ropsten,
|
|
@@ -222,10 +306,25 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
222
306
|
hasWithdrawMemo: false
|
|
223
307
|
}]: [])
|
|
224
308
|
],
|
|
225
|
-
image: '/
|
|
309
|
+
image: 'https://www.proton.org/images/tokens/xtokensXETH.png',
|
|
310
|
+
coingeckoId: 'ethereum'
|
|
226
311
|
},
|
|
227
312
|
{
|
|
228
|
-
allowSwap:
|
|
313
|
+
allowSwap: true,
|
|
314
|
+
allowBridge: false,
|
|
315
|
+
allowLend: false,
|
|
316
|
+
allowBorrow: false,
|
|
317
|
+
name: 'Loan',
|
|
318
|
+
coin: 'LOAN',
|
|
319
|
+
xtokenSymbol: 'LOAN',
|
|
320
|
+
xtokenPrecision: 4,
|
|
321
|
+
xtokenContract: 'loan.token',
|
|
322
|
+
wallets: [],
|
|
323
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/loan.png',
|
|
324
|
+
coingeckoId: 'proton-loan'
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
allowSwap: true,
|
|
229
328
|
allowBridge: true,
|
|
230
329
|
allowLend: false,
|
|
231
330
|
allowBorrow: false,
|
|
@@ -235,7 +334,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
235
334
|
xtokenPrecision: 6,
|
|
236
335
|
xtokenContract: 'xtokens',
|
|
237
336
|
wallets: [
|
|
238
|
-
{
|
|
337
|
+
...(IS_MAINNET ? [{
|
|
239
338
|
wallet: 'USDT',
|
|
240
339
|
symbol: 'USDT',
|
|
241
340
|
chain: Chains.EthereumMainnet,
|
|
@@ -243,13 +342,32 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
243
342
|
precision: 6,
|
|
244
343
|
contract: '0xDAC17F958D2EE523A2206206994597C13D831EC7',
|
|
245
344
|
hasWithdrawMemo: false
|
|
246
|
-
}
|
|
345
|
+
}]: []),
|
|
346
|
+
...(IS_MAINNET ? [{
|
|
347
|
+
wallet: 'USDT-BEP20',
|
|
348
|
+
symbol: 'USDT',
|
|
349
|
+
chain: Chains.BinanceBEP20,
|
|
350
|
+
network: Networks.BEP20,
|
|
351
|
+
precision: 18,
|
|
352
|
+
contract: '0x55d398326f99059fF775485246999027B3197955',
|
|
353
|
+
hasWithdrawMemo: false
|
|
354
|
+
}]: []),
|
|
355
|
+
...(IS_TESTNET ? [{
|
|
356
|
+
wallet: 'USDT',
|
|
357
|
+
symbol: 'USDT',
|
|
358
|
+
chain: Chains.EthereumRopsten,
|
|
359
|
+
network: Networks.Ropsten,
|
|
360
|
+
precision: 6,
|
|
361
|
+
contract: '0xDAC17F958D2EE523A2206206994597C13D831EC7',
|
|
362
|
+
hasWithdrawMemo: false
|
|
363
|
+
}]: [])
|
|
247
364
|
],
|
|
248
|
-
image: '/
|
|
365
|
+
image: 'https://www.proton.org/images/tokens/xtokensXUSDT.png',
|
|
366
|
+
coingeckoId: 'tether'
|
|
249
367
|
},
|
|
250
368
|
{
|
|
251
369
|
allowSwap: false,
|
|
252
|
-
allowBridge:
|
|
370
|
+
allowBridge: IS_MAINNET,
|
|
253
371
|
allowLend: false,
|
|
254
372
|
allowBorrow: false,
|
|
255
373
|
name: 'TrueUSD',
|
|
@@ -258,7 +376,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
258
376
|
xtokenPrecision: 6,
|
|
259
377
|
xtokenContract: 'xtokens',
|
|
260
378
|
wallets: [
|
|
261
|
-
{
|
|
379
|
+
...(IS_MAINNET ? [{
|
|
262
380
|
wallet: 'TUSD',
|
|
263
381
|
symbol: 'TUSD',
|
|
264
382
|
chain: Chains.EthereumMainnet,
|
|
@@ -266,13 +384,14 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
266
384
|
precision: 18,
|
|
267
385
|
contract: '0x0000000000085D4780B73119B644AE5ECD22B376',
|
|
268
386
|
hasWithdrawMemo: false
|
|
269
|
-
}
|
|
387
|
+
}]: [])
|
|
270
388
|
],
|
|
271
|
-
image: '/
|
|
389
|
+
image: 'https://www.proton.org/images/tokens/xtokensXTUSD.png',
|
|
390
|
+
coingeckoId: 'true-usd'
|
|
272
391
|
},
|
|
273
392
|
{
|
|
274
393
|
allowSwap: false,
|
|
275
|
-
allowBridge:
|
|
394
|
+
allowBridge: IS_MAINNET,
|
|
276
395
|
allowLend: false,
|
|
277
396
|
allowBorrow: false,
|
|
278
397
|
name: 'Paxos Standard',
|
|
@@ -281,7 +400,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
281
400
|
xtokenPrecision: 6,
|
|
282
401
|
xtokenContract: 'xtokens',
|
|
283
402
|
wallets: [
|
|
284
|
-
{
|
|
403
|
+
...(IS_MAINNET ? [{
|
|
285
404
|
wallet: 'PAX',
|
|
286
405
|
symbol: 'PAX',
|
|
287
406
|
chain: Chains.EthereumMainnet,
|
|
@@ -289,9 +408,10 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
289
408
|
precision: 18,
|
|
290
409
|
contract: '0x8E870D67F660D95D5BE530380D0EC0BD388289E1',
|
|
291
410
|
hasWithdrawMemo: false
|
|
292
|
-
}
|
|
411
|
+
}]: [])
|
|
293
412
|
],
|
|
294
|
-
image: '/
|
|
413
|
+
image: 'https://www.proton.org/images/tokens/xtokensXPAX.png',
|
|
414
|
+
coingeckoId: 'paxos-standard'
|
|
295
415
|
},
|
|
296
416
|
{
|
|
297
417
|
allowSwap: false,
|
|
@@ -304,7 +424,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
304
424
|
xtokenPrecision: 8,
|
|
305
425
|
xtokenContract: 'xtokens',
|
|
306
426
|
wallets: [
|
|
307
|
-
{
|
|
427
|
+
...(IS_MAINNET ? [{
|
|
308
428
|
wallet: 'PAXG',
|
|
309
429
|
symbol: 'PAXG',
|
|
310
430
|
chain: Chains.EthereumMainnet,
|
|
@@ -312,13 +432,65 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
312
432
|
precision: 18,
|
|
313
433
|
contract: '0x45804880DE22913DAFE09F4980848ECE6ECBAF78',
|
|
314
434
|
hasWithdrawMemo: false
|
|
315
|
-
}
|
|
435
|
+
}]: []),
|
|
436
|
+
...(IS_TESTNET ? [{
|
|
437
|
+
wallet: 'PAXG',
|
|
438
|
+
symbol: 'PAXG',
|
|
439
|
+
chain: Chains.EthereumRopsten,
|
|
440
|
+
network: Networks.Ropsten,
|
|
441
|
+
precision: 18,
|
|
442
|
+
contract: '0x45804880DE22913DAFE09F4980848ECE6ECBAF78',
|
|
443
|
+
hasWithdrawMemo: false
|
|
444
|
+
}]: [])
|
|
316
445
|
],
|
|
317
|
-
image: '/
|
|
446
|
+
image: 'https://www.proton.org/images/tokens/xtokensXPAXG.png',
|
|
447
|
+
coingeckoId: 'pax-gold'
|
|
318
448
|
},
|
|
319
449
|
{
|
|
320
450
|
allowSwap: IS_MAINNET,
|
|
321
|
-
allowBridge:
|
|
451
|
+
allowBridge: false,
|
|
452
|
+
allowLend: false,
|
|
453
|
+
allowBorrow: false,
|
|
454
|
+
name: 'Storex',
|
|
455
|
+
coin: 'STRX',
|
|
456
|
+
xtokenSymbol: 'STRX',
|
|
457
|
+
xtokenPrecision: 4,
|
|
458
|
+
xtokenContract: 'storex',
|
|
459
|
+
wallets: [],
|
|
460
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/strx.png',
|
|
461
|
+
coingeckoId: ''
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
allowSwap: IS_MAINNET,
|
|
465
|
+
allowBridge: false,
|
|
466
|
+
allowLend: false,
|
|
467
|
+
allowBorrow: false,
|
|
468
|
+
name: 'Mint',
|
|
469
|
+
coin: 'MINT',
|
|
470
|
+
xtokenSymbol: 'MINT',
|
|
471
|
+
xtokenPrecision: 4,
|
|
472
|
+
xtokenContract: 'protonmint',
|
|
473
|
+
wallets: [],
|
|
474
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/PMLogo-04.png',
|
|
475
|
+
coingeckoId: ''
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
allowSwap: IS_MAINNET,
|
|
479
|
+
allowBridge: false,
|
|
480
|
+
allowLend: false,
|
|
481
|
+
allowBorrow: false,
|
|
482
|
+
name: 'Snipcoins',
|
|
483
|
+
coin: 'SNIPS',
|
|
484
|
+
xtokenSymbol: 'SNIPS',
|
|
485
|
+
xtokenPrecision: 4,
|
|
486
|
+
xtokenContract: 'snipcoins',
|
|
487
|
+
wallets: [],
|
|
488
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/snips.png',
|
|
489
|
+
coingeckoId: ''
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
allowSwap: IS_MAINNET,
|
|
493
|
+
allowBridge: true,
|
|
322
494
|
allowLend: false,
|
|
323
495
|
allowBorrow: false,
|
|
324
496
|
name: 'Uniswap',
|
|
@@ -327,7 +499,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
327
499
|
xtokenPrecision: 6,
|
|
328
500
|
xtokenContract: 'xtokens',
|
|
329
501
|
wallets: [
|
|
330
|
-
{
|
|
502
|
+
...(IS_MAINNET ? [{
|
|
331
503
|
wallet: 'UNI',
|
|
332
504
|
symbol: 'UNI',
|
|
333
505
|
chain: Chains.EthereumMainnet,
|
|
@@ -335,9 +507,19 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
335
507
|
precision: 18,
|
|
336
508
|
contract: '0x1F9840A85D5AF5BF1D1762F925BDADDC4201F984',
|
|
337
509
|
hasWithdrawMemo: false
|
|
338
|
-
}
|
|
510
|
+
}]: []),
|
|
511
|
+
...(IS_TESTNET ? [{
|
|
512
|
+
wallet: 'UNI',
|
|
513
|
+
symbol: 'UNI',
|
|
514
|
+
chain: Chains.EthereumRopsten,
|
|
515
|
+
network: Networks.Ropsten,
|
|
516
|
+
precision: 18,
|
|
517
|
+
contract: '0x1F9840A85D5AF5BF1D1762F925BDADDC4201F984',
|
|
518
|
+
hasWithdrawMemo: false
|
|
519
|
+
}]: [])
|
|
339
520
|
],
|
|
340
|
-
image: '/
|
|
521
|
+
image: 'https://www.proton.org/images/tokens/xtokensXUNI.png',
|
|
522
|
+
coingeckoId: 'uniswap'
|
|
341
523
|
},
|
|
342
524
|
{
|
|
343
525
|
allowSwap: false,
|
|
@@ -350,7 +532,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
350
532
|
xtokenPrecision: 6,
|
|
351
533
|
xtokenContract: 'xtokens',
|
|
352
534
|
wallets: [
|
|
353
|
-
{
|
|
535
|
+
...(IS_MAINNET ? [{
|
|
354
536
|
wallet: '1INCH',
|
|
355
537
|
symbol: '1INCH',
|
|
356
538
|
chain: Chains.EthereumMainnet,
|
|
@@ -358,9 +540,10 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
358
540
|
precision: 18,
|
|
359
541
|
contract: '0x111111111117DC0AA78B770FA6A738034120C302',
|
|
360
542
|
hasWithdrawMemo: false
|
|
361
|
-
}
|
|
543
|
+
}]: [])
|
|
362
544
|
],
|
|
363
|
-
image: '/
|
|
545
|
+
image: 'https://www.proton.org/images/tokens/xtokensXINCH.png',
|
|
546
|
+
coingeckoId: '1inch'
|
|
364
547
|
},
|
|
365
548
|
{
|
|
366
549
|
allowSwap: false,
|
|
@@ -373,7 +556,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
373
556
|
xtokenPrecision: 6,
|
|
374
557
|
xtokenContract: 'xtokens',
|
|
375
558
|
wallets: [
|
|
376
|
-
{
|
|
559
|
+
...(IS_MAINNET ? [{
|
|
377
560
|
wallet: 'LINK',
|
|
378
561
|
symbol: 'LINK',
|
|
379
562
|
chain: Chains.EthereumMainnet,
|
|
@@ -381,13 +564,14 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
381
564
|
precision: 18,
|
|
382
565
|
contract: '0x514910771AF9CA656AF840DFF83E8264ECF986CA',
|
|
383
566
|
hasWithdrawMemo: false
|
|
384
|
-
}
|
|
567
|
+
}]: [])
|
|
385
568
|
],
|
|
386
|
-
image: '/
|
|
569
|
+
image: 'https://www.proton.org/images/tokens/xtokensXLINK.png',
|
|
570
|
+
coingeckoId: 'chainlink'
|
|
387
571
|
},
|
|
388
572
|
{
|
|
389
573
|
allowSwap: IS_MAINNET,
|
|
390
|
-
allowBridge:
|
|
574
|
+
allowBridge: true,
|
|
391
575
|
allowLend: false,
|
|
392
576
|
allowBorrow: false,
|
|
393
577
|
name: 'Litecoin',
|
|
@@ -396,7 +580,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
396
580
|
xtokenPrecision: 8,
|
|
397
581
|
xtokenContract: 'xtokens',
|
|
398
582
|
wallets: [
|
|
399
|
-
{
|
|
583
|
+
...(IS_MAINNET ? [{
|
|
400
584
|
wallet: 'LTC',
|
|
401
585
|
symbol: 'LTC',
|
|
402
586
|
chain: Chains.LitecoinMainnet,
|
|
@@ -404,13 +588,23 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
404
588
|
precision: 8,
|
|
405
589
|
contract: undefined,
|
|
406
590
|
hasWithdrawMemo: false
|
|
407
|
-
}
|
|
591
|
+
}]: []),
|
|
592
|
+
...(IS_TESTNET ? [{
|
|
593
|
+
wallet: 'LTC',
|
|
594
|
+
symbol: 'LTC',
|
|
595
|
+
chain: Chains.LitecoinTestnet,
|
|
596
|
+
network: Networks.Testnet,
|
|
597
|
+
precision: 8,
|
|
598
|
+
contract: undefined,
|
|
599
|
+
hasWithdrawMemo: false
|
|
600
|
+
}]: [])
|
|
408
601
|
],
|
|
409
|
-
image: '/
|
|
602
|
+
image: 'https://www.proton.org/images/tokens/xtokensXLTC.png',
|
|
603
|
+
coingeckoId: 'litecoin'
|
|
410
604
|
},
|
|
411
605
|
{
|
|
412
606
|
allowSwap: IS_MAINNET,
|
|
413
|
-
allowBridge:
|
|
607
|
+
allowBridge: true,
|
|
414
608
|
allowLend: false,
|
|
415
609
|
allowBorrow: false,
|
|
416
610
|
name: 'Bitcoin Cash',
|
|
@@ -419,7 +613,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
419
613
|
xtokenPrecision: 8,
|
|
420
614
|
xtokenContract: 'xtokens',
|
|
421
615
|
wallets: [
|
|
422
|
-
{
|
|
616
|
+
...(IS_MAINNET ? [{
|
|
423
617
|
wallet: 'BCH',
|
|
424
618
|
symbol: 'BCH',
|
|
425
619
|
chain: Chains.BitcoinCashMainnet,
|
|
@@ -427,13 +621,23 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
427
621
|
precision: 8,
|
|
428
622
|
contract: undefined,
|
|
429
623
|
hasWithdrawMemo: false
|
|
430
|
-
}
|
|
624
|
+
}]: []),
|
|
625
|
+
...(IS_TESTNET ? [{
|
|
626
|
+
wallet: 'BCH',
|
|
627
|
+
symbol: 'BCH',
|
|
628
|
+
chain: Chains.BitcoinCashTestnet,
|
|
629
|
+
network: Networks.Testnet,
|
|
630
|
+
precision: 8,
|
|
631
|
+
contract: undefined,
|
|
632
|
+
hasWithdrawMemo: false
|
|
633
|
+
}]: [])
|
|
431
634
|
],
|
|
432
|
-
image: '/
|
|
635
|
+
image: 'https://www.proton.org/images/tokens/xtokensXBCH.png',
|
|
636
|
+
coingeckoId: 'bitcoin-cash'
|
|
433
637
|
},
|
|
434
638
|
{
|
|
435
639
|
allowSwap: false,
|
|
436
|
-
allowBridge:
|
|
640
|
+
allowBridge: IS_TESTNET,
|
|
437
641
|
allowLend: false,
|
|
438
642
|
allowBorrow: false,
|
|
439
643
|
name: 'Stellar',
|
|
@@ -442,20 +646,30 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
442
646
|
xtokenPrecision: 6,
|
|
443
647
|
xtokenContract: 'xtokens',
|
|
444
648
|
wallets: [
|
|
445
|
-
{
|
|
649
|
+
...(IS_MAINNET ? [{
|
|
446
650
|
wallet: 'XLM',
|
|
447
651
|
symbol: 'XLM',
|
|
448
652
|
chain: Chains.StellarMainnet,
|
|
449
653
|
network: Networks.Mainnet,
|
|
450
654
|
precision: 7,
|
|
451
655
|
contract: undefined,
|
|
452
|
-
hasWithdrawMemo:
|
|
453
|
-
}
|
|
656
|
+
hasWithdrawMemo: true
|
|
657
|
+
}]: []),
|
|
658
|
+
...(IS_TESTNET ? [{
|
|
659
|
+
wallet: 'XLM',
|
|
660
|
+
symbol: 'XLM',
|
|
661
|
+
chain: Chains.StellarTestnet,
|
|
662
|
+
network: Networks.Testnet,
|
|
663
|
+
precision: 7,
|
|
664
|
+
contract: undefined,
|
|
665
|
+
hasWithdrawMemo: true
|
|
666
|
+
}]: [])
|
|
454
667
|
],
|
|
455
|
-
image: '/
|
|
668
|
+
image: 'https://www.proton.org/images/tokens/xtokensXXLM.png',
|
|
669
|
+
coingeckoId: 'stellar'
|
|
456
670
|
},
|
|
457
671
|
{
|
|
458
|
-
allowSwap:
|
|
672
|
+
allowSwap: false,
|
|
459
673
|
allowBridge: false,
|
|
460
674
|
allowLend: false,
|
|
461
675
|
allowBorrow: false,
|
|
@@ -465,7 +679,8 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
465
679
|
xtokenPrecision: 4,
|
|
466
680
|
xtokenContract: 'sense',
|
|
467
681
|
wallets: [],
|
|
468
|
-
image: '/
|
|
682
|
+
image: 'https://www.proton.org/images/tokens/senseXSENSE.png',
|
|
683
|
+
coingeckoId: 'sense'
|
|
469
684
|
},
|
|
470
685
|
{
|
|
471
686
|
allowSwap: false,
|
|
@@ -478,7 +693,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
478
693
|
xtokenPrecision: 8,
|
|
479
694
|
xtokenContract: 'xtokens',
|
|
480
695
|
wallets: [
|
|
481
|
-
{
|
|
696
|
+
...(IS_MAINNET ? [{
|
|
482
697
|
wallet: 'DOT',
|
|
483
698
|
symbol: 'DOT',
|
|
484
699
|
chain: Chains.PolkadotMainnet,
|
|
@@ -486,13 +701,14 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
486
701
|
precision: 10,
|
|
487
702
|
contract: undefined,
|
|
488
703
|
hasWithdrawMemo: false
|
|
489
|
-
}
|
|
704
|
+
}]: [])
|
|
490
705
|
],
|
|
491
|
-
image: '/
|
|
706
|
+
image: 'https://www.proton.org/images/tokens/xtokensXDOT.png',
|
|
707
|
+
coingeckoId: 'polkadot'
|
|
492
708
|
},
|
|
493
709
|
{
|
|
494
710
|
allowSwap: true,
|
|
495
|
-
allowBridge:
|
|
711
|
+
allowBridge: IS_MAINNET,
|
|
496
712
|
allowLend: false,
|
|
497
713
|
allowBorrow: false,
|
|
498
714
|
name: 'Binance Coin',
|
|
@@ -501,17 +717,42 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
501
717
|
xtokenPrecision: 8,
|
|
502
718
|
xtokenContract: 'xtokens',
|
|
503
719
|
wallets: [
|
|
504
|
-
{
|
|
720
|
+
...(IS_MAINNET ? [{
|
|
505
721
|
wallet: 'BNB',
|
|
506
722
|
symbol: 'BNB',
|
|
507
|
-
chain: Chains.
|
|
508
|
-
network: Networks.
|
|
509
|
-
precision:
|
|
723
|
+
chain: Chains.BinanceBEP20,
|
|
724
|
+
network: Networks.BEP20,
|
|
725
|
+
precision: 18,
|
|
510
726
|
contract: undefined,
|
|
511
|
-
hasWithdrawMemo:
|
|
512
|
-
}
|
|
727
|
+
hasWithdrawMemo: false
|
|
728
|
+
}]: [])
|
|
729
|
+
],
|
|
730
|
+
image: 'https://www.proton.org/images/tokens/xtokensXBNB.png',
|
|
731
|
+
coingeckoId: 'binancecoin'
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
allowSwap: false,
|
|
735
|
+
allowBridge: IS_MAINNET,
|
|
736
|
+
allowLend: false,
|
|
737
|
+
allowBorrow: false,
|
|
738
|
+
name: 'Binance USD',
|
|
739
|
+
coin: 'BUSD',
|
|
740
|
+
xtokenSymbol: 'XBUSD',
|
|
741
|
+
xtokenPrecision: 6,
|
|
742
|
+
xtokenContract: 'xtokens',
|
|
743
|
+
wallets: [
|
|
744
|
+
...(IS_MAINNET ? [{
|
|
745
|
+
wallet: 'BUSD-BEP20',
|
|
746
|
+
symbol: 'BUSD',
|
|
747
|
+
chain: Chains.BinanceBEP20,
|
|
748
|
+
network: Networks.BEP20,
|
|
749
|
+
precision: 18,
|
|
750
|
+
contract: '0xe9e7cea3dedca5984780bafc599bd69add087d56',
|
|
751
|
+
hasWithdrawMemo: false
|
|
752
|
+
}]: [])
|
|
513
753
|
],
|
|
514
|
-
image: '/
|
|
754
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/xbusd.png',
|
|
755
|
+
coingeckoId: 'binance-usd'
|
|
515
756
|
},
|
|
516
757
|
{
|
|
517
758
|
allowSwap: true,
|
|
@@ -524,7 +765,7 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
524
765
|
xtokenPrecision: 4,
|
|
525
766
|
xtokenContract: 'xtokens',
|
|
526
767
|
wallets: [
|
|
527
|
-
{
|
|
768
|
+
...(IS_MAINNET ? [{
|
|
528
769
|
wallet: 'EOS',
|
|
529
770
|
symbol: 'EOS',
|
|
530
771
|
chain: Chains.EosMainnet,
|
|
@@ -532,28 +773,47 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
532
773
|
precision: 4,
|
|
533
774
|
contract: undefined,
|
|
534
775
|
hasWithdrawMemo: true
|
|
535
|
-
}
|
|
776
|
+
}]: []),
|
|
777
|
+
...(IS_TESTNET ? [{
|
|
778
|
+
wallet: 'EOS',
|
|
779
|
+
symbol: 'EOS',
|
|
780
|
+
chain: Chains.EosTestnet,
|
|
781
|
+
network: Networks.Testnet,
|
|
782
|
+
precision: 4,
|
|
783
|
+
contract: undefined,
|
|
784
|
+
hasWithdrawMemo: true
|
|
785
|
+
}]: [])
|
|
536
786
|
],
|
|
537
|
-
image: '/
|
|
787
|
+
image: 'https://www.proton.org/images/tokens/xtokensXEOS.png',
|
|
788
|
+
coingeckoId: 'eos'
|
|
538
789
|
},
|
|
539
|
-
|
|
540
|
-
// Synthethic
|
|
541
790
|
{
|
|
542
791
|
allowSwap: IS_MAINNET,
|
|
543
|
-
allowBridge:
|
|
544
|
-
allowLend:
|
|
545
|
-
allowBorrow:
|
|
792
|
+
allowBridge: IS_MAINNET,
|
|
793
|
+
allowLend: true,
|
|
794
|
+
allowBorrow: true,
|
|
546
795
|
name: 'Dogecoin',
|
|
547
796
|
coin: 'DOGE',
|
|
548
797
|
xtokenSymbol: 'XDOGE',
|
|
549
798
|
xtokenPrecision: 6,
|
|
550
799
|
xtokenContract: 'xtokens',
|
|
551
|
-
wallets: [
|
|
552
|
-
|
|
800
|
+
wallets: [
|
|
801
|
+
...(IS_MAINNET ? [{
|
|
802
|
+
wallet: 'DOGE',
|
|
803
|
+
symbol: 'DOGE',
|
|
804
|
+
chain: Chains.DogeMainnet,
|
|
805
|
+
network: Networks.Mainnet,
|
|
806
|
+
precision: 8,
|
|
807
|
+
contract: undefined,
|
|
808
|
+
hasWithdrawMemo: false
|
|
809
|
+
}]: []),
|
|
810
|
+
],
|
|
811
|
+
image: 'https://www.proton.org/images/tokens/xtokensXDOGE.png',
|
|
812
|
+
coingeckoId: 'dogecoin'
|
|
553
813
|
},
|
|
554
814
|
{
|
|
555
815
|
allowSwap: IS_MAINNET,
|
|
556
|
-
allowBridge:
|
|
816
|
+
allowBridge: IS_MAINNET,
|
|
557
817
|
allowLend: false,
|
|
558
818
|
allowBorrow: false,
|
|
559
819
|
name: 'Cardano',
|
|
@@ -561,51 +821,205 @@ export const initializeCoins = (protonChain: string): InitializeReturn => {
|
|
|
561
821
|
xtokenSymbol: 'XADA',
|
|
562
822
|
xtokenPrecision: 6,
|
|
563
823
|
xtokenContract: 'xtokens',
|
|
564
|
-
wallets: [
|
|
565
|
-
|
|
824
|
+
wallets: [
|
|
825
|
+
...(IS_MAINNET ? [{
|
|
826
|
+
wallet: 'ADA',
|
|
827
|
+
symbol: 'ADA',
|
|
828
|
+
chain: Chains.CardanoMainnet,
|
|
829
|
+
network: Networks.Mainnet,
|
|
830
|
+
precision: 6,
|
|
831
|
+
contract: undefined,
|
|
832
|
+
hasWithdrawMemo: false
|
|
833
|
+
}]: [])
|
|
834
|
+
],
|
|
835
|
+
image: 'https://www.proton.org/images/tokens/xtokensXADA.png',
|
|
836
|
+
coingeckoId: 'cardano'
|
|
566
837
|
},
|
|
838
|
+
|
|
839
|
+
// Adding
|
|
567
840
|
{
|
|
568
841
|
allowSwap: false,
|
|
569
|
-
allowBridge:
|
|
842
|
+
allowBridge: IS_MAINNET,
|
|
570
843
|
allowLend: false,
|
|
571
844
|
allowBorrow: false,
|
|
572
|
-
name: '
|
|
573
|
-
coin: '
|
|
574
|
-
xtokenSymbol: '
|
|
845
|
+
name: 'Terra',
|
|
846
|
+
coin: 'LUNA',
|
|
847
|
+
xtokenSymbol: 'XLUNA',
|
|
575
848
|
xtokenPrecision: 6,
|
|
576
849
|
xtokenContract: 'xtokens',
|
|
577
|
-
wallets: [
|
|
578
|
-
|
|
850
|
+
wallets: [
|
|
851
|
+
...(IS_MAINNET ? [{
|
|
852
|
+
wallet: 'LUNA',
|
|
853
|
+
symbol: 'LUNA',
|
|
854
|
+
chain: Chains.TerraMainnet,
|
|
855
|
+
network: Networks.Mainnet,
|
|
856
|
+
precision: 6,
|
|
857
|
+
contract: undefined,
|
|
858
|
+
hasWithdrawMemo: true
|
|
859
|
+
}]: [])
|
|
860
|
+
],
|
|
861
|
+
image: 'https://www.proton.org/images/tokens/xtokensXLUNA.png',
|
|
862
|
+
coingeckoId: 'terra-luna'
|
|
579
863
|
},
|
|
580
864
|
{
|
|
581
865
|
allowSwap: false,
|
|
582
|
-
allowBridge:
|
|
866
|
+
allowBridge: IS_MAINNET,
|
|
583
867
|
allowLend: false,
|
|
584
868
|
allowBorrow: false,
|
|
585
|
-
name: '
|
|
586
|
-
coin: '
|
|
587
|
-
xtokenSymbol: '
|
|
869
|
+
name: 'TerraUSD',
|
|
870
|
+
coin: 'UST',
|
|
871
|
+
xtokenSymbol: 'XUST',
|
|
588
872
|
xtokenPrecision: 6,
|
|
589
873
|
xtokenContract: 'xtokens',
|
|
590
|
-
wallets: [
|
|
591
|
-
|
|
874
|
+
wallets: [
|
|
875
|
+
...(IS_MAINNET ? [{
|
|
876
|
+
wallet: 'UST',
|
|
877
|
+
symbol: 'UST',
|
|
878
|
+
chain: Chains.TerraMainnet,
|
|
879
|
+
network: Networks.Mainnet,
|
|
880
|
+
precision: 6,
|
|
881
|
+
contract: undefined,
|
|
882
|
+
hasWithdrawMemo: true
|
|
883
|
+
}]: [])
|
|
884
|
+
],
|
|
885
|
+
image: 'https://www.proton.org/images/tokens/xtokensXUST.png',
|
|
886
|
+
coingeckoId: 'terrausd'
|
|
592
887
|
},
|
|
593
888
|
{
|
|
594
889
|
allowSwap: false,
|
|
595
|
-
allowBridge:
|
|
890
|
+
allowBridge: IS_MAINNET,
|
|
596
891
|
allowLend: false,
|
|
597
892
|
allowBorrow: false,
|
|
598
|
-
name: '
|
|
599
|
-
coin: '
|
|
600
|
-
xtokenSymbol: '
|
|
893
|
+
name: 'Solana',
|
|
894
|
+
coin: 'SOL',
|
|
895
|
+
xtokenSymbol: 'XSOL',
|
|
601
896
|
xtokenPrecision: 6,
|
|
602
897
|
xtokenContract: 'xtokens',
|
|
603
|
-
wallets: [
|
|
604
|
-
|
|
898
|
+
wallets: [
|
|
899
|
+
...(IS_MAINNET ? [{
|
|
900
|
+
wallet: 'SOL',
|
|
901
|
+
symbol: 'SOL',
|
|
902
|
+
chain: Chains.SolanaMainnet,
|
|
903
|
+
network: Networks.Mainnet,
|
|
904
|
+
precision: 9,
|
|
905
|
+
contract: undefined,
|
|
906
|
+
hasWithdrawMemo: false
|
|
907
|
+
}]: [])
|
|
908
|
+
],
|
|
909
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/xsol.png',
|
|
910
|
+
coingeckoId: 'solana'
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
allowSwap: false,
|
|
914
|
+
allowBridge: IS_MAINNET,
|
|
915
|
+
allowLend: false,
|
|
916
|
+
allowBorrow: false,
|
|
917
|
+
name: 'Ripple',
|
|
918
|
+
coin: 'XRP',
|
|
919
|
+
xtokenSymbol: 'XXRP',
|
|
920
|
+
xtokenPrecision: 6,
|
|
921
|
+
xtokenContract: 'xtokens',
|
|
922
|
+
wallets: [
|
|
923
|
+
...(IS_MAINNET ? [{
|
|
924
|
+
wallet: 'XRP',
|
|
925
|
+
symbol: 'XRP',
|
|
926
|
+
chain: Chains.RippleMainnet,
|
|
927
|
+
network: Networks.Mainnet,
|
|
928
|
+
precision: 6,
|
|
929
|
+
contract: undefined,
|
|
930
|
+
hasWithdrawMemo: true
|
|
931
|
+
}]: [])
|
|
932
|
+
],
|
|
933
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/xxrp.png',
|
|
934
|
+
coingeckoId: 'ripple'
|
|
935
|
+
},
|
|
936
|
+
|
|
937
|
+
// Future
|
|
938
|
+
{
|
|
939
|
+
allowSwap: false,
|
|
940
|
+
allowBridge: false,
|
|
941
|
+
allowLend: false,
|
|
942
|
+
allowBorrow: false,
|
|
943
|
+
name: 'Avalanche',
|
|
944
|
+
coin: 'AVAX',
|
|
945
|
+
xtokenSymbol: 'XAVAX',
|
|
946
|
+
xtokenPrecision: 9,
|
|
947
|
+
xtokenContract: 'xtokens',
|
|
948
|
+
wallets: [
|
|
949
|
+
...(IS_MAINNET ? [
|
|
950
|
+
{
|
|
951
|
+
wallet: 'AVAX',
|
|
952
|
+
symbol: 'AVAX',
|
|
953
|
+
chain: Chains.AvalancheCChain,
|
|
954
|
+
network: Networks.Mainnet,
|
|
955
|
+
precision: 9,
|
|
956
|
+
contract: undefined,
|
|
957
|
+
hasWithdrawMemo: false
|
|
958
|
+
}
|
|
959
|
+
]: [])
|
|
960
|
+
],
|
|
961
|
+
image: 'https://www.proton.org/images/tokens/xtokensXAVAX.png',
|
|
962
|
+
coingeckoId: 'avalanche-2'
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
allowSwap: false,
|
|
966
|
+
allowBridge: false,
|
|
967
|
+
allowLend: false,
|
|
968
|
+
allowBorrow: false,
|
|
969
|
+
name: 'Polygon',
|
|
970
|
+
coin: 'MATIC',
|
|
971
|
+
xtokenSymbol: 'XMATIC',
|
|
972
|
+
xtokenPrecision: 8,
|
|
973
|
+
xtokenContract: 'xtokens',
|
|
974
|
+
wallets: [
|
|
975
|
+
...(IS_MAINNET ? [{
|
|
976
|
+
wallet: 'MATIC',
|
|
977
|
+
symbol: 'MATIC',
|
|
978
|
+
chain: Chains.PolygonMainnet,
|
|
979
|
+
network: Networks.Mainnet,
|
|
980
|
+
precision: 18,
|
|
981
|
+
contract: '0x0000000000000000000000000000000000000000',
|
|
982
|
+
hasWithdrawMemo: false
|
|
983
|
+
}]: [])
|
|
984
|
+
],
|
|
985
|
+
image: 'https://www.proton.org/images/tokens/xtokensXMATIC.png',
|
|
986
|
+
coingeckoId: 'matic-network'
|
|
605
987
|
},
|
|
606
|
-
|
|
988
|
+
{
|
|
989
|
+
allowSwap: false,
|
|
990
|
+
allowBridge: IS_TESTNET,
|
|
991
|
+
allowLend: false,
|
|
992
|
+
allowBorrow: false,
|
|
993
|
+
name: 'HBAR',
|
|
994
|
+
coin: 'HBAR',
|
|
995
|
+
xtokenSymbol: 'XHBAR',
|
|
996
|
+
xtokenPrecision: 6,
|
|
997
|
+
xtokenContract: 'xtokens',
|
|
998
|
+
wallets: [
|
|
999
|
+
...(IS_TESTNET ? [{
|
|
1000
|
+
wallet: 'HBAR',
|
|
1001
|
+
symbol: 'HBAR',
|
|
1002
|
+
chain: Chains.HederaTestnet,
|
|
1003
|
+
network: Networks.Testnet,
|
|
1004
|
+
precision: 8,
|
|
1005
|
+
contract: undefined,
|
|
1006
|
+
hasWithdrawMemo: true
|
|
1007
|
+
}]: [])
|
|
1008
|
+
],
|
|
1009
|
+
image: 'https://www.proton.org/images/tokens/xtokensXHBAR.png',
|
|
1010
|
+
coingeckoId: 'hedera-hashgraph'
|
|
1011
|
+
}
|
|
607
1012
|
]
|
|
608
1013
|
|
|
1014
|
+
// Validation
|
|
1015
|
+
const walletWithDuplicateChains = coins.find(coin => {
|
|
1016
|
+
const chains = coin.wallets.map(wallet => wallet.chain)
|
|
1017
|
+
return new Set(chains).size !== chains.length
|
|
1018
|
+
})
|
|
1019
|
+
if (walletWithDuplicateChains) {
|
|
1020
|
+
throw new Error(`Coin ${walletWithDuplicateChains.coin} has duplicate chains in wallet`)
|
|
1021
|
+
}
|
|
1022
|
+
|
|
609
1023
|
return {
|
|
610
1024
|
allCoins: coins,
|
|
611
1025
|
swapCoins: coins.filter(coin => coin.allowSwap),
|