@defisaver/tokens 1.5.45 → 1.5.46-dev-morpho
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/.editorconfig +9 -9
- package/.env.example +4 -4
- package/README.md +23 -23
- package/esm/aaveV2Markets.d.ts +2 -2
- package/esm/aaveV2Markets.js +8 -8
- package/esm/assets.d.ts +3 -3
- package/esm/assets.js +1104 -1091
- package/esm/ilks.d.ts +3 -3
- package/esm/ilks.js +465 -465
- package/esm/index.d.ts +70 -70
- package/esm/index.js +157 -157
- package/esm/reflexerCollTypes.d.ts +2 -2
- package/esm/reflexerCollTypes.js +11 -11
- package/esm/types.d.ts +73 -73
- package/esm/types.js +1 -1
- package/esm/utils.d.ts +11 -11
- package/esm/utils.js +22 -22
- package/package.json +47 -47
- package/src/TokenIcons/GuniDaiUsdc1Icon.js +66 -66
- package/src/TokenIcons/GuniDaiUsdc2Icon.js +69 -69
- package/src/aaveV2Markets.ts +10 -10
- package/src/assets.ts +3091 -3050
- package/src/ilks.ts +468 -468
- package/src/index.ts +176 -176
- package/src/reflexerCollTypes.ts +13 -13
- package/src/types.ts +87 -87
- package/src/utils.ts +22 -22
- package/tsconfig.json +74 -74
- package/umd/index.js +76 -43
- package/webpack.umd.js +43 -43
- package/.env +0 -8
package/tsconfig.json
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
|
4
|
-
|
|
5
|
-
/* Basic Options */
|
|
6
|
-
// "incremental": true, /* Enable incremental compilation */
|
|
7
|
-
"target": "ES2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
|
|
8
|
-
"module": "ES2020", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
|
9
|
-
// "lib": [], /* Specify library files to be included in the compilation. */
|
|
10
|
-
"allowJs": true, /* Allow javascript files to be compiled. */
|
|
11
|
-
// "checkJs": true, /* Report errors in .js files. */
|
|
12
|
-
"jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
|
13
|
-
"declaration": true, /* Generates corresponding '.d.ts' file. */
|
|
14
|
-
// "emitDeclarationOnly": false,
|
|
15
|
-
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
|
16
|
-
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
|
17
|
-
// "outFile": "./", /* Concatenate and emit output to single file. */
|
|
18
|
-
"outDir": "./esm/", /* Redirect output structure to the directory. */
|
|
19
|
-
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
|
20
|
-
// "composite": true, /* Enable project compilation */
|
|
21
|
-
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
|
22
|
-
// "removeComments": true, /* Do not emit comments to output. */
|
|
23
|
-
// "noEmit": true, /* Do not emit outputs. */
|
|
24
|
-
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
|
25
|
-
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
|
26
|
-
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
|
27
|
-
|
|
28
|
-
/* Strict Type-Checking Options */
|
|
29
|
-
"strict": true, /* Enable all strict type-checking options. */
|
|
30
|
-
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
|
31
|
-
// "strictNullChecks": true, /* Enable strict null checks. */
|
|
32
|
-
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
|
33
|
-
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
|
34
|
-
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
|
35
|
-
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
|
36
|
-
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
|
37
|
-
|
|
38
|
-
/* Additional Checks */
|
|
39
|
-
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
|
40
|
-
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
41
|
-
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
42
|
-
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
43
|
-
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
|
44
|
-
|
|
45
|
-
/* Module Resolution Options */
|
|
46
|
-
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
|
47
|
-
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
|
48
|
-
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
49
|
-
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
50
|
-
// "typeRoots": [], /* List of folders to include type definitions from. */
|
|
51
|
-
// "types": [], /* Type declaration files to be included in compilation. */
|
|
52
|
-
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
|
53
|
-
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
54
|
-
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
55
|
-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
56
|
-
|
|
57
|
-
/* Source Map Options */
|
|
58
|
-
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
59
|
-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
60
|
-
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
61
|
-
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
62
|
-
|
|
63
|
-
/* Experimental Options */
|
|
64
|
-
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
65
|
-
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
66
|
-
|
|
67
|
-
/* Advanced Options */
|
|
68
|
-
"skipLibCheck": true, /* Skip type checking of declaration files. */
|
|
69
|
-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
|
|
70
|
-
},
|
|
71
|
-
"include": [
|
|
72
|
-
"./src/*.ts"
|
|
73
|
-
]
|
|
74
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
|
4
|
+
|
|
5
|
+
/* Basic Options */
|
|
6
|
+
// "incremental": true, /* Enable incremental compilation */
|
|
7
|
+
"target": "ES2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
|
|
8
|
+
"module": "ES2020", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
|
9
|
+
// "lib": [], /* Specify library files to be included in the compilation. */
|
|
10
|
+
"allowJs": true, /* Allow javascript files to be compiled. */
|
|
11
|
+
// "checkJs": true, /* Report errors in .js files. */
|
|
12
|
+
"jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
|
13
|
+
"declaration": true, /* Generates corresponding '.d.ts' file. */
|
|
14
|
+
// "emitDeclarationOnly": false,
|
|
15
|
+
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
|
16
|
+
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
|
17
|
+
// "outFile": "./", /* Concatenate and emit output to single file. */
|
|
18
|
+
"outDir": "./esm/", /* Redirect output structure to the directory. */
|
|
19
|
+
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
|
20
|
+
// "composite": true, /* Enable project compilation */
|
|
21
|
+
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
|
22
|
+
// "removeComments": true, /* Do not emit comments to output. */
|
|
23
|
+
// "noEmit": true, /* Do not emit outputs. */
|
|
24
|
+
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
|
25
|
+
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
|
26
|
+
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
|
27
|
+
|
|
28
|
+
/* Strict Type-Checking Options */
|
|
29
|
+
"strict": true, /* Enable all strict type-checking options. */
|
|
30
|
+
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
|
31
|
+
// "strictNullChecks": true, /* Enable strict null checks. */
|
|
32
|
+
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
|
33
|
+
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
|
34
|
+
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
|
35
|
+
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
|
36
|
+
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
|
37
|
+
|
|
38
|
+
/* Additional Checks */
|
|
39
|
+
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
|
40
|
+
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
41
|
+
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
42
|
+
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
43
|
+
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
|
44
|
+
|
|
45
|
+
/* Module Resolution Options */
|
|
46
|
+
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
|
47
|
+
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
|
48
|
+
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
49
|
+
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
50
|
+
// "typeRoots": [], /* List of folders to include type definitions from. */
|
|
51
|
+
// "types": [], /* Type declaration files to be included in compilation. */
|
|
52
|
+
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
|
53
|
+
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
54
|
+
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
55
|
+
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
56
|
+
|
|
57
|
+
/* Source Map Options */
|
|
58
|
+
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
59
|
+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
60
|
+
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
61
|
+
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
62
|
+
|
|
63
|
+
/* Experimental Options */
|
|
64
|
+
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
65
|
+
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
66
|
+
|
|
67
|
+
/* Advanced Options */
|
|
68
|
+
"skipLibCheck": true, /* Skip type checking of declaration files. */
|
|
69
|
+
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
|
|
70
|
+
},
|
|
71
|
+
"include": [
|
|
72
|
+
"./src/*.ts"
|
|
73
|
+
]
|
|
74
|
+
}
|
package/umd/index.js
CHANGED
|
@@ -78,10 +78,10 @@ decimal_js__WEBPACK_IMPORTED_MODULE_0___default().set({
|
|
|
78
78
|
toExpNeg: -9e15,
|
|
79
79
|
precision: 50
|
|
80
80
|
});
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
* @param symbol {string}
|
|
84
|
-
* @return symbol {string}
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @param symbol {string}
|
|
84
|
+
* @return symbol {string}
|
|
85
85
|
*/
|
|
86
86
|
|
|
87
87
|
var handleWBTCLegacy = function handleWBTCLegacy() {
|
|
@@ -97,13 +97,13 @@ var _addChainSpecificData = (assetDataBase, chainId) => {
|
|
|
97
97
|
if (config.iconFunc) assetData.icon = config.iconFunc(_objectSpread({}, assetData));
|
|
98
98
|
return assetData;
|
|
99
99
|
};
|
|
100
|
-
/**
|
|
101
|
-
* Returns asset info.
|
|
102
|
-
* Warning: will not throw if asset not found. Instead, will return a placeholder object.
|
|
103
|
-
*
|
|
104
|
-
* @param symbol {string}
|
|
105
|
-
* @param chainId {number}
|
|
106
|
-
* @return {AssetData}
|
|
100
|
+
/**
|
|
101
|
+
* Returns asset info.
|
|
102
|
+
* Warning: will not throw if asset not found. Instead, will return a placeholder object.
|
|
103
|
+
*
|
|
104
|
+
* @param symbol {string}
|
|
105
|
+
* @param chainId {number}
|
|
106
|
+
* @return {AssetData}
|
|
107
107
|
*/
|
|
108
108
|
|
|
109
109
|
|
|
@@ -114,12 +114,12 @@ var getAssetInfo = function getAssetInfo() {
|
|
|
114
114
|
if (!assetData) assetData = _objectSpread({}, _assets__WEBPACK_IMPORTED_MODULE_1__.assetProto);
|
|
115
115
|
return _addChainSpecificData(assetData, chainId);
|
|
116
116
|
};
|
|
117
|
-
/**
|
|
118
|
-
* Returns Maker or Reflexer ilk info, and asset info as `assetData` attribute.
|
|
119
|
-
* Warning: will not throw if ilk not found. Instead, will return a placeholder object.
|
|
120
|
-
*
|
|
121
|
-
* @param ilk {string} Ilk encoded as string or as hex
|
|
122
|
-
* @returns {ExtendedIlkData}
|
|
117
|
+
/**
|
|
118
|
+
* Returns Maker or Reflexer ilk info, and asset info as `assetData` attribute.
|
|
119
|
+
* Warning: will not throw if ilk not found. Instead, will return a placeholder object.
|
|
120
|
+
*
|
|
121
|
+
* @param ilk {string} Ilk encoded as string or as hex
|
|
122
|
+
* @returns {ExtendedIlkData}
|
|
123
123
|
*/
|
|
124
124
|
|
|
125
125
|
var getIlkInfo = function getIlkInfo() {
|
|
@@ -177,10 +177,10 @@ var compoundAsset = underlyingAsset => "c".concat(underlyingAsset.toUpperCase())
|
|
|
177
177
|
/** @private **/
|
|
178
178
|
|
|
179
179
|
var aaveAsset = underlyingAsset => "a".concat(underlyingAsset.toUpperCase());
|
|
180
|
-
/**
|
|
181
|
-
* @param join {string} Maker or Reflexer ilk join
|
|
182
|
-
* @param fromIlks {IlkData[]}
|
|
183
|
-
* @returns {string} Token symbol
|
|
180
|
+
/**
|
|
181
|
+
* @param join {string} Maker or Reflexer ilk join
|
|
182
|
+
* @param fromIlks {IlkData[]}
|
|
183
|
+
* @returns {string} Token symbol
|
|
184
184
|
*/
|
|
185
185
|
|
|
186
186
|
var tokenFromJoin = function tokenFromJoin(join) {
|
|
@@ -194,15 +194,15 @@ var tokenFromJoin = function tokenFromJoin(join) {
|
|
|
194
194
|
|
|
195
195
|
return '';
|
|
196
196
|
};
|
|
197
|
-
/**
|
|
198
|
-
* @param join {string} Maker ilk join
|
|
199
|
-
* @returns {string} Token symbol
|
|
197
|
+
/**
|
|
198
|
+
* @param join {string} Maker ilk join
|
|
199
|
+
* @returns {string} Token symbol
|
|
200
200
|
*/
|
|
201
201
|
|
|
202
202
|
var tokenFromMakerJoin = join => tokenFromJoin(join, _ilks__WEBPACK_IMPORTED_MODULE_2__.ilks);
|
|
203
|
-
/**
|
|
204
|
-
* @param join {string} Reflexer ilk join
|
|
205
|
-
* @returns {string} Token symbol
|
|
203
|
+
/**
|
|
204
|
+
* @param join {string} Reflexer ilk join
|
|
205
|
+
* @returns {string} Token symbol
|
|
206
206
|
*/
|
|
207
207
|
|
|
208
208
|
var tokenFromReflexerJoin = join => tokenFromJoin(join, _reflexerCollTypes__WEBPACK_IMPORTED_MODULE_3__.reflexerCollTypes);
|
|
@@ -210,10 +210,10 @@ var getAaveV2MarketInfo = function getAaveV2MarketInfo() {
|
|
|
210
210
|
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
211
211
|
return _aaveV2Markets__WEBPACK_IMPORTED_MODULE_4__.aaveV2Markets.find(i => i.name === name);
|
|
212
212
|
};
|
|
213
|
-
/**
|
|
214
|
-
* @param amount {Number|String|Object} Amount in wei
|
|
215
|
-
* @param asset {String} Asset symbol (or `MCD-${symbol}` for maker asset - always 18dec)
|
|
216
|
-
* @return {String}
|
|
213
|
+
/**
|
|
214
|
+
* @param amount {Number|String|Object} Amount in wei
|
|
215
|
+
* @param asset {String} Asset symbol (or `MCD-${symbol}` for maker asset - always 18dec)
|
|
216
|
+
* @return {String}
|
|
217
217
|
*/
|
|
218
218
|
|
|
219
219
|
var assetAmountInEth = function assetAmountInEth(amount) {
|
|
@@ -225,10 +225,10 @@ var assetAmountInEth = function assetAmountInEth(amount) {
|
|
|
225
225
|
else if (asset === 'USD') decimals = 18;else decimals = getAssetInfo(asset).decimals;
|
|
226
226
|
return new (decimal_js__WEBPACK_IMPORTED_MODULE_0___default())(amount && amount.toString() || 0).div(10 ** decimals).toDP(decimals).toString();
|
|
227
227
|
};
|
|
228
|
-
/**
|
|
229
|
-
* @param amount {Number|String|Object} Amount in eth
|
|
230
|
-
* @param asset {String} Asset symbol
|
|
231
|
-
* @return {String}
|
|
228
|
+
/**
|
|
229
|
+
* @param amount {Number|String|Object} Amount in eth
|
|
230
|
+
* @param asset {String} Asset symbol
|
|
231
|
+
* @return {String}
|
|
232
232
|
*/
|
|
233
233
|
|
|
234
234
|
var assetAmountInWei = (amount, asset) => {
|
|
@@ -474,7 +474,7 @@ var USTAddress = "0xa693B19d2931d498c5B318dF961919BB4aee87a5";
|
|
|
474
474
|
var cFeiAddress = "0x7713DD9Ca933848F6819F38B8352D9A15EA73F67";
|
|
475
475
|
var bLUSDAddress = "0xB9D7DdDca9a4AC480991865EfEf82E01273F79C3";
|
|
476
476
|
var cbETHAddress = "0xBe9895146f7AF43049ca1c1AE358B0541Ea49704";
|
|
477
|
-
var
|
|
477
|
+
var MORPHOLegacyAddress = "0x9994e35db50125e0df82e4c2dde62496ce330999";
|
|
478
478
|
var rETHCrvAddress = "0x6c38ce8984a890f5e46e6df6117c26b3f1ecfc9c";
|
|
479
479
|
var cbETHCrvAddress = "0x5b6c539b224014a09b3388e51caaa8e354c959c8";
|
|
480
480
|
var sfrxETH = "0xac3E018457B222d93114458476f3E3416Abbe38F";
|
|
@@ -2616,11 +2616,20 @@ var assets = [_objectSpread(_objectSpread({}, assetProto), {}, {
|
|
|
2616
2616
|
},
|
|
2617
2617
|
exchange: true,
|
|
2618
2618
|
decimals: 18
|
|
2619
|
+
}), _objectSpread(_objectSpread({}, assetProto), {}, {
|
|
2620
|
+
symbol: 'MORPHO Legacy',
|
|
2621
|
+
name: 'Morpho Lebacy Token',
|
|
2622
|
+
addresses: {
|
|
2623
|
+
1: MORPHOLegacyAddress
|
|
2624
|
+
},
|
|
2625
|
+
exchange: false,
|
|
2626
|
+
decimals: 18
|
|
2619
2627
|
}), _objectSpread(_objectSpread({}, assetProto), {}, {
|
|
2620
2628
|
symbol: 'MORPHO',
|
|
2621
2629
|
name: 'Morpho Token',
|
|
2622
2630
|
addresses: {
|
|
2623
|
-
1:
|
|
2631
|
+
1: '0x58D97B57BB95320F9a05dC918Aef65434969c2B2',
|
|
2632
|
+
8453: '0xBAa5CC21fd487B8Fcc2F632f3F4E8D37262a0842'
|
|
2624
2633
|
},
|
|
2625
2634
|
exchange: false,
|
|
2626
2635
|
decimals: 18
|
|
@@ -3036,6 +3045,30 @@ var assets = [_objectSpread(_objectSpread({}, assetProto), {}, {
|
|
|
3036
3045
|
addresses: {
|
|
3037
3046
|
8453: wsuperOETHbAddress
|
|
3038
3047
|
}
|
|
3048
|
+
}), _objectSpread(_objectSpread({}, assetProto), {}, {
|
|
3049
|
+
symbol: 'wM',
|
|
3050
|
+
name: "WrappedM by M^0",
|
|
3051
|
+
decimals: 6,
|
|
3052
|
+
nativeChainId: 1,
|
|
3053
|
+
addresses: {
|
|
3054
|
+
1: '0x437cc33344a0B27A429f795ff6B469C72698B291'
|
|
3055
|
+
}
|
|
3056
|
+
}), _objectSpread(_objectSpread({}, assetProto), {}, {
|
|
3057
|
+
symbol: 'mTBILL',
|
|
3058
|
+
name: "Midas US Treasury Bill Token",
|
|
3059
|
+
decimals: 18,
|
|
3060
|
+
nativeChainId: 1,
|
|
3061
|
+
addresses: {
|
|
3062
|
+
1: '0xDD629E5241CbC5919847783e6C96B2De4754e438'
|
|
3063
|
+
}
|
|
3064
|
+
}), _objectSpread(_objectSpread({}, assetProto), {}, {
|
|
3065
|
+
symbol: 'LBTC',
|
|
3066
|
+
name: "Lombard Staked Bitcoin",
|
|
3067
|
+
decimals: 8,
|
|
3068
|
+
nativeChainId: 1,
|
|
3069
|
+
addresses: {
|
|
3070
|
+
1: '0x8236a87084f8B84306f72007F36F2618A5634494'
|
|
3071
|
+
}
|
|
3039
3072
|
})];
|
|
3040
3073
|
|
|
3041
3074
|
/***/ }),
|
|
@@ -3512,16 +3545,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3512
3545
|
/* harmony export */ "stringToBytes": () => /* binding */ stringToBytes,
|
|
3513
3546
|
/* harmony export */ "compare": () => /* binding */ compare
|
|
3514
3547
|
/* harmony export */ });
|
|
3515
|
-
/**
|
|
3516
|
-
* @param hex {string}
|
|
3517
|
-
* @returns {string}
|
|
3548
|
+
/**
|
|
3549
|
+
* @param hex {string}
|
|
3550
|
+
* @returns {string}
|
|
3518
3551
|
*/
|
|
3519
3552
|
function bytesToString(hex) {
|
|
3520
3553
|
return Buffer.from(hex.replace(/^0x/, ''), 'hex').toString().replace(/\x00/g, '');
|
|
3521
3554
|
}
|
|
3522
|
-
/**
|
|
3523
|
-
* @param str {string}
|
|
3524
|
-
* @return {string} input encoded to hex, padded to 32 bytes
|
|
3555
|
+
/**
|
|
3556
|
+
* @param str {string}
|
|
3557
|
+
* @return {string} input encoded to hex, padded to 32 bytes
|
|
3525
3558
|
*/
|
|
3526
3559
|
|
|
3527
3560
|
function stringToBytes(str) {
|
package/webpack.umd.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
mode: "none",
|
|
5
|
-
entry: './src/index.ts',
|
|
6
|
-
target: 'node',
|
|
7
|
-
output: {
|
|
8
|
-
library: 'defisaver-tokens',
|
|
9
|
-
libraryTarget: 'umd',
|
|
10
|
-
path: path.resolve(__dirname, 'umd'),
|
|
11
|
-
filename: 'index.js',
|
|
12
|
-
globalObject: 'this',
|
|
13
|
-
hashFunction: "sha256"
|
|
14
|
-
},
|
|
15
|
-
module: {
|
|
16
|
-
rules: [
|
|
17
|
-
{
|
|
18
|
-
test: /\.[tj]s$/,
|
|
19
|
-
exclude: /node_modules/,
|
|
20
|
-
use: {
|
|
21
|
-
loader: "babel-loader",
|
|
22
|
-
options: {
|
|
23
|
-
presets: [
|
|
24
|
-
'@babel/preset-typescript',
|
|
25
|
-
[
|
|
26
|
-
"@babel/preset-env",
|
|
27
|
-
{
|
|
28
|
-
"targets": {
|
|
29
|
-
"esmodules": true
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
]
|
|
38
|
-
},
|
|
39
|
-
externals: ["decimal.js"],
|
|
40
|
-
resolve: {
|
|
41
|
-
extensions: ['.ts', '.js'],
|
|
42
|
-
},
|
|
43
|
-
};
|
|
1
|
+
const path = require('path');
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
mode: "none",
|
|
5
|
+
entry: './src/index.ts',
|
|
6
|
+
target: 'node',
|
|
7
|
+
output: {
|
|
8
|
+
library: 'defisaver-tokens',
|
|
9
|
+
libraryTarget: 'umd',
|
|
10
|
+
path: path.resolve(__dirname, 'umd'),
|
|
11
|
+
filename: 'index.js',
|
|
12
|
+
globalObject: 'this',
|
|
13
|
+
hashFunction: "sha256"
|
|
14
|
+
},
|
|
15
|
+
module: {
|
|
16
|
+
rules: [
|
|
17
|
+
{
|
|
18
|
+
test: /\.[tj]s$/,
|
|
19
|
+
exclude: /node_modules/,
|
|
20
|
+
use: {
|
|
21
|
+
loader: "babel-loader",
|
|
22
|
+
options: {
|
|
23
|
+
presets: [
|
|
24
|
+
'@babel/preset-typescript',
|
|
25
|
+
[
|
|
26
|
+
"@babel/preset-env",
|
|
27
|
+
{
|
|
28
|
+
"targets": {
|
|
29
|
+
"esmodules": true
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
externals: ["decimal.js"],
|
|
40
|
+
resolve: {
|
|
41
|
+
extensions: ['.ts', '.js'],
|
|
42
|
+
},
|
|
43
|
+
};
|
package/.env
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
RPCOPT=https://opt-mainnet.g.alchemy.com/v2/_6MdFJ165rvBQTFUV3UcnlzikkK9O5cz
|
|
2
|
-
RPCARB=https://arb-mainnet.g.alchemy.com/v2/_6MdFJ165rvBQTFUV3UcnlzikkK9O5cz
|
|
3
|
-
RPCBASE=https://base-mainnet.g.alchemy.com/v2/TERsAaPNcA7sgCVHHAMBvd95UtT4wCEf
|
|
4
|
-
|
|
5
|
-
RPC=https://eth-mainnet.alchemyapi.io/v2/_6MdFJ165rvBQTFUV3UcnlzikkK9O5cz
|
|
6
|
-
MAINNET_RPC=https://eth-mainnet.alchemyapi.io/v2/_6MdFJ165rvBQTFUV3UcnlzikkK9O5cz
|
|
7
|
-
OPTIMISM_RPC=https://opt-mainnet.g.alchemy.com/v2/_6MdFJ165rvBQTFUV3UcnlzikkK9O5cz
|
|
8
|
-
ARBITRUM_RPC=https://arb-mainnet.g.alchemy.com/v2/_6MdFJ165rvBQTFUV3UcnlzikkK9O5cz
|