@defisaver/tokens 1.5.51 → 1.5.52-dev-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.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 +1127 -1123
- 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 +3153 -3140
- 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 +54 -41
- package/webpack.umd.js +43 -43
- package/.env +0 -4
- package/yarn-error.log +0 -5325
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) => {
|
|
@@ -490,6 +490,7 @@ var SKYAddress = "0x56072C95FAA701256059aa122697B133aDEd9279";
|
|
|
490
490
|
var sUSDSAddress = "0xa3931d71877C0E7a3148CB7Eb4463524FEc27fbD";
|
|
491
491
|
var rswETHAddress = "0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0";
|
|
492
492
|
var wsuperOETHbAddress = "0x7FcD174E80f264448ebeE8c88a7C4476AAF58Ea6";
|
|
493
|
+
var boldAddress = "0x6edb0caf06e8b1e5415ded4afecd5d61d84a9c92";
|
|
493
494
|
var assetProto = {
|
|
494
495
|
symbol: '?',
|
|
495
496
|
feedAvailability: {},
|
|
@@ -3022,6 +3023,17 @@ var assets = [_objectSpread(_objectSpread({}, assetProto), {}, {
|
|
|
3022
3023
|
addresses: {
|
|
3023
3024
|
8453: wsuperOETHbAddress
|
|
3024
3025
|
}
|
|
3026
|
+
}), _objectSpread(_objectSpread({}, assetProto), {}, {
|
|
3027
|
+
symbol: 'BOLD',
|
|
3028
|
+
name: "BOLD",
|
|
3029
|
+
decimals: 18,
|
|
3030
|
+
feedAvailability: {
|
|
3031
|
+
1: true
|
|
3032
|
+
},
|
|
3033
|
+
addresses: {
|
|
3034
|
+
1: boldAddress
|
|
3035
|
+
},
|
|
3036
|
+
isStable: true
|
|
3025
3037
|
}), _objectSpread(_objectSpread({}, assetProto), {}, {
|
|
3026
3038
|
symbol: 'wM',
|
|
3027
3039
|
name: "WrappedM by M^0",
|
|
@@ -3085,6 +3097,7 @@ var assets = [_objectSpread(_objectSpread({}, assetProto), {}, {
|
|
|
3085
3097
|
name: 'Euro Coin',
|
|
3086
3098
|
decimals: 6,
|
|
3087
3099
|
nativeChainId: 1,
|
|
3100
|
+
isStable: true,
|
|
3088
3101
|
addresses: {
|
|
3089
3102
|
1: '0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c',
|
|
3090
3103
|
8453: '0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42'
|
|
@@ -3565,16 +3578,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3565
3578
|
/* harmony export */ "stringToBytes": () => /* binding */ stringToBytes,
|
|
3566
3579
|
/* harmony export */ "compare": () => /* binding */ compare
|
|
3567
3580
|
/* harmony export */ });
|
|
3568
|
-
/**
|
|
3569
|
-
* @param hex {string}
|
|
3570
|
-
* @returns {string}
|
|
3581
|
+
/**
|
|
3582
|
+
* @param hex {string}
|
|
3583
|
+
* @returns {string}
|
|
3571
3584
|
*/
|
|
3572
3585
|
function bytesToString(hex) {
|
|
3573
3586
|
return Buffer.from(hex.replace(/^0x/, ''), 'hex').toString().replace(/\x00/g, '');
|
|
3574
3587
|
}
|
|
3575
|
-
/**
|
|
3576
|
-
* @param str {string}
|
|
3577
|
-
* @return {string} input encoded to hex, padded to 32 bytes
|
|
3588
|
+
/**
|
|
3589
|
+
* @param str {string}
|
|
3590
|
+
* @return {string} input encoded to hex, padded to 32 bytes
|
|
3578
3591
|
*/
|
|
3579
3592
|
|
|
3580
3593
|
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,4 +0,0 @@
|
|
|
1
|
-
RPC=https://eth-mainnet.alchemyapi.io/v2/Pwh-hdbsP7Bf0CP_UMw4_Pw-NfHhSpIA
|
|
2
|
-
MAINNET_RPC=https://eth-mainnet.alchemyapi.io/v2/Pwh-hdbsP7Bf0CP_UMw4_Pw-NfHhSpIA
|
|
3
|
-
OPTIMISM_RPC=https://opt-mainnet.g.alchemy.com/v2/Pwh-hdbsP7Bf0CP_UMw4_Pw-NfHhSpIA
|
|
4
|
-
ARBITRUM_RPC=https://arb-mainnet.g.alchemy.com/v2/Pwh-hdbsP7Bf0CP_UMw4_Pw-NfHhSpIA
|