@defisaver/tokens 1.3.63 → 1.3.67

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/README.md CHANGED
@@ -54,7 +54,7 @@ Name | Type |
54
54
  `underlyingAsset` | *string* |
55
55
  `yearnCollateral` | *boolean* |
56
56
 
57
- Defined in: [types.ts:4](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/types.ts#L4)
57
+ Defined in: [types.ts:4](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/types.ts#L4)
58
58
 
59
59
  ___
60
60
 
@@ -62,7 +62,7 @@ ___
62
62
 
63
63
  Ƭ **ExtendedIlkData**: [*IlkData*](README.md#ilkdata) \| { `assetData`: [*AssetData*](README.md#assetdata) }
64
64
 
65
- Defined in: [types.ts:40](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/types.ts#L40)
65
+ Defined in: [types.ts:40](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/types.ts#L40)
66
66
 
67
67
  ___
68
68
 
@@ -86,7 +86,7 @@ Name | Type |
86
86
  `join` | *string* |
87
87
  `pip` | *string* |
88
88
 
89
- Defined in: [types.ts:21](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/types.ts#L21)
89
+ Defined in: [types.ts:21](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/types.ts#L21)
90
90
 
91
91
  ## Variables
92
92
 
@@ -94,7 +94,7 @@ Defined in: [types.ts:21](https://github.com/DecenterApps/defisaver-tokens/blob/
94
94
 
95
95
  • `Const` **MAXUINT**: *string*= '115792089237316195423570985008687907853269984665640564039457584007913129639935'
96
96
 
97
- Defined in: [index.ts:15](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/index.ts#L15)
97
+ Defined in: [index.ts:15](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/index.ts#L15)
98
98
 
99
99
  ___
100
100
 
@@ -102,7 +102,7 @@ ___
102
102
 
103
103
  • `Const` **aaveV2Markets**: AaveMarketData[]
104
104
 
105
- Defined in: [aaveV2Markets.ts:3](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/aaveV2Markets.ts#L3)
105
+ Defined in: [aaveV2Markets.ts:3](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/aaveV2Markets.ts#L3)
106
106
 
107
107
  ___
108
108
 
@@ -110,7 +110,7 @@ ___
110
110
 
111
111
  • `Const` **assets**: [*AssetData*](README.md#assetdata)[]
112
112
 
113
- Defined in: [assets.ts:375](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/assets.ts#L375)
113
+ Defined in: [assets.ts:377](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/assets.ts#L377)
114
114
 
115
115
  ___
116
116
 
@@ -118,7 +118,7 @@ ___
118
118
 
119
119
  • `Const` **ilks**: [*IlkData*](README.md#ilkdata)[]
120
120
 
121
- Defined in: [ilks.ts:5](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/ilks.ts#L5)
121
+ Defined in: [ilks.ts:5](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/ilks.ts#L5)
122
122
 
123
123
  ___
124
124
 
@@ -126,7 +126,7 @@ ___
126
126
 
127
127
  • `Const` **reflexerCollTypes**: [*IlkData*](README.md#ilkdata)[]
128
128
 
129
- Defined in: [reflexerCollTypes.ts:3](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/reflexerCollTypes.ts#L3)
129
+ Defined in: [reflexerCollTypes.ts:3](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/reflexerCollTypes.ts#L3)
130
130
 
131
131
  ___
132
132
 
@@ -136,13 +136,13 @@ ___
136
136
 
137
137
  #### Type declaration:
138
138
 
139
- Name | Type |
140
- ------ | ------ |
141
- `bytesToString` | (`hex`: *string*) => *string* |
142
- `compare` | (`a`: *string*, `b`: *string*) => *boolean* |
143
- `stringToBytes` | (`str`: *string*) => *string* |
139
+ Name | Type | Value |
140
+ ------ | ------ | ------ |
141
+ `bytesToString` | *function* | (`hex`: *string*) => *string* |
142
+ `compare` | *function* | (`a`: *string*, `b`: *string*) => *boolean* |
143
+ `stringToBytes` | *function* | (`str`: *string*) => *string* |
144
144
 
145
- Defined in: [index.ts:13](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/index.ts#L13)
145
+ Defined in: [index.ts:13](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/index.ts#L13)
146
146
 
147
147
  ## Functions
148
148
 
@@ -159,7 +159,7 @@ Name | Type | Default value | Description |
159
159
 
160
160
  **Returns:** *string*
161
161
 
162
- Defined in: [index.ts:122](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/index.ts#L122)
162
+ Defined in: [index.ts:124](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/index.ts#L124)
163
163
 
164
164
  ___
165
165
 
@@ -176,7 +176,7 @@ Name | Type | Description |
176
176
 
177
177
  **Returns:** *string*
178
178
 
179
- Defined in: [index.ts:143](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/index.ts#L143)
179
+ Defined in: [index.ts:145](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/index.ts#L145)
180
180
 
181
181
  ___
182
182
 
@@ -192,7 +192,7 @@ Name | Type | Default value |
192
192
 
193
193
  **Returns:** *void* \| AaveMarketData
194
194
 
195
- Defined in: [index.ts:115](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/index.ts#L115)
195
+ Defined in: [index.ts:117](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/index.ts#L117)
196
196
 
197
197
  ___
198
198
 
@@ -211,7 +211,7 @@ Name | Type | Default value |
211
211
 
212
212
  **Returns:** [*AssetData*](README.md#assetdata)
213
213
 
214
- Defined in: [index.ts:37](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/index.ts#L37)
214
+ Defined in: [index.ts:37](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/index.ts#L37)
215
215
 
216
216
  ___
217
217
 
@@ -227,7 +227,7 @@ Name | Type | Default value |
227
227
 
228
228
  **Returns:** [*AssetData*](README.md#assetdata)
229
229
 
230
- Defined in: [index.ts:67](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/index.ts#L67)
230
+ Defined in: [index.ts:67](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/index.ts#L67)
231
231
 
232
232
  ___
233
233
 
@@ -246,7 +246,7 @@ Name | Type | Default value | Description |
246
246
 
247
247
  **Returns:** [*ExtendedIlkData*](README.md#extendedilkdata)
248
248
 
249
- Defined in: [index.ts:46](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/index.ts#L46)
249
+ Defined in: [index.ts:46](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/index.ts#L46)
250
250
 
251
251
  ___
252
252
 
@@ -262,7 +262,7 @@ Name | Type | Default value |
262
262
 
263
263
  **Returns:** *string*
264
264
 
265
- Defined in: [index.ts:69](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/index.ts#L69)
265
+ Defined in: [index.ts:69](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/index.ts#L69)
266
266
 
267
267
  ___
268
268
 
@@ -281,7 +281,7 @@ Name | Type | Default value | Description |
281
281
 
282
282
  Token symbol
283
283
 
284
- Defined in: [index.ts:95](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/index.ts#L95)
284
+ Defined in: [index.ts:97](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/index.ts#L97)
285
285
 
286
286
  ___
287
287
 
@@ -299,7 +299,7 @@ Name | Type | Description |
299
299
 
300
300
  Token symbol
301
301
 
302
- Defined in: [index.ts:107](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/index.ts#L107)
302
+ Defined in: [index.ts:109](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/index.ts#L109)
303
303
 
304
304
  ___
305
305
 
@@ -317,4 +317,4 @@ Name | Type | Description |
317
317
 
318
318
  Token symbol
319
319
 
320
- Defined in: [index.ts:113](https://github.com/DecenterApps/defisaver-tokens/blob/485cb8c/src/index.ts#L113)
320
+ Defined in: [index.ts:115](https://github.com/DecenterApps/defisaver-tokens/blob/96f5547/src/index.ts#L115)
@@ -0,0 +1 @@
1
+ export default function EnsIcon(props: any): any;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { v4 as uuid } from 'uuid';
3
+ export default function EnsIcon(props) {
4
+ const id = `ens_icon_${uuid()}`;
5
+ const fill = `url(#${id})`;
6
+ return (React.createElement("svg", Object.assign({ width: "193", height: "193", viewBox: "0 0 193 193", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
7
+ React.createElement("circle", { cx: "96.5", cy: "96.5", r: "96.5", fill: fill }),
8
+ React.createElement("path", { d: "M69.3251 88.75C70.1251 90.46 72.1051 93.84 72.1051 93.84L94.9951 56L72.6551 71.6C71.3239 72.488 70.2318 73.6901 69.4751 75.1C68.4576 77.2271 67.917 79.5507 67.8911 81.9084C67.8652 84.2662 68.3546 86.6011 69.3251 88.75V88.75Z", fill: "white" }),
9
+ React.createElement("path", { d: "M60.2549 101.21C60.5072 104.83 61.5298 108.354 63.2545 111.546C64.9791 114.738 67.3658 117.525 70.2549 119.72L94.9649 136.95C94.9649 136.95 79.5049 114.67 66.4649 92.5001C65.1448 90.1578 64.2573 87.5969 63.8449 84.9401C63.6624 83.7369 63.6624 82.5132 63.8449 81.3101C63.5049 81.9401 62.8449 83.2301 62.8449 83.2301C61.5227 85.9267 60.6222 88.8102 60.1749 91.7801C59.9175 94.9194 59.9442 98.0756 60.2549 101.21V101.21Z", fill: "white" }),
10
+ React.createElement("path", { d: "M123.295 104.2C122.495 102.49 120.515 99.1101 120.515 99.1101L97.625 136.95L119.965 121.36C121.296 120.472 122.388 119.27 123.145 117.86C124.164 115.732 124.705 113.406 124.731 111.047C124.757 108.687 124.267 106.35 123.295 104.2V104.2Z", fill: "white" }),
11
+ React.createElement("path", { d: "M132.365 91.74C132.113 88.1204 131.09 84.5965 129.365 81.4042C127.641 78.212 125.254 75.425 122.365 73.23L97.6548 56C97.6548 56 113.105 78.28 126.155 100.45C127.471 102.793 128.356 105.354 128.765 108.01C128.947 109.213 128.947 110.437 128.765 111.64C129.105 111.01 129.765 109.72 129.765 109.72C131.087 107.023 131.987 104.14 132.435 101.17C132.696 98.031 132.672 94.8748 132.365 91.74Z", fill: "white" }),
12
+ React.createElement("path", { d: "M69.4749 75.1C70.2317 73.6901 71.3238 72.488 72.6549 71.6L94.9949 56L72.1049 93.85C72.1049 93.85 70.1049 90.47 69.3249 88.76C68.3529 86.6097 67.8627 84.273 67.8886 81.9134C67.9146 79.5538 68.456 77.2284 69.4749 75.1V75.1ZM60.2549 101.21C60.5072 104.83 61.5298 108.353 63.2545 111.546C64.9791 114.738 67.3658 117.525 70.2549 119.72L94.9649 136.95C94.9649 136.95 79.5049 114.67 66.4649 92.5C65.1448 90.1578 64.2573 87.5969 63.8449 84.94C63.6624 83.7369 63.6624 82.5131 63.8449 81.31C63.5049 81.94 62.8449 83.23 62.8449 83.23C61.5227 85.9266 60.6222 88.8102 60.1749 91.78C59.9175 94.9193 59.9442 98.0755 60.2549 101.21V101.21ZM123.255 104.21C122.455 102.5 120.475 99.12 120.475 99.12L97.6249 136.95L119.965 121.36C121.296 120.472 122.388 119.27 123.145 117.86C124.164 115.732 124.705 113.406 124.731 111.047C124.757 108.687 124.267 106.35 123.295 104.2L123.255 104.21ZM132.325 91.75C132.073 88.1304 131.05 84.6065 129.325 81.4142C127.601 78.222 125.214 75.435 122.325 73.24L97.6549 56C97.6549 56 113.105 78.28 126.155 100.45C127.472 102.793 128.356 105.354 128.765 108.01C128.947 109.213 128.947 110.437 128.765 111.64C129.105 111.01 129.765 109.72 129.765 109.72C131.087 107.023 131.988 104.14 132.435 101.17C132.696 98.031 132.672 94.8748 132.365 91.74L132.325 91.75Z", fill: "white" }),
13
+ React.createElement("defs", null,
14
+ React.createElement("linearGradient", { id: id, x1: "96.5", y1: "0", x2: "96.5", y2: "193", gradientUnits: "userSpaceOnUse" },
15
+ React.createElement("stop", { stopColor: "#7E9AF7" }),
16
+ React.createElement("stop", { offset: "1", stopColor: "#677CC2" })))));
17
+ }
package/esm/assets.js CHANGED
@@ -200,6 +200,7 @@ const OhmAddress = "0x383518188c0c6d7730d91b2c03a03c837814a899";
200
200
  const SohmAddress = "0x04f2694c8fcee23e8fd0dfea1d4f5bb8c352111f";
201
201
  const AlusdAddress = "0xbc6da0fe9ad5f3b0d58160288917aa56653660e9";
202
202
  const AlethAddress = "0x0100546f2cd4c9d97f798ffc9755e47865ff7ee6";
203
+ const EnsAddress = "0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72";
203
204
  import BlankIcon from './TokenIcons/BlankIcon.js';
204
205
  import ZrxIcon from './TokenIcons/ZrxIcon.js';
205
206
  import UsdcIcon from './TokenIcons/UsdcIcon.js';
@@ -353,6 +354,7 @@ import TracIcon from "./TokenIcons/TracIcon";
353
354
  import TrbIcon from "./TokenIcons/TrbIcon";
354
355
  import YamIcon from "./TokenIcons/YamIcon";
355
356
  import YfiiIcon from "./TokenIcons/YfiiIcon";
357
+ import EnsIcon from "./TokenIcons/EnsIcon";
356
358
  export const assetProto = {
357
359
  symbol: '?',
358
360
  name: 'Unknown',
@@ -571,4 +573,5 @@ export const assets = [
571
573
  Object.assign(Object.assign({}, assetProto), { symbol: 'SOHM', name: 'Staked Olympus', decimals: 9, address: SohmAddress, icon: OhmIcon }),
572
574
  Object.assign(Object.assign({}, assetProto), { symbol: 'ALUSD', name: 'Alchemix USD', decimals: 18, exchange: true, address: AlusdAddress, icon: AlusdIcon }),
573
575
  Object.assign(Object.assign({}, assetProto), { symbol: 'ALETH', name: 'Alchemix ETH', decimals: 18, address: AlethAddress, icon: AlethIcon }),
576
+ Object.assign(Object.assign({}, assetProto), { symbol: 'ENS', name: 'Ethereum Name Service', exchange: true, decimals: 18, address: EnsAddress, icon: EnsIcon }),
574
577
  ];
package/esm/ilks.js CHANGED
@@ -298,12 +298,30 @@ export const ilks = [
298
298
  "isLP": false
299
299
  },
300
300
  {
301
- "asset": "WSTETH",
301
+ "asset": "wstETH",
302
302
  "ilkLabel": "WSTETH-A",
303
303
  "ilkBytes": "0x5753544554482d41000000000000000000000000000000000000000000000000",
304
304
  "join": "0x10CD5fbe1b404B7E19Ef964B63939907bdaf42E2",
305
305
  "clip": "0x49A33A28C4C7D9576ab28898F4C9ac7e52EA457A",
306
306
  "pip": "0xFe7a2aC0B945f12089aEEB6eCebf4F384D9f043F",
307
307
  "isLP": false
308
+ },
309
+ {
310
+ "asset": "WBTC",
311
+ "ilkLabel": "WBTC-B",
312
+ "ilkBytes": "0x574254432d420000000000000000000000000000000000000000000000000000",
313
+ "join": "0xfA8c996e158B80D77FbD0082BB437556A65B96E0",
314
+ "clip": "0xe30663C6f83A06eDeE6273d72274AE24f1084a22",
315
+ "pip": "0xf185d0682d50819263941e5f4EacC763CC5C6C42",
316
+ "isLP": false
317
+ },
318
+ {
319
+ "asset": "WBTC",
320
+ "ilkLabel": "WBTC-C",
321
+ "ilkBytes": "0x574254432d430000000000000000000000000000000000000000000000000000",
322
+ "join": "0x7f62f9592b823331E012D3c5DdF2A7714CfB9de2",
323
+ "clip": "0x39F29773Dcb94A32529d0612C6706C49622161D1",
324
+ "pip": "0xf185d0682d50819263941e5f4EacC763CC5C6C42",
325
+ "isLP": false
308
326
  }
309
327
  ];
package/esm/index.js CHANGED
@@ -55,14 +55,18 @@ export const getIlkInfo = (ilk = '') => {
55
55
  };
56
56
  export const getAssetInfoByAddress = (address = '') => assets.find(t => t.address.toLowerCase() === address.toLowerCase()) || console.error(`Asset with addess "${address}" not found `) || Object.assign({}, assetProto);
57
57
  export const ilkToAsset = (ilk = '') => {
58
+ var _a;
58
59
  let ilkLabel = ilk.substr(0, 2) === '0x' ? bytesToString(ilk) : ilk;
59
- if (ilkLabel === 'KNC-A')
60
+ let asset = ilkLabel.replace(/-.*/, '');
61
+ if (ilkLabel.startsWith('PSM'))
62
+ asset = ((_a = ilkLabel.match(/^[A-Z]*-(.*)-[A-Z]*/)) === null || _a === void 0 ? void 0 : _a[1]) || asset;
63
+ if (asset === 'KNC')
60
64
  return 'KNCL';
61
- if (ilkLabel === 'PAXUSD-A')
65
+ if (asset === 'PAXUSD' || asset === 'PAX')
62
66
  return 'USDP';
63
- if (ilkLabel === 'WSTETH-A')
67
+ if (asset === 'WSTETH')
64
68
  return 'wstETH';
65
- return ilkLabel.replace(/-.*/, '');
69
+ return asset;
66
70
  };
67
71
  /** @private **/
68
72
  export const compoundCollateralAssets = assets.filter(t => t.compoundCollateral);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/tokens",
3
- "version": "1.3.63",
3
+ "version": "1.3.67",
4
4
  "description": "Centralized asset data & utility functions\n",
5
5
  "main": "umd/index.js",
6
6
  "module": "esm/index.js",
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { v4 as uuid } from 'uuid';
3
+
4
+ export default function EnsIcon(props) {
5
+ const id = `ens_icon_${uuid()}`;
6
+ const fill = `url(#${id})`;
7
+ return (
8
+ <svg width="193" height="193" viewBox="0 0 193 193" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
9
+ <circle cx="96.5" cy="96.5" r="96.5" fill={fill} />
10
+ <path d="M69.3251 88.75C70.1251 90.46 72.1051 93.84 72.1051 93.84L94.9951 56L72.6551 71.6C71.3239 72.488 70.2318 73.6901 69.4751 75.1C68.4576 77.2271 67.917 79.5507 67.8911 81.9084C67.8652 84.2662 68.3546 86.6011 69.3251 88.75V88.75Z" fill="white"/>
11
+ <path d="M60.2549 101.21C60.5072 104.83 61.5298 108.354 63.2545 111.546C64.9791 114.738 67.3658 117.525 70.2549 119.72L94.9649 136.95C94.9649 136.95 79.5049 114.67 66.4649 92.5001C65.1448 90.1578 64.2573 87.5969 63.8449 84.9401C63.6624 83.7369 63.6624 82.5132 63.8449 81.3101C63.5049 81.9401 62.8449 83.2301 62.8449 83.2301C61.5227 85.9267 60.6222 88.8102 60.1749 91.7801C59.9175 94.9194 59.9442 98.0756 60.2549 101.21V101.21Z" fill="white"/>
12
+ <path d="M123.295 104.2C122.495 102.49 120.515 99.1101 120.515 99.1101L97.625 136.95L119.965 121.36C121.296 120.472 122.388 119.27 123.145 117.86C124.164 115.732 124.705 113.406 124.731 111.047C124.757 108.687 124.267 106.35 123.295 104.2V104.2Z" fill="white"/>
13
+ <path d="M132.365 91.74C132.113 88.1204 131.09 84.5965 129.365 81.4042C127.641 78.212 125.254 75.425 122.365 73.23L97.6548 56C97.6548 56 113.105 78.28 126.155 100.45C127.471 102.793 128.356 105.354 128.765 108.01C128.947 109.213 128.947 110.437 128.765 111.64C129.105 111.01 129.765 109.72 129.765 109.72C131.087 107.023 131.987 104.14 132.435 101.17C132.696 98.031 132.672 94.8748 132.365 91.74Z" fill="white"/>
14
+ <path d="M69.4749 75.1C70.2317 73.6901 71.3238 72.488 72.6549 71.6L94.9949 56L72.1049 93.85C72.1049 93.85 70.1049 90.47 69.3249 88.76C68.3529 86.6097 67.8627 84.273 67.8886 81.9134C67.9146 79.5538 68.456 77.2284 69.4749 75.1V75.1ZM60.2549 101.21C60.5072 104.83 61.5298 108.353 63.2545 111.546C64.9791 114.738 67.3658 117.525 70.2549 119.72L94.9649 136.95C94.9649 136.95 79.5049 114.67 66.4649 92.5C65.1448 90.1578 64.2573 87.5969 63.8449 84.94C63.6624 83.7369 63.6624 82.5131 63.8449 81.31C63.5049 81.94 62.8449 83.23 62.8449 83.23C61.5227 85.9266 60.6222 88.8102 60.1749 91.78C59.9175 94.9193 59.9442 98.0755 60.2549 101.21V101.21ZM123.255 104.21C122.455 102.5 120.475 99.12 120.475 99.12L97.6249 136.95L119.965 121.36C121.296 120.472 122.388 119.27 123.145 117.86C124.164 115.732 124.705 113.406 124.731 111.047C124.757 108.687 124.267 106.35 123.295 104.2L123.255 104.21ZM132.325 91.75C132.073 88.1304 131.05 84.6065 129.325 81.4142C127.601 78.222 125.214 75.435 122.325 73.24L97.6549 56C97.6549 56 113.105 78.28 126.155 100.45C127.472 102.793 128.356 105.354 128.765 108.01C128.947 109.213 128.947 110.437 128.765 111.64C129.105 111.01 129.765 109.72 129.765 109.72C131.087 107.023 131.988 104.14 132.435 101.17C132.696 98.031 132.672 94.8748 132.365 91.74L132.325 91.75Z" fill="white"/>
15
+ <defs>
16
+ <linearGradient id={id} x1="96.5" y1="0" x2="96.5" y2="193" gradientUnits="userSpaceOnUse">
17
+ <stop stopColor="#7E9AF7"/>
18
+ <stop offset="1" stopColor="#677CC2"/>
19
+ </linearGradient>
20
+ </defs>
21
+ </svg>
22
+ );
23
+ }
package/src/assets.ts CHANGED
@@ -202,6 +202,7 @@ const OhmAddress = "0x383518188c0c6d7730d91b2c03a03c837814a899";
202
202
  const SohmAddress = "0x04f2694c8fcee23e8fd0dfea1d4f5bb8c352111f";
203
203
  const AlusdAddress = "0xbc6da0fe9ad5f3b0d58160288917aa56653660e9";
204
204
  const AlethAddress = "0x0100546f2cd4c9d97f798ffc9755e47865ff7ee6";
205
+ const EnsAddress = "0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72";
205
206
 
206
207
 
207
208
  import BlankIcon from './TokenIcons/BlankIcon.js';
@@ -357,6 +358,7 @@ import TracIcon from "./TokenIcons/TracIcon";
357
358
  import TrbIcon from "./TokenIcons/TrbIcon";
358
359
  import YamIcon from "./TokenIcons/YamIcon";
359
360
  import YfiiIcon from "./TokenIcons/YfiiIcon";
361
+ import EnsIcon from "./TokenIcons/EnsIcon";
360
362
 
361
363
  export const assetProto: AssetData = {
362
364
  symbol: '?',
@@ -2248,4 +2250,13 @@ export const assets: AssetData[] = [
2248
2250
  address: AlethAddress,
2249
2251
  icon: AlethIcon,
2250
2252
  },
2253
+ {
2254
+ ...assetProto,
2255
+ symbol: 'ENS',
2256
+ name: 'Ethereum Name Service',
2257
+ exchange: true,
2258
+ decimals: 18,
2259
+ address: EnsAddress,
2260
+ icon: EnsIcon,
2261
+ },
2251
2262
  ];
package/src/ilks.ts CHANGED
@@ -301,12 +301,30 @@ export const ilks:IlkData[] = [
301
301
  "isLP": false
302
302
  },
303
303
  {
304
- "asset": "WSTETH",
304
+ "asset": "wstETH",
305
305
  "ilkLabel": "WSTETH-A",
306
306
  "ilkBytes": "0x5753544554482d41000000000000000000000000000000000000000000000000",
307
307
  "join": "0x10CD5fbe1b404B7E19Ef964B63939907bdaf42E2",
308
308
  "clip": "0x49A33A28C4C7D9576ab28898F4C9ac7e52EA457A",
309
309
  "pip": "0xFe7a2aC0B945f12089aEEB6eCebf4F384D9f043F",
310
310
  "isLP": false
311
+ },
312
+ {
313
+ "asset": "WBTC",
314
+ "ilkLabel": "WBTC-B",
315
+ "ilkBytes": "0x574254432d420000000000000000000000000000000000000000000000000000",
316
+ "join": "0xfA8c996e158B80D77FbD0082BB437556A65B96E0",
317
+ "clip": "0xe30663C6f83A06eDeE6273d72274AE24f1084a22",
318
+ "pip": "0xf185d0682d50819263941e5f4EacC763CC5C6C42",
319
+ "isLP": false
320
+ },
321
+ {
322
+ "asset": "WBTC",
323
+ "ilkLabel": "WBTC-C",
324
+ "ilkBytes": "0x574254432d430000000000000000000000000000000000000000000000000000",
325
+ "join": "0x7f62f9592b823331E012D3c5DdF2A7714CfB9de2",
326
+ "clip": "0x39F29773Dcb94A32529d0612C6706C49622161D1",
327
+ "pip": "0xf185d0682d50819263941e5f4EacC763CC5C6C42",
328
+ "isLP": false
311
329
  }
312
330
  ];
package/src/index.ts CHANGED
@@ -68,10 +68,12 @@ export const getAssetInfoByAddress = (address: string = ''):AssetData => assets.
68
68
 
69
69
  export const ilkToAsset = (ilk: string = ''):string => {
70
70
  let ilkLabel = ilk.substr(0, 2) === '0x' ? bytesToString(ilk) : ilk;
71
- if (ilkLabel === 'KNC-A') return 'KNCL';
72
- if (ilkLabel === 'PAXUSD-A') return 'USDP';
73
- if (ilkLabel === 'WSTETH-A') return 'wstETH';
74
- return ilkLabel.replace(/-.*/, '');
71
+ let asset = ilkLabel.replace(/-.*/, '');
72
+ if (ilkLabel.startsWith('PSM')) asset = ilkLabel.match(/^[A-Z]*-(.*)-[A-Z]*/)?.[1] || asset;
73
+ if (asset === 'KNC') return 'KNCL';
74
+ if (asset === 'PAXUSD' || asset === 'PAX') return 'USDP';
75
+ if (asset === 'WSTETH') return 'wstETH';
76
+ return asset;
75
77
  }
76
78
 
77
79
  /** @private **/