@defisaver/tokens 0.0.95-pt-april-dev

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/src/ilks.ts ADDED
@@ -0,0 +1,468 @@
1
+ /** AUTOMATICALLY GENERATED FILE **/
2
+
3
+ import { IlkData } from './types.js';
4
+
5
+ export const ilks:IlkData[] = [
6
+ {
7
+ "asset": "ETH",
8
+ "assetAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
9
+ "ilkLabel": "ETH-A",
10
+ "ilkBytes": "0x4554482d41000000000000000000000000000000000000000000000000000000",
11
+ "join": "0x2F0b23f53734252Bda2277357e97e1517d6B042A",
12
+ "clip": "0xc67963a226eddd77B91aD8c421630A1b0AdFF270",
13
+ "pip": "0x81FE72B5A8d1A857d176C3E7d5Bd2679A9B85763",
14
+ "isLP": false,
15
+ "isCrop": false
16
+ },
17
+ {
18
+ "asset": "ETH",
19
+ "assetAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
20
+ "ilkLabel": "ETH-B",
21
+ "ilkBytes": "0x4554482d42000000000000000000000000000000000000000000000000000000",
22
+ "join": "0x08638eF1A205bE6762A8b935F5da9b700Cf7322c",
23
+ "clip": "0x71eb894330e8a4b96b8d6056962e7F116F50e06F",
24
+ "pip": "0x81FE72B5A8d1A857d176C3E7d5Bd2679A9B85763",
25
+ "isLP": false,
26
+ "isCrop": false
27
+ },
28
+ {
29
+ "asset": "ETH",
30
+ "assetAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
31
+ "ilkLabel": "ETH-C",
32
+ "ilkBytes": "0x4554482d43000000000000000000000000000000000000000000000000000000",
33
+ "join": "0xF04a5cC80B1E94C69B48f5ee68a08CD2F09A7c3E",
34
+ "clip": "0xc2b12567523e3f3CBd9931492b91fe65b240bc47",
35
+ "pip": "0x81FE72B5A8d1A857d176C3E7d5Bd2679A9B85763",
36
+ "isLP": false,
37
+ "isCrop": false
38
+ },
39
+ {
40
+ "asset": "BAT",
41
+ "assetAddress": "0x0D8775F648430679A709E98d2b0Cb6250d2887EF",
42
+ "ilkLabel": "BAT-A",
43
+ "ilkBytes": "0x4241542d41000000000000000000000000000000000000000000000000000000",
44
+ "join": "0x3D0B1912B66114d4096F48A8CEe3A56C231772cA",
45
+ "clip": "0x3D22e6f643e2F4c563fD9db22b229Cbb0Cd570fb",
46
+ "pip": "0xB4eb54AF9Cc7882DF0121d26c5b97E802915ABe6",
47
+ "isLP": false,
48
+ "isCrop": false
49
+ },
50
+ {
51
+ "asset": "USDC",
52
+ "assetAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
53
+ "ilkLabel": "USDC-A",
54
+ "ilkBytes": "0x555344432d410000000000000000000000000000000000000000000000000000",
55
+ "join": "0xA191e578a6736167326d05c119CE0c90849E84B7",
56
+ "clip": "0x046b1A5718da6A226D912cFd306BA19980772908",
57
+ "pip": "0x77b68899b99b686F415d074278a9a16b336085A0",
58
+ "isLP": false,
59
+ "isCrop": false
60
+ },
61
+ {
62
+ "asset": "USDC",
63
+ "assetAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
64
+ "ilkLabel": "USDC-B",
65
+ "ilkBytes": "0x555344432d420000000000000000000000000000000000000000000000000000",
66
+ "join": "0x2600004fd1585f7270756DDc88aD9cfA10dD0428",
67
+ "clip": "0x5590F23358Fe17361d7E4E4f91219145D8cCfCb3",
68
+ "pip": "0x77b68899b99b686F415d074278a9a16b336085A0",
69
+ "isLP": false,
70
+ "isCrop": false
71
+ },
72
+ {
73
+ "asset": "WBTC",
74
+ "assetAddress": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
75
+ "ilkLabel": "WBTC-A",
76
+ "ilkBytes": "0x574254432d410000000000000000000000000000000000000000000000000000",
77
+ "join": "0xBF72Da2Bd84c5170618Fbe5914B0ECA9638d5eb5",
78
+ "clip": "0x0227b54AdbFAEec5f1eD1dFa11f54dcff9076e2C",
79
+ "pip": "0xf185d0682d50819263941e5f4EacC763CC5C6C42",
80
+ "isLP": false,
81
+ "isCrop": false
82
+ },
83
+ {
84
+ "asset": "TUSD",
85
+ "assetAddress": "0x0000000000085d4780B73119b644AE5ecd22b376",
86
+ "ilkLabel": "TUSD-A",
87
+ "ilkBytes": "0x545553442d410000000000000000000000000000000000000000000000000000",
88
+ "join": "0x4454aF7C8bb9463203b66C816220D41ED7837f44",
89
+ "clip": "0x0F6f88f8A4b918584E3539182793a0C276097f44",
90
+ "pip": "0xeE13831ca96d191B688A670D47173694ba98f1e5",
91
+ "isLP": false,
92
+ "isCrop": false
93
+ },
94
+ {
95
+ "asset": "ZRX",
96
+ "assetAddress": "0xE41d2489571d322189246DaFA5ebDe1F4699F498",
97
+ "ilkLabel": "ZRX-A",
98
+ "ilkBytes": "0x5a52582d41000000000000000000000000000000000000000000000000000000",
99
+ "join": "0xc7e8Cd72BDEe38865b4F5615956eF47ce1a7e5D0",
100
+ "clip": "0xdc90d461E148552387f3aB3EBEE0Bdc58Aa16375",
101
+ "pip": "0x7382c066801E7Acb2299aC8562847B9883f5CD3c",
102
+ "isLP": false,
103
+ "isCrop": false
104
+ },
105
+ {
106
+ "asset": "KNCL",
107
+ "assetAddress": "0xdd974D5C2e2928deA5F71b9825b8b646686BD200",
108
+ "ilkLabel": "KNC-A",
109
+ "ilkBytes": "0x4b4e432d41000000000000000000000000000000000000000000000000000000",
110
+ "join": "0x475F1a89C1ED844A08E8f6C50A00228b5E59E4A9",
111
+ "clip": "0x006Aa3eB5E666D8E006aa647D4afAB212555Ddea",
112
+ "pip": "0xf36B79BD4C0904A5F350F1e4f776B81208c13069",
113
+ "isLP": false,
114
+ "isCrop": false
115
+ },
116
+ {
117
+ "asset": "MANA",
118
+ "assetAddress": "0x0F5D2fB29fb7d3CFeE444a200298f468908cC942",
119
+ "ilkLabel": "MANA-A",
120
+ "ilkBytes": "0x4d414e412d410000000000000000000000000000000000000000000000000000",
121
+ "join": "0xA6EA3b9C04b8a38Ff5e224E7c3D6937ca44C0ef9",
122
+ "clip": "0xF5C8176E1eB0915359E46DEd16E52C071Bb435c0",
123
+ "pip": "0x8067259EA630601f319FccE477977E55C6078C13",
124
+ "isLP": false,
125
+ "isCrop": false
126
+ },
127
+ {
128
+ "asset": "USDT",
129
+ "assetAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
130
+ "ilkLabel": "USDT-A",
131
+ "ilkBytes": "0x555344542d410000000000000000000000000000000000000000000000000000",
132
+ "join": "0x0Ac6A1D74E84C2dF9063bDDc31699FF2a2BB22A2",
133
+ "clip": "0xFC9D6Dd08BEE324A5A8B557d2854B9c36c2AeC5d",
134
+ "pip": "0x7a5918670B0C390aD25f7beE908c1ACc2d314A3C",
135
+ "isLP": false,
136
+ "isCrop": false
137
+ },
138
+ {
139
+ "asset": "USDP",
140
+ "assetAddress": "0x8E870D67F660D95d5be530380D0eC0bd388289E1",
141
+ "ilkLabel": "PAXUSD-A",
142
+ "ilkBytes": "0x5041585553442d41000000000000000000000000000000000000000000000000",
143
+ "join": "0x7e62B7E279DFC78DEB656E34D6a435cC08a44666",
144
+ "clip": "0xBCb396Cd139D1116BD89562B49b9D1d6c25378B0",
145
+ "pip": "0x043B963E1B2214eC90046167Ea29C2c8bDD7c0eC",
146
+ "isLP": false,
147
+ "isCrop": false
148
+ },
149
+ {
150
+ "asset": "COMP",
151
+ "assetAddress": "0xc00e94Cb662C3520282E6f5717214004A7f26888",
152
+ "ilkLabel": "COMP-A",
153
+ "ilkBytes": "0x434f4d502d410000000000000000000000000000000000000000000000000000",
154
+ "join": "0xBEa7cDfB4b49EC154Ae1c0D731E4DC773A3265aA",
155
+ "clip": "0x2Bb690931407DCA7ecE84753EA931ffd304f0F38",
156
+ "pip": "0xBED0879953E633135a48a157718Aa791AC0108E4",
157
+ "isLP": false,
158
+ "isCrop": false
159
+ },
160
+ {
161
+ "asset": "LRC",
162
+ "assetAddress": "0xBBbbCA6A901c926F240b89EacB641d8Aec7AEafD",
163
+ "ilkLabel": "LRC-A",
164
+ "ilkBytes": "0x4c52432d41000000000000000000000000000000000000000000000000000000",
165
+ "join": "0x6C186404A7A238D3d6027C0299D1822c1cf5d8f1",
166
+ "clip": "0x81C5CDf4817DBf75C7F08B8A1cdaB05c9B3f70F7",
167
+ "pip": "0x9eb923339c24c40Bef2f4AF4961742AA7C23EF3a",
168
+ "isLP": false,
169
+ "isCrop": false
170
+ },
171
+ {
172
+ "asset": "LINK",
173
+ "assetAddress": "0x514910771AF9Ca656af840dff83E8264EcF986CA",
174
+ "ilkLabel": "LINK-A",
175
+ "ilkBytes": "0x4c494e4b2d410000000000000000000000000000000000000000000000000000",
176
+ "join": "0xdFccAf8fDbD2F4805C174f856a317765B49E4a50",
177
+ "clip": "0x832Dd5f17B30078a5E46Fdb8130A68cBc4a74dC0",
178
+ "pip": "0x9B0C694C6939b5EA9584e9b61C7815E8d97D9cC7",
179
+ "isLP": false,
180
+ "isCrop": false
181
+ },
182
+ {
183
+ "asset": "BAL",
184
+ "assetAddress": "0xba100000625a3754423978a60c9317c58a424e3D",
185
+ "ilkLabel": "BAL-A",
186
+ "ilkBytes": "0x42414c2d41000000000000000000000000000000000000000000000000000000",
187
+ "join": "0x4a03Aa7fb3973d8f0221B466EefB53D0aC195f55",
188
+ "clip": "0x6AAc067bb903E633A422dE7BE9355E62B3CE0378",
189
+ "pip": "0x3ff860c0F28D69F392543A16A397D0dAe85D16dE",
190
+ "isLP": false,
191
+ "isCrop": false
192
+ },
193
+ {
194
+ "asset": "YFI",
195
+ "assetAddress": "0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e",
196
+ "ilkLabel": "YFI-A",
197
+ "ilkBytes": "0x5946492d41000000000000000000000000000000000000000000000000000000",
198
+ "join": "0x3ff33d9162aD47660083D7DC4bC02Fb231c81677",
199
+ "clip": "0x9daCc11dcD0aa13386D295eAeeBBd38130897E6f",
200
+ "pip": "0x5F122465bCf86F45922036970Be6DD7F58820214",
201
+ "isLP": false,
202
+ "isCrop": false
203
+ },
204
+ {
205
+ "asset": "GUSD",
206
+ "assetAddress": "0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd",
207
+ "ilkLabel": "GUSD-A",
208
+ "ilkBytes": "0x475553442d410000000000000000000000000000000000000000000000000000",
209
+ "join": "0xe29A14bcDeA40d83675aa43B72dF07f649738C8b",
210
+ "clip": "0xa47D68b9dB0A0361284fA04BA40623fcBd1a263E",
211
+ "pip": "0xf45Ae69CcA1b9B043dAE2C83A5B65Bc605BEc5F5",
212
+ "isLP": false,
213
+ "isCrop": false
214
+ },
215
+ {
216
+ "asset": "UNI",
217
+ "assetAddress": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
218
+ "ilkLabel": "UNI-A",
219
+ "ilkBytes": "0x554e492d41000000000000000000000000000000000000000000000000000000",
220
+ "join": "0x3BC3A58b4FC1CbE7e98bB4aB7c99535e8bA9b8F1",
221
+ "clip": "0x3713F83Ee6D138Ce191294C131148176015bC29a",
222
+ "pip": "0xf363c7e351C96b910b92b45d34190650df4aE8e7",
223
+ "isLP": false,
224
+ "isCrop": false
225
+ },
226
+ {
227
+ "asset": "RENBTC",
228
+ "assetAddress": "0xEB4C2781e4ebA804CE9a9803C67d0893436bB27D",
229
+ "ilkLabel": "RENBTC-A",
230
+ "ilkBytes": "0x52454e4254432d41000000000000000000000000000000000000000000000000",
231
+ "join": "0xFD5608515A47C37afbA68960c1916b79af9491D0",
232
+ "clip": "0x834719BEa8da68c46484E001143bDDe29370a6A3",
233
+ "pip": "0xf185d0682d50819263941e5f4EacC763CC5C6C42",
234
+ "isLP": false,
235
+ "isCrop": false
236
+ },
237
+ {
238
+ "asset": "AAVE",
239
+ "assetAddress": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9",
240
+ "ilkLabel": "AAVE-A",
241
+ "ilkBytes": "0x414156452d410000000000000000000000000000000000000000000000000000",
242
+ "join": "0x24e459F61cEAa7b1cE70Dbaea938940A7c5aD46e",
243
+ "clip": "0x8723b74F598DE2ea49747de5896f9034CC09349e",
244
+ "pip": "0x8Df8f06DC2dE0434db40dcBb32a82A104218754c",
245
+ "isLP": false,
246
+ "isCrop": false
247
+ },
248
+ {
249
+ "asset": "UNIV2DAIETH",
250
+ "assetAddress": "0xA478c2975Ab1Ea89e8196811F51A7B7Ade33eB11",
251
+ "ilkLabel": "UNIV2DAIETH-A",
252
+ "ilkBytes": "0x554e4956324441494554482d4100000000000000000000000000000000000000",
253
+ "join": "0x2502F65D77cA13f183850b5f9272270454094A08",
254
+ "clip": "0x9F6981bA5c77211A34B76c6385c0f6FA10414035",
255
+ "pip": "0xFc8137E1a45BAF0030563EC4F0F851bd36a85b7D",
256
+ "isLP": true,
257
+ "isCrop": false
258
+ },
259
+ {
260
+ "asset": "UNIV2WBTCETH",
261
+ "assetAddress": "0xBb2b8038a1640196FbE3e38816F3e67Cba72D940",
262
+ "ilkLabel": "UNIV2WBTCETH-A",
263
+ "ilkBytes": "0x554e495632574254434554482d41000000000000000000000000000000000000",
264
+ "join": "0xDc26C9b7a8fe4F5dF648E314eC3E6Dc3694e6Dd2",
265
+ "clip": "0xb15afaB996904170f87a64Fe42db0b64a6F75d24",
266
+ "pip": "0x8400D2EDb8B97f780356Ef602b1BdBc082c2aD07",
267
+ "isLP": true,
268
+ "isCrop": false
269
+ },
270
+ {
271
+ "asset": "UNIV2USDCETH",
272
+ "assetAddress": "0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc",
273
+ "ilkLabel": "UNIV2USDCETH-A",
274
+ "ilkBytes": "0x554e495632555344434554482d41000000000000000000000000000000000000",
275
+ "join": "0x03Ae53B33FeeAc1222C3f372f32D37Ba95f0F099",
276
+ "clip": "0x93AE03815BAF1F19d7F18D9116E4b637cc32A131",
277
+ "pip": "0xf751f24DD9cfAd885984D1bA68860F558D21E52A",
278
+ "isLP": true,
279
+ "isCrop": false
280
+ },
281
+ {
282
+ "asset": "UNIV2DAIUSDC",
283
+ "assetAddress": "0xAE461cA67B15dc8dc81CE7615e0320dA1A9aB8D5",
284
+ "ilkLabel": "UNIV2DAIUSDC-A",
285
+ "ilkBytes": "0x554e495632444149555344432d41000000000000000000000000000000000000",
286
+ "join": "0xA81598667AC561986b70ae11bBE2dd5348ed4327",
287
+ "clip": "0x9B3310708af333f6F379FA42a5d09CBAA10ab309",
288
+ "pip": "0x25D03C2C928ADE19ff9f4FFECc07d991d0df054B",
289
+ "isLP": true,
290
+ "isCrop": false
291
+ },
292
+ {
293
+ "asset": "UNIV2ETHUSDT",
294
+ "assetAddress": "0x0d4a11d5EEaaC28EC3F61d100daF4d40471f1852",
295
+ "ilkLabel": "UNIV2ETHUSDT-A",
296
+ "ilkBytes": "0x554e495632455448555344542d41000000000000000000000000000000000000",
297
+ "join": "0x4aAD139a88D2dd5e7410b408593208523a3a891d",
298
+ "clip": "0x2aC4C9b49051275AcB4C43Ec973082388D015D48",
299
+ "pip": "0x5f6dD5B421B8d92c59dC6D907C9271b1DBFE3016",
300
+ "isLP": true,
301
+ "isCrop": false
302
+ },
303
+ {
304
+ "asset": "UNIV2LINKETH",
305
+ "assetAddress": "0xa2107FA5B38d9bbd2C461D6EDf11B11A50F6b974",
306
+ "ilkLabel": "UNIV2LINKETH-A",
307
+ "ilkBytes": "0x554e4956324c494e4b4554482d41000000000000000000000000000000000000",
308
+ "join": "0xDae88bDe1FB38cF39B6A02b595930A3449e593A6",
309
+ "clip": "0x6aa0520354d1b84e1C6ABFE64a708939529b619e",
310
+ "pip": "0xd7d31e62AE5bfC3bfaa24Eda33e8c32D31a1746F",
311
+ "isLP": true,
312
+ "isCrop": false
313
+ },
314
+ {
315
+ "asset": "UNIV2UNIETH",
316
+ "assetAddress": "0xd3d2E2692501A5c9Ca623199D38826e513033a17",
317
+ "ilkLabel": "UNIV2UNIETH-A",
318
+ "ilkBytes": "0x554e495632554e494554482d4100000000000000000000000000000000000000",
319
+ "join": "0xf11a98339FE1CdE648e8D1463310CE3ccC3d7cC1",
320
+ "clip": "0xb0ece6F5542A4577E2f1Be491A937Ccbbec8479e",
321
+ "pip": "0x8462A88f50122782Cc96108F476deDB12248f931",
322
+ "isLP": true,
323
+ "isCrop": false
324
+ },
325
+ {
326
+ "asset": "UNIV2WBTCDAI",
327
+ "assetAddress": "0x231B7589426Ffe1b75405526fC32aC09D44364c4",
328
+ "ilkLabel": "UNIV2WBTCDAI-A",
329
+ "ilkBytes": "0x554e495632574254434441492d41000000000000000000000000000000000000",
330
+ "join": "0xD40798267795Cbf3aeEA8E9F8DCbdBA9b5281fcC",
331
+ "clip": "0x4fC53a57262B87ABDa61d6d0DB2bE7E9BE68F6b8",
332
+ "pip": "0x5bB72127a196392cf4aC00Cf57aB278394d24e55",
333
+ "isLP": true,
334
+ "isCrop": false
335
+ },
336
+ {
337
+ "asset": "UNIV2AAVEETH",
338
+ "assetAddress": "0xDFC14d2Af169B0D36C4EFF567Ada9b2E0CAE044f",
339
+ "ilkLabel": "UNIV2AAVEETH-A",
340
+ "ilkBytes": "0x554e495632414156454554482d41000000000000000000000000000000000000",
341
+ "join": "0x42AFd448Df7d96291551f1eFE1A590101afB1DfF",
342
+ "clip": "0x854b252BA15eaFA4d1609D3B98e00cc10084Ec55",
343
+ "pip": "0x32d8416e8538Ac36272c44b0cd962cD7E0198489",
344
+ "isLP": true,
345
+ "isCrop": false
346
+ },
347
+ {
348
+ "asset": "UNIV2DAIUSDT",
349
+ "assetAddress": "0xB20bd5D04BE54f870D5C0d3cA85d82b34B836405",
350
+ "ilkLabel": "UNIV2DAIUSDT-A",
351
+ "ilkBytes": "0x554e495632444149555344542d41000000000000000000000000000000000000",
352
+ "join": "0xAf034D882169328CAf43b823a4083dABC7EEE0F4",
353
+ "clip": "0xe4B82Be84391b9e7c56a1fC821f47569B364dd4a",
354
+ "pip": "0x9A1CD705dc7ac64B50777BcEcA3529E58B1292F1",
355
+ "isLP": true,
356
+ "isCrop": false
357
+ },
358
+ {
359
+ "asset": "MATIC",
360
+ "assetAddress": "0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0",
361
+ "ilkLabel": "MATIC-A",
362
+ "ilkBytes": "0x4d415449432d4100000000000000000000000000000000000000000000000000",
363
+ "join": "0x885f16e177d45fC9e7C87e1DA9fd47A9cfcE8E13",
364
+ "clip": "0x29342F530ed6120BDB219D602DaFD584676293d1",
365
+ "pip": "0x8874964279302e6d4e523Fb1789981C39a1034Ba",
366
+ "isLP": false,
367
+ "isCrop": false
368
+ },
369
+ {
370
+ "asset": "GUNIV3DAIUSDC1",
371
+ "assetAddress": "0xAbDDAfB225e10B90D798bB8A886238Fb835e2053",
372
+ "ilkLabel": "GUNIV3DAIUSDC1-A",
373
+ "ilkBytes": "0x47554e49563344414955534443312d4100000000000000000000000000000000",
374
+ "join": "0xbFD445A97e7459b0eBb34cfbd3245750Dba4d7a4",
375
+ "clip": "0x5048c5Cd3102026472f8914557A1FD35c8Dc6c9e",
376
+ "pip": "0x7F6d78CC0040c87943a0e0c140De3F77a273bd58",
377
+ "isLP": true,
378
+ "isCrop": false
379
+ },
380
+ {
381
+ "asset": "wstETH",
382
+ "assetAddress": "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
383
+ "ilkLabel": "WSTETH-A",
384
+ "ilkBytes": "0x5753544554482d41000000000000000000000000000000000000000000000000",
385
+ "join": "0x10CD5fbe1b404B7E19Ef964B63939907bdaf42E2",
386
+ "clip": "0x49A33A28C4C7D9576ab28898F4C9ac7e52EA457A",
387
+ "pip": "0xFe7a2aC0B945f12089aEEB6eCebf4F384D9f043F",
388
+ "isLP": false,
389
+ "isCrop": false
390
+ },
391
+ {
392
+ "asset": "WBTC",
393
+ "assetAddress": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
394
+ "ilkLabel": "WBTC-B",
395
+ "ilkBytes": "0x574254432d420000000000000000000000000000000000000000000000000000",
396
+ "join": "0xfA8c996e158B80D77FbD0082BB437556A65B96E0",
397
+ "clip": "0xe30663C6f83A06eDeE6273d72274AE24f1084a22",
398
+ "pip": "0xf185d0682d50819263941e5f4EacC763CC5C6C42",
399
+ "isLP": false,
400
+ "isCrop": false
401
+ },
402
+ {
403
+ "asset": "WBTC",
404
+ "assetAddress": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
405
+ "ilkLabel": "WBTC-C",
406
+ "ilkBytes": "0x574254432d430000000000000000000000000000000000000000000000000000",
407
+ "join": "0x7f62f9592b823331E012D3c5DdF2A7714CfB9de2",
408
+ "clip": "0x39F29773Dcb94A32529d0612C6706C49622161D1",
409
+ "pip": "0xf185d0682d50819263941e5f4EacC763CC5C6C42",
410
+ "isLP": false,
411
+ "isCrop": false
412
+ },
413
+ {
414
+ "asset": "GUNIV3DAIUSDC2",
415
+ "assetAddress": "0x50379f632ca68D36E50cfBC8F78fe16bd1499d1e",
416
+ "ilkLabel": "GUNIV3DAIUSDC2-A",
417
+ "ilkBytes": "0x47554e49563344414955534443322d4100000000000000000000000000000000",
418
+ "join": "0xA7e4dDde3cBcEf122851A7C8F7A55f23c0Daf335",
419
+ "clip": "0xB55da3d3100C4eBF9De755b6DdC24BF209f6cc06",
420
+ "pip": "0xcCBa43231aC6eceBd1278B90c3a44711a00F4e93",
421
+ "isLP": true,
422
+ "isCrop": false
423
+ },
424
+ {
425
+ "asset": "steCRV",
426
+ "assetAddress": "0x06325440D014e39736583c165C2963BA99fAf14E",
427
+ "ilkLabel": "CRVV1ETHSTETH-A",
428
+ "ilkBytes": "0x435256563145544853544554482d410000000000000000000000000000000000",
429
+ "join": "0x82D8bfDB61404C796385f251654F6d7e92092b5D",
430
+ "clip": "0x1926862F899410BfC19FeFb8A3C69C7Aed22463a",
431
+ "pip": "0xEa508F82728927454bd3ce853171b0e2705880D4",
432
+ "isLP": true,
433
+ "isCrop": true
434
+ },
435
+ {
436
+ "asset": "wstETH",
437
+ "assetAddress": "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
438
+ "ilkLabel": "WSTETH-B",
439
+ "ilkBytes": "0x5753544554482d42000000000000000000000000000000000000000000000000",
440
+ "join": "0x248cCBf4864221fC0E840F29BB042ad5bFC89B5c",
441
+ "clip": "0x3ea60191b7d5990a3544B6Ef79983fD67e85494A",
442
+ "pip": "0xFe7a2aC0B945f12089aEEB6eCebf4F384D9f043F",
443
+ "isLP": false,
444
+ "isCrop": false
445
+ },
446
+ {
447
+ "asset": "rETH",
448
+ "assetAddress": "0xae78736Cd615f374D3085123A210448E74Fc6393",
449
+ "ilkLabel": "RETH-A",
450
+ "ilkBytes": "0x524554482d410000000000000000000000000000000000000000000000000000",
451
+ "join": "0xC6424e862f1462281B0a5FAc078e4b63006bDEBF",
452
+ "clip": "0x27CA5E525ea473eD52Ea9423CD08cCc081d96a98",
453
+ "pip": "0xeE7F0b350aA119b3d05DC733a4621a81972f7D47",
454
+ "isLP": false,
455
+ "isCrop": false
456
+ },
457
+ {
458
+ "asset": "GNO",
459
+ "assetAddress": "0x6810e776880C02933D47DB1b9fc05908e5386b96",
460
+ "ilkLabel": "GNO-A",
461
+ "ilkBytes": "0x474e4f2d41000000000000000000000000000000000000000000000000000000",
462
+ "join": "0x7bD3f01e24E0f0838788bC8f573CEA43A80CaBB5",
463
+ "clip": "0xd9e758bd239e5d568f44D0A748633f6a8d52CBbb",
464
+ "pip": "0xd800ca44fFABecd159c7889c3bf64a217361AEc8",
465
+ "isLP": false,
466
+ "isCrop": false
467
+ }
468
+ ];
package/src/index.ts ADDED
@@ -0,0 +1,175 @@
1
+ import {Decimal as Dec} from 'decimal.js';
2
+ import {assetProto, assets} from './assets.js';
3
+ export {assets}
4
+ import {ilks} from './ilks.js';
5
+ export {ilks}
6
+ import {reflexerCollTypes} from './reflexerCollTypes.js';
7
+ export {reflexerCollTypes}
8
+ import {aaveV2Markets} from './aaveV2Markets.js';
9
+ export {aaveV2Markets}
10
+
11
+ import type {AaveMarketData, AssetDataBase, AssetData, ExtendedIlkData, IlkData, AddressMapping, Config} from './types.js';
12
+ export type {AaveMarketData, AssetDataBase, AssetData, ExtendedIlkData, IlkData, AddressMapping};
13
+
14
+ import {stringToBytes, bytesToString, compare} from './utils.js';
15
+ export {stringToBytes, bytesToString, compare};
16
+
17
+ const config: Config = {
18
+ iconFunc: undefined,
19
+ network: 1,
20
+ }
21
+
22
+ export const set = (key: string, value: any):void => {
23
+ (config as any)[key] = value;
24
+ }
25
+
26
+ export const MAXUINT:string = '115792089237316195423570985008687907853269984665640564039457584007913129639935';
27
+
28
+ Dec.set({
29
+ rounding: Dec.ROUND_DOWN,
30
+ toExpPos: 9e15,
31
+ toExpNeg: -9e15,
32
+ precision: 50,
33
+ });
34
+
35
+ /**
36
+ *
37
+ * @param symbol {string}
38
+ * @return symbol {string}
39
+ */
40
+ const handleWBTCLegacy = (symbol:string = ''):string => (symbol === 'WBTC Legacy' ? 'WBTC' : symbol);
41
+
42
+ const _addChainSpecificData = (assetDataBase:AssetDataBase, chainId?: number):AssetData => {
43
+ const assetData = {
44
+ ...assetDataBase,
45
+ address: assetDataBase.addresses[chainId || config.network] || ''
46
+ };
47
+ if (config.iconFunc) assetData.icon = config.iconFunc({ ...assetData });
48
+ return assetData;
49
+ }
50
+
51
+ /**
52
+ * Returns asset info.
53
+ * Warning: will not throw if asset not found. Instead, will return a placeholder object.
54
+ *
55
+ * @param symbol {string}
56
+ * @param chainId {number}
57
+ * @return {AssetData}
58
+ */
59
+ export const getAssetInfo = (symbol:string = '', chainId?:number):AssetData => {
60
+ let assetData = assets.find(t => compare(t.symbol, handleWBTCLegacy(symbol)));
61
+ if (!assetData) assetData = { ...assetProto };
62
+ return _addChainSpecificData(assetData, chainId);
63
+ }
64
+
65
+ /**
66
+ * Returns Maker or Reflexer ilk info, and asset info as `assetData` attribute.
67
+ * Warning: will not throw if ilk not found. Instead, will return a placeholder object.
68
+ *
69
+ * @param ilk {string} Ilk encoded as string or as hex
70
+ * @returns {ExtendedIlkData}
71
+ */
72
+ export const getIlkInfo = (ilk:string = ''):ExtendedIlkData => {
73
+ const _ilk = (ilk.substr(0, 2) === '0x' ? bytesToString(ilk) : ilk).toUpperCase();
74
+ const ilkData = ilks.find(i => i.ilkLabel === _ilk) || reflexerCollTypes.find(i => i.ilkLabel === _ilk);
75
+ if (!ilkData) {
76
+ console.error(`Ilk "${ilk}" not found`);
77
+ return {
78
+ ilkLabel: _ilk,
79
+ ilkBytes: stringToBytes(_ilk),
80
+ asset: ilkToAsset(ilk),
81
+ pip: '',
82
+ join: '',
83
+ isLP: false,
84
+ isCrop: false,
85
+ };
86
+ }
87
+ const assetData = getAssetInfo(ilkData.asset);
88
+ return {
89
+ ...ilkData,
90
+ assetData,
91
+ }
92
+ };
93
+
94
+ export const getAssetInfoByAddress = (address: string = '', chainId?:number):AssetData => {
95
+ const assetDataBase = assets.find(t => t.addresses[chainId || config.network]?.toLowerCase() === address.toLowerCase());
96
+ return _addChainSpecificData(assetDataBase || {...assetProto}, chainId);
97
+ }
98
+
99
+ export const ilkToAsset = (ilk: string = ''):string => {
100
+ let ilkLabel = ilk.substr(0, 2) === '0x' ? bytesToString(ilk) : ilk;
101
+ let asset = ilkLabel.replace(/-.*/, '');
102
+ if (ilkLabel.startsWith('PSM')) asset = ilkLabel.match(/^[A-Z]*-(.*)-[A-Z]*/)?.[1] || asset;
103
+ if (asset === 'KNC') return 'KNCL';
104
+ if (asset === 'PAXUSD' || asset === 'PAX') return 'USDP';
105
+ if (asset === 'WSTETH') return 'wstETH';
106
+ if (asset === 'CRVV1ETHSTETH') return 'steCRV';
107
+ if (asset === 'RETH') return 'rETH';
108
+ return asset;
109
+ }
110
+
111
+ /** @private **/
112
+ export const compoundAsset = (underlyingAsset: string):string => `c${underlyingAsset.toUpperCase()}`;
113
+ /** @private **/
114
+ export const aaveAsset = (underlyingAsset: string):string => `a${underlyingAsset.toUpperCase()}`;
115
+
116
+ /**
117
+ * @param join {string} Maker or Reflexer ilk join
118
+ * @param fromIlks {IlkData[]}
119
+ * @returns {string} Token symbol
120
+ */
121
+ export const tokenFromJoin = (join: string, fromIlks: IlkData[] = ilks): string => {
122
+ for (const ilkInfo of fromIlks) {
123
+ if (compare(ilkInfo.join, join)) return ilkInfo.asset;
124
+ }
125
+ if (compare('0x448a5065aebb8e423f0896e6c5d525c040f59af3', join)) return 'ETH'; // SCD ETH
126
+ return '';
127
+ };
128
+
129
+ /**
130
+ * @param join {string} Maker ilk join
131
+ * @returns {string} Token symbol
132
+ */
133
+ export const tokenFromMakerJoin = (join: string): string => tokenFromJoin(join, ilks);
134
+
135
+ /**
136
+ * @param join {string} Reflexer ilk join
137
+ * @returns {string} Token symbol
138
+ */
139
+ export const tokenFromReflexerJoin = (join: string): string => tokenFromJoin(join, reflexerCollTypes);
140
+
141
+ export const getAaveV2MarketInfo = (name:string = ''):(AaveMarketData|void) => aaveV2Markets.find(i => i.name === name);
142
+
143
+ /**
144
+ * @param amount {Number|String|Object} Amount in wei
145
+ * @param asset {String} Asset symbol (or `MCD-${symbol}` for maker asset - always 18dec)
146
+ * @return {String}
147
+ */
148
+ export const assetAmountInEth = (amount: number | string | object, asset: string = 'ETH'): string => {
149
+ if (amount?.toString() === 'Infinity') return MAXUINT;
150
+
151
+ let decimals;
152
+
153
+ // USDC/WBTC have 6/8 decimals but Vat is storing it in 18 decimal precision
154
+ if (asset.substr(0, 4) === 'MCD-') decimals = 18;
155
+
156
+ // Compound returns borrowing power in USD with 18 decimals
157
+ else if (asset === 'USD') decimals = 18;
158
+
159
+ else decimals = getAssetInfo(asset).decimals;
160
+
161
+ return new Dec(amount && amount.toString() || 0).div(10 ** decimals).toDP(decimals).toString();
162
+ };
163
+
164
+ /**
165
+ * @param amount {Number|String|Object} Amount in eth
166
+ * @param asset {String} Asset symbol
167
+ * @return {String}
168
+ */
169
+ export const assetAmountInWei = (amount: number | string | object, asset: string): string => {
170
+ if (amount?.toString() === 'Infinity') return MAXUINT;
171
+
172
+ const {decimals} = getAssetInfo(asset);
173
+
174
+ return new Dec(amount && amount.toString() || 0).mul(10 ** decimals).floor().toString();
175
+ };
@@ -0,0 +1,13 @@
1
+ import { IlkData } from './types.js';
2
+
3
+ export const reflexerCollTypes:IlkData[] = [
4
+ {
5
+ "asset": "ETH",
6
+ "ilkLabel": "ETH-A",
7
+ "ilkBytes": "0x4554482d41000000000000000000000000000000000000000000000000000000",
8
+ "join": '0x2D3cD7b81c93f188F3CB8aD87c8Acc73d6226e3A',
9
+ "pip": '0xE6F5377DE93A361cd5531bdFbDf0f4b522E16B2B',
10
+ "isLP": false,
11
+ "isCrop": false
12
+ },
13
+ ];