@defisaver/automation-sdk 3.0.7 → 3.0.8-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/.babelrc +3 -3
- package/.editorconfig +9 -9
- package/.env.dev +4 -4
- package/.eslintignore +6 -6
- package/.eslintrc.js +41 -41
- package/.tests.sh +2 -2
- package/README.md +41 -41
- package/esm/abis/Erc20.json +223 -223
- package/esm/abis/SubStorage.json +17 -17
- package/esm/abis/UniMulticall.json +14 -14
- package/esm/abis/index.d.ts +9 -9
- package/esm/abis/index.js +30 -30
- package/esm/abis/legacy_AaveV2Subscriptions.json +8 -8
- package/esm/abis/legacy_AuthCheck.json +8 -8
- package/esm/abis/legacy_CompoundV2Subscriptions.json +9 -9
- package/esm/abis/legacy_MakerSubscriptions.json +9 -9
- package/esm/automation/private/Automation.d.ts +12 -12
- package/esm/automation/private/Automation.js +42 -42
- package/esm/automation/private/LegacyAutomation.d.ts +25 -25
- package/esm/automation/private/LegacyAutomation.js +118 -118
- package/esm/automation/private/LegacyProtocol.d.ts +22 -22
- package/esm/automation/private/LegacyProtocol.js +41 -41
- package/esm/automation/private/LegacyProtocol.test.d.ts +1 -1
- package/esm/automation/private/LegacyProtocol.test.js +25 -25
- package/esm/automation/private/Protocol.d.ts +22 -22
- package/esm/automation/private/Protocol.js +41 -41
- package/esm/automation/private/Protocol.test.d.ts +1 -1
- package/esm/automation/private/Protocol.test.js +25 -25
- package/esm/automation/private/StrategiesAutomation.d.ts +33 -33
- package/esm/automation/private/StrategiesAutomation.js +181 -181
- package/esm/automation/private/StrategiesAutomation.test.d.ts +1 -1
- package/esm/automation/private/StrategiesAutomation.test.js +671 -671
- package/esm/automation/public/ArbitrumStrategies.d.ts +5 -5
- package/esm/automation/public/ArbitrumStrategies.js +13 -13
- package/esm/automation/public/EthereumStrategies.d.ts +5 -5
- package/esm/automation/public/EthereumStrategies.js +13 -13
- package/esm/automation/public/OptimismStrategies.d.ts +5 -5
- package/esm/automation/public/OptimismStrategies.js +13 -13
- package/esm/automation/public/legacy/LegacyAaveAutomation.d.ts +6 -6
- package/esm/automation/public/legacy/LegacyAaveAutomation.js +20 -20
- package/esm/automation/public/legacy/LegacyCompoundAutomation.d.ts +6 -6
- package/esm/automation/public/legacy/LegacyCompoundAutomation.js +20 -20
- package/esm/automation/public/legacy/LegacyMakerAutomation.d.ts +6 -6
- package/esm/automation/public/legacy/LegacyMakerAutomation.js +20 -20
- package/esm/configuration.d.ts +1 -1
- package/esm/configuration.js +12 -12
- package/esm/constants/index.d.ts +24 -45
- package/esm/constants/index.js +426 -395
- package/esm/index.d.ts +22 -22
- package/esm/index.js +63 -63
- package/esm/services/contractService.d.ts +12 -12
- package/esm/services/contractService.js +54 -54
- package/esm/services/ethereumService.d.ts +7 -7
- package/esm/services/ethereumService.js +49 -49
- package/esm/services/ethereumService.test.d.ts +1 -1
- package/esm/services/ethereumService.test.js +242 -242
- package/esm/services/strategiesService.d.ts +2 -2
- package/esm/services/strategiesService.js +700 -700
- package/esm/services/strategiesService.test.d.ts +1 -1
- package/esm/services/strategiesService.test.js +110 -110
- package/esm/services/strategySubService.d.ts +100 -87
- package/esm/services/strategySubService.js +264 -257
- package/esm/services/strategySubService.test.d.ts +1 -1
- package/esm/services/strategySubService.test.js +934 -894
- package/esm/services/subDataService.d.ts +192 -181
- package/esm/services/subDataService.js +475 -443
- package/esm/services/subDataService.test.d.ts +1 -1
- package/esm/services/subDataService.test.js +1282 -1225
- package/esm/services/triggerService.d.ts +191 -191
- package/esm/services/triggerService.js +367 -367
- package/esm/services/triggerService.test.d.ts +1 -1
- package/esm/services/triggerService.test.js +926 -926
- package/esm/services/utils.d.ts +25 -25
- package/esm/services/utils.js +131 -131
- package/esm/services/utils.test.d.ts +1 -1
- package/esm/services/utils.test.js +376 -376
- package/esm/types/contracts/generated/Erc20.d.ts +53 -53
- package/esm/types/contracts/generated/Erc20.js +5 -5
- package/esm/types/contracts/generated/Legacy_AaveV2Subscriptions.d.ts +129 -129
- package/esm/types/contracts/generated/Legacy_AaveV2Subscriptions.js +5 -5
- package/esm/types/contracts/generated/Legacy_AuthCheck.d.ts +20 -20
- package/esm/types/contracts/generated/Legacy_AuthCheck.js +5 -5
- package/esm/types/contracts/generated/Legacy_CompoundV2Subscriptions.d.ts +128 -128
- package/esm/types/contracts/generated/Legacy_CompoundV2Subscriptions.js +5 -5
- package/esm/types/contracts/generated/Legacy_MakerSubscriptions.d.ts +246 -246
- package/esm/types/contracts/generated/Legacy_MakerSubscriptions.js +5 -5
- package/esm/types/contracts/generated/SubStorage.d.ts +114 -114
- package/esm/types/contracts/generated/SubStorage.js +5 -5
- package/esm/types/contracts/generated/UniMulticall.d.ts +55 -55
- package/esm/types/contracts/generated/UniMulticall.js +5 -5
- package/esm/types/contracts/generated/index.d.ts +7 -7
- package/esm/types/contracts/generated/index.js +2 -2
- package/esm/types/contracts/generated/types.d.ts +54 -54
- package/esm/types/contracts/generated/types.js +2 -2
- package/esm/types/enums.d.ts +168 -160
- package/esm/types/enums.js +188 -180
- package/esm/types/index.d.ts +217 -217
- package/esm/types/index.js +2 -2
- package/package.json +71 -71
- package/scripts/generateContractTypes.js +39 -39
- package/src/abis/Erc20.json +222 -222
- package/src/abis/SubStorage.json +17 -17
- package/src/abis/UniMulticall.json +14 -14
- package/src/abis/index.ts +28 -28
- package/src/abis/legacy_AaveV2Subscriptions.json +7 -7
- package/src/abis/legacy_AuthCheck.json +7 -7
- package/src/abis/legacy_CompoundV2Subscriptions.json +8 -8
- package/src/abis/legacy_MakerSubscriptions.json +8 -8
- package/src/automation/private/Automation.ts +44 -44
- package/src/automation/private/LegacyAutomation.ts +135 -135
- package/src/automation/private/LegacyProtocol.test.ts +23 -23
- package/src/automation/private/LegacyProtocol.ts +51 -51
- package/src/automation/private/Protocol.test.ts +23 -23
- package/src/automation/private/Protocol.ts +51 -51
- package/src/automation/private/StrategiesAutomation.test.ts +663 -663
- package/src/automation/private/StrategiesAutomation.ts +242 -242
- package/src/automation/public/ArbitrumStrategies.ts +10 -10
- package/src/automation/public/EthereumStrategies.ts +10 -10
- package/src/automation/public/OptimismStrategies.ts +10 -10
- package/src/automation/public/legacy/LegacyAaveAutomation.ts +20 -20
- package/src/automation/public/legacy/LegacyCompoundAutomation.ts +20 -20
- package/src/automation/public/legacy/LegacyMakerAutomation.ts +20 -20
- package/src/configuration.ts +8 -8
- package/src/constants/index.ts +441 -409
- package/src/index.ts +38 -38
- package/src/services/contractService.ts +77 -77
- package/src/services/ethereumService.test.ts +257 -257
- package/src/services/ethereumService.ts +69 -69
- package/src/services/strategiesService.test.ts +105 -105
- package/src/services/strategiesService.ts +904 -904
- package/src/services/strategySubService.test.ts +1119 -1065
- package/src/services/strategySubService.ts +518 -496
- package/src/services/subDataService.test.ts +1387 -1326
- package/src/services/subDataService.ts +645 -595
- package/src/services/triggerService.test.ts +1004 -1004
- package/src/services/triggerService.ts +449 -449
- package/src/services/utils.test.ts +430 -430
- package/src/services/utils.ts +103 -103
- package/src/types/enums.ts +182 -174
- package/src/types/index.ts +262 -262
- package/tsconfig.json +79 -79
- package/umd/index.js +108 -16
- package/webpack.umd.js +52 -52
package/tsconfig.json
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
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": "commonjs", /* 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
|
-
"resolveJsonModule": true,
|
|
38
|
-
|
|
39
|
-
/* Additional Checks */
|
|
40
|
-
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
|
41
|
-
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
42
|
-
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
43
|
-
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
44
|
-
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
|
45
|
-
|
|
46
|
-
/* Module Resolution Options */
|
|
47
|
-
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
|
48
|
-
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
|
49
|
-
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
50
|
-
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
51
|
-
//"typeRoots": ["utils.ts"], /* List of folders to include type definitions from. */
|
|
52
|
-
//"types": ["./src/utils.ts"], /* Type declaration files to be included in compilation. */
|
|
53
|
-
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
|
54
|
-
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
55
|
-
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
56
|
-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
57
|
-
|
|
58
|
-
/* Source Map Options */
|
|
59
|
-
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
60
|
-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
61
|
-
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
62
|
-
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
63
|
-
|
|
64
|
-
/* Experimental Options */
|
|
65
|
-
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
66
|
-
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
67
|
-
|
|
68
|
-
/* Advanced Options */
|
|
69
|
-
"skipLibCheck": true, /* Skip type checking of declaration files. */
|
|
70
|
-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
|
|
71
|
-
},
|
|
72
|
-
"include": [
|
|
73
|
-
"./src/**/*",
|
|
74
|
-
],
|
|
75
|
-
"typedocOptions": {
|
|
76
|
-
"entryPoints": ["./src/index.ts"],
|
|
77
|
-
"out": "docs",
|
|
78
|
-
}
|
|
79
|
-
}
|
|
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": "commonjs", /* 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
|
+
"resolveJsonModule": true,
|
|
38
|
+
|
|
39
|
+
/* Additional Checks */
|
|
40
|
+
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
|
41
|
+
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
42
|
+
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
43
|
+
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
44
|
+
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
|
45
|
+
|
|
46
|
+
/* Module Resolution Options */
|
|
47
|
+
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
|
48
|
+
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
|
49
|
+
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
50
|
+
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
51
|
+
//"typeRoots": ["utils.ts"], /* List of folders to include type definitions from. */
|
|
52
|
+
//"types": ["./src/utils.ts"], /* Type declaration files to be included in compilation. */
|
|
53
|
+
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
|
54
|
+
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
55
|
+
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
56
|
+
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
57
|
+
|
|
58
|
+
/* Source Map Options */
|
|
59
|
+
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
60
|
+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
61
|
+
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
62
|
+
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
63
|
+
|
|
64
|
+
/* Experimental Options */
|
|
65
|
+
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
66
|
+
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
67
|
+
|
|
68
|
+
/* Advanced Options */
|
|
69
|
+
"skipLibCheck": true, /* Skip type checking of declaration files. */
|
|
70
|
+
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
|
|
71
|
+
},
|
|
72
|
+
"include": [
|
|
73
|
+
"./src/**/*",
|
|
74
|
+
],
|
|
75
|
+
"typedocOptions": {
|
|
76
|
+
"entryPoints": ["./src/index.ts"],
|
|
77
|
+
"out": "docs",
|
|
78
|
+
}
|
|
79
|
+
}
|
package/umd/index.js
CHANGED
|
@@ -68,6 +68,7 @@ class LegacyMakerAutomation extends _private_LegacyAutomation__WEBPACK_IMPORTED_
|
|
|
68
68
|
"use strict";
|
|
69
69
|
__webpack_require__.r(__webpack_exports__);
|
|
70
70
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
71
|
+
/* harmony export */ AAVE_V3_VARIABLE_BORROW_RATE: () => (/* binding */ AAVE_V3_VARIABLE_BORROW_RATE),
|
|
71
72
|
/* harmony export */ ARBITRUM_BUNDLES_INFO: () => (/* binding */ ARBITRUM_BUNDLES_INFO),
|
|
72
73
|
/* harmony export */ ARBITRUM_STRATEGIES_INFO: () => (/* binding */ ARBITRUM_STRATEGIES_INFO),
|
|
73
74
|
/* harmony export */ BUNDLES_INFO: () => (/* binding */ BUNDLES_INFO),
|
|
@@ -91,6 +92,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
91
92
|
|
|
92
93
|
// General
|
|
93
94
|
var ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
|
95
|
+
var AAVE_V3_VARIABLE_BORROW_RATE = 2;
|
|
94
96
|
var PROTOCOLS = (() => {
|
|
95
97
|
var protocolsMapping = {};
|
|
96
98
|
Object.entries(_types_enums__WEBPACK_IMPORTED_MODULE_0__.ProtocolIdentifiers.StrategiesAutomation).forEach(_ref => {
|
|
@@ -183,6 +185,11 @@ var MAINNET_STRATEGIES_INFO = {
|
|
|
183
185
|
strategyOrBundleId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.MainnetIds.CURVEUSD_PAYBACK,
|
|
184
186
|
strategyId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.Identifiers.Payback,
|
|
185
187
|
protocol: PROTOCOLS.CrvUSD
|
|
188
|
+
},
|
|
189
|
+
[_types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.MainnetIds.AAVE_V3_OPEN_ORDER_FROM_DEBT]: {
|
|
190
|
+
strategyOrBundleId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.MainnetIds.AAVE_V3_OPEN_ORDER_FROM_DEBT,
|
|
191
|
+
strategyId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.Identifiers.OpenOrderFromDebt,
|
|
192
|
+
protocol: PROTOCOLS.AaveV3
|
|
186
193
|
}
|
|
187
194
|
};
|
|
188
195
|
var OPTIMISM_STRATEGIES_INFO = {
|
|
@@ -195,6 +202,11 @@ var OPTIMISM_STRATEGIES_INFO = {
|
|
|
195
202
|
strategyOrBundleId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.OptimismIds.EXCHANGE_LIMIT_ORDER,
|
|
196
203
|
strategyId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.Identifiers.LimitOrder,
|
|
197
204
|
protocol: PROTOCOLS.Exchange
|
|
205
|
+
},
|
|
206
|
+
[_types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.OptimismIds.AAVE_V3_OPEN_ORDER_FROM_DEBT]: {
|
|
207
|
+
strategyOrBundleId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.OptimismIds.AAVE_V3_OPEN_ORDER_FROM_DEBT,
|
|
208
|
+
strategyId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.Identifiers.OpenOrderFromDebt,
|
|
209
|
+
protocol: PROTOCOLS.AaveV3
|
|
198
210
|
}
|
|
199
211
|
};
|
|
200
212
|
var ARBITRUM_STRATEGIES_INFO = {
|
|
@@ -207,6 +219,11 @@ var ARBITRUM_STRATEGIES_INFO = {
|
|
|
207
219
|
strategyOrBundleId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.ArbitrumIds.EXCHANGE_LIMIT_ORDER,
|
|
208
220
|
strategyId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.Identifiers.LimitOrder,
|
|
209
221
|
protocol: PROTOCOLS.Exchange
|
|
222
|
+
},
|
|
223
|
+
[_types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.ArbitrumIds.AAVE_V3_OPEN_ORDER_FROM_DEBT]: {
|
|
224
|
+
strategyOrBundleId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.ArbitrumIds.AAVE_V3_OPEN_ORDER_FROM_DEBT,
|
|
225
|
+
strategyId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.Identifiers.OpenOrderFromDebt,
|
|
226
|
+
protocol: PROTOCOLS.AaveV3
|
|
210
227
|
}
|
|
211
228
|
};
|
|
212
229
|
var STRATEGIES_INFO = {
|
|
@@ -417,6 +434,11 @@ var MAINNET_BUNDLES_INFO = {
|
|
|
417
434
|
strategyOrBundleId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Bundles.MainnetIds.MORPHO_BLUE_EOA_BOOST,
|
|
418
435
|
strategyId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.Identifiers.EoaBoost,
|
|
419
436
|
protocol: PROTOCOLS.MorphoBlue
|
|
437
|
+
},
|
|
438
|
+
[_types_enums__WEBPACK_IMPORTED_MODULE_0__.Bundles.MainnetIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL]: {
|
|
439
|
+
strategyOrBundleId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Bundles.MainnetIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL,
|
|
440
|
+
strategyId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.Identifiers.OpenOrderFromCollateral,
|
|
441
|
+
protocol: PROTOCOLS.AaveV3
|
|
420
442
|
}
|
|
421
443
|
};
|
|
422
444
|
var OPTIMISM_BUNDLES_INFO = {
|
|
@@ -439,6 +461,11 @@ var OPTIMISM_BUNDLES_INFO = {
|
|
|
439
461
|
strategyOrBundleId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Bundles.OptimismIds.AAVE_V3_CLOSE_TO_COLLATERAL,
|
|
440
462
|
strategyId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.Identifiers.CloseToCollateral,
|
|
441
463
|
protocol: PROTOCOLS.AaveV3
|
|
464
|
+
},
|
|
465
|
+
[_types_enums__WEBPACK_IMPORTED_MODULE_0__.Bundles.OptimismIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL]: {
|
|
466
|
+
strategyOrBundleId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Bundles.OptimismIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL,
|
|
467
|
+
strategyId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.Identifiers.OpenOrderFromCollateral,
|
|
468
|
+
protocol: PROTOCOLS.AaveV3
|
|
442
469
|
}
|
|
443
470
|
};
|
|
444
471
|
var ARBITRUM_BUNDLES_INFO = {
|
|
@@ -471,6 +498,11 @@ var ARBITRUM_BUNDLES_INFO = {
|
|
|
471
498
|
strategyOrBundleId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Bundles.ArbitrumIds.COMP_V3_SW_REPAY_BUNDLE,
|
|
472
499
|
strategyId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.Identifiers.Repay,
|
|
473
500
|
protocol: PROTOCOLS.CompoundV3
|
|
501
|
+
},
|
|
502
|
+
[_types_enums__WEBPACK_IMPORTED_MODULE_0__.Bundles.ArbitrumIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL]: {
|
|
503
|
+
strategyOrBundleId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Bundles.ArbitrumIds.AAVE_V3_OPEN_ORDER_FROM_COLLATERAL,
|
|
504
|
+
strategyId: _types_enums__WEBPACK_IMPORTED_MODULE_0__.Strategies.Identifiers.OpenOrderFromCollateral,
|
|
505
|
+
protocol: PROTOCOLS.AaveV3
|
|
474
506
|
}
|
|
475
507
|
};
|
|
476
508
|
var BUNDLES_INFO = {
|
|
@@ -517,12 +549,12 @@ var OrderType;
|
|
|
517
549
|
})(OrderType || (OrderType = {}));
|
|
518
550
|
var BundleProtocols;
|
|
519
551
|
|
|
520
|
-
/**
|
|
521
|
-
* @dev Follow the naming convention:
|
|
522
|
-
* - Enum name consists of two parts, name and version
|
|
523
|
-
* - Name should be human-readable name of the protocol, it can include spaces or any characters needed
|
|
524
|
-
* - Version should be separated from the name with double underscores `__` (If there is no version leave it out)
|
|
525
|
-
* - Example `Name of ThePROTOCOL__v1` (Without version `Name of ThePROTOCOL`)
|
|
552
|
+
/**
|
|
553
|
+
* @dev Follow the naming convention:
|
|
554
|
+
* - Enum name consists of two parts, name and version
|
|
555
|
+
* - Name should be human-readable name of the protocol, it can include spaces or any characters needed
|
|
556
|
+
* - Version should be separated from the name with double underscores `__` (If there is no version leave it out)
|
|
557
|
+
* - Example `Name of ThePROTOCOL__v1` (Without version `Name of ThePROTOCOL`)
|
|
526
558
|
*/
|
|
527
559
|
(function (BundleProtocols) {
|
|
528
560
|
BundleProtocols["MStable"] = "mstable";
|
|
@@ -573,18 +605,21 @@ var Strategies;
|
|
|
573
605
|
MainnetIds[MainnetIds["LIQUITY_DSR_SUPPLY"] = 70] = "LIQUITY_DSR_SUPPLY";
|
|
574
606
|
MainnetIds[MainnetIds["LIQUITY_DEBT_IN_FRONT_REPAY"] = 75] = "LIQUITY_DEBT_IN_FRONT_REPAY";
|
|
575
607
|
MainnetIds[MainnetIds["CURVEUSD_PAYBACK"] = 92] = "CURVEUSD_PAYBACK";
|
|
608
|
+
MainnetIds[MainnetIds["AAVE_V3_OPEN_ORDER_FROM_DEBT"] = 96] = "AAVE_V3_OPEN_ORDER_FROM_DEBT";
|
|
576
609
|
})(MainnetIds || (MainnetIds = {}));
|
|
577
610
|
_Strategies.MainnetIds = MainnetIds;
|
|
578
611
|
var OptimismIds;
|
|
579
612
|
(function (OptimismIds) {
|
|
580
613
|
OptimismIds[OptimismIds["EXCHANGE_DCA"] = 8] = "EXCHANGE_DCA";
|
|
581
614
|
OptimismIds[OptimismIds["EXCHANGE_LIMIT_ORDER"] = 9] = "EXCHANGE_LIMIT_ORDER";
|
|
615
|
+
OptimismIds[OptimismIds["AAVE_V3_OPEN_ORDER_FROM_DEBT"] = 12] = "AAVE_V3_OPEN_ORDER_FROM_DEBT";
|
|
582
616
|
})(OptimismIds || (OptimismIds = {}));
|
|
583
617
|
_Strategies.OptimismIds = OptimismIds;
|
|
584
618
|
var ArbitrumIds;
|
|
585
619
|
(function (ArbitrumIds) {
|
|
586
620
|
ArbitrumIds[ArbitrumIds["EXCHANGE_DCA"] = 8] = "EXCHANGE_DCA";
|
|
587
621
|
ArbitrumIds[ArbitrumIds["EXCHANGE_LIMIT_ORDER"] = 9] = "EXCHANGE_LIMIT_ORDER";
|
|
622
|
+
ArbitrumIds[ArbitrumIds["AAVE_V3_OPEN_ORDER_FROM_DEBT"] = 16] = "AAVE_V3_OPEN_ORDER_FROM_DEBT";
|
|
588
623
|
})(ArbitrumIds || (ArbitrumIds = {}));
|
|
589
624
|
_Strategies.ArbitrumIds = ArbitrumIds;
|
|
590
625
|
var Identifiers;
|
|
@@ -610,6 +645,8 @@ var Strategies;
|
|
|
610
645
|
Identifiers["Dca"] = "dca";
|
|
611
646
|
Identifiers["LimitOrder"] = "limit-order";
|
|
612
647
|
Identifiers["DebtInFrontRepay"] = "debt-in-front-repay";
|
|
648
|
+
Identifiers["OpenOrderFromCollateral"] = "open-order-from-collateral";
|
|
649
|
+
Identifiers["OpenOrderFromDebt"] = "open-order-from-debt";
|
|
613
650
|
})(Identifiers || (Identifiers = {}));
|
|
614
651
|
_Strategies.Identifiers = Identifiers;
|
|
615
652
|
var IdOverrides;
|
|
@@ -666,6 +703,7 @@ var Bundles;
|
|
|
666
703
|
MainnetIds[MainnetIds["MORPHO_BLUE_BOOST"] = 33] = "MORPHO_BLUE_BOOST";
|
|
667
704
|
MainnetIds[MainnetIds["MORPHO_BLUE_EOA_REPAY"] = 34] = "MORPHO_BLUE_EOA_REPAY";
|
|
668
705
|
MainnetIds[MainnetIds["MORPHO_BLUE_EOA_BOOST"] = 35] = "MORPHO_BLUE_EOA_BOOST";
|
|
706
|
+
MainnetIds[MainnetIds["AAVE_V3_OPEN_ORDER_FROM_COLLATERAL"] = 36] = "AAVE_V3_OPEN_ORDER_FROM_COLLATERAL";
|
|
669
707
|
})(MainnetIds || (MainnetIds = {}));
|
|
670
708
|
_Bundles.MainnetIds = MainnetIds;
|
|
671
709
|
var OptimismIds;
|
|
@@ -674,6 +712,7 @@ var Bundles;
|
|
|
674
712
|
OptimismIds[OptimismIds["AAVE_V3_BOOST"] = 1] = "AAVE_V3_BOOST";
|
|
675
713
|
OptimismIds[OptimismIds["AAVE_V3_CLOSE_TO_DEBT"] = 2] = "AAVE_V3_CLOSE_TO_DEBT";
|
|
676
714
|
OptimismIds[OptimismIds["AAVE_V3_CLOSE_TO_COLLATERAL"] = 3] = "AAVE_V3_CLOSE_TO_COLLATERAL";
|
|
715
|
+
OptimismIds[OptimismIds["AAVE_V3_OPEN_ORDER_FROM_COLLATERAL"] = 4] = "AAVE_V3_OPEN_ORDER_FROM_COLLATERAL";
|
|
677
716
|
})(OptimismIds || (OptimismIds = {}));
|
|
678
717
|
_Bundles.OptimismIds = OptimismIds;
|
|
679
718
|
var ArbitrumIds;
|
|
@@ -684,6 +723,7 @@ var Bundles;
|
|
|
684
723
|
ArbitrumIds[ArbitrumIds["AAVE_V3_CLOSE_TO_COLLATERAL"] = 3] = "AAVE_V3_CLOSE_TO_COLLATERAL";
|
|
685
724
|
ArbitrumIds[ArbitrumIds["COMP_V3_SW_REPAY_BUNDLE"] = 4] = "COMP_V3_SW_REPAY_BUNDLE";
|
|
686
725
|
ArbitrumIds[ArbitrumIds["COMP_V3_SW_BOOST_BUNDLE"] = 5] = "COMP_V3_SW_BOOST_BUNDLE";
|
|
726
|
+
ArbitrumIds[ArbitrumIds["AAVE_V3_OPEN_ORDER_FROM_COLLATERAL"] = 6] = "AAVE_V3_OPEN_ORDER_FROM_COLLATERAL";
|
|
687
727
|
})(ArbitrumIds || (ArbitrumIds = {}));
|
|
688
728
|
_Bundles.ArbitrumIds = ArbitrumIds;
|
|
689
729
|
})(Bundles || (Bundles = {}));
|
|
@@ -730,8 +770,8 @@ class Protocol {
|
|
|
730
770
|
return this.id.split(_classPrivateFieldGet(this, _versionSeparator));
|
|
731
771
|
}
|
|
732
772
|
|
|
733
|
-
/**
|
|
734
|
-
* @dev See naming convention at ProtocolIdentifiers declaration
|
|
773
|
+
/**
|
|
774
|
+
* @dev See naming convention at ProtocolIdentifiers declaration
|
|
735
775
|
*/
|
|
736
776
|
getVersion() {
|
|
737
777
|
return this.hasVersion() ? this.splitId().reverse()[0] : '';
|
|
@@ -789,8 +829,8 @@ class Protocol {
|
|
|
789
829
|
return this.id.split(_classPrivateFieldGet(this, _versionSeparator));
|
|
790
830
|
}
|
|
791
831
|
|
|
792
|
-
/**
|
|
793
|
-
* @dev See naming convention at ProtocolIdentifiers declaration
|
|
832
|
+
/**
|
|
833
|
+
* @dev See naming convention at ProtocolIdentifiers declaration
|
|
794
834
|
*/
|
|
795
835
|
getVersion() {
|
|
796
836
|
return this.hasVersion() ? this.splitId().reverse()[0] : '';
|
|
@@ -1560,8 +1600,8 @@ class StrategiesAutomation extends _Automation__WEBPACK_IMPORTED_MODULE_6__["def
|
|
|
1560
1600
|
return (0,_services_strategiesService__WEBPACK_IMPORTED_MODULE_5__.parseStrategiesAutomatedPosition)(parseData);
|
|
1561
1601
|
}
|
|
1562
1602
|
|
|
1563
|
-
/**
|
|
1564
|
-
* @description Removes expired Limit Order subscriptions
|
|
1603
|
+
/**
|
|
1604
|
+
* @description Removes expired Limit Order subscriptions
|
|
1565
1605
|
*/
|
|
1566
1606
|
removeExpiredSubscriptions(subscriptions) {
|
|
1567
1607
|
return subscriptions.filter(subscription => {
|
|
@@ -19684,6 +19724,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19684
19724
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19685
19725
|
/* harmony export */ aaveV2LeverageManagementSubData: () => (/* binding */ aaveV2LeverageManagementSubData),
|
|
19686
19726
|
/* harmony export */ aaveV3LeverageManagementSubData: () => (/* binding */ aaveV3LeverageManagementSubData),
|
|
19727
|
+
/* harmony export */ aaveV3OpenOrderSubData: () => (/* binding */ aaveV3OpenOrderSubData),
|
|
19687
19728
|
/* harmony export */ aaveV3QuotePriceSubData: () => (/* binding */ aaveV3QuotePriceSubData),
|
|
19688
19729
|
/* harmony export */ cBondsRebondSubData: () => (/* binding */ cBondsRebondSubData),
|
|
19689
19730
|
/* harmony export */ compoundV2LeverageManagementSubData: () => (/* binding */ compoundV2LeverageManagementSubData),
|
|
@@ -19957,10 +19998,10 @@ var cBondsRebondSubData = {
|
|
|
19957
19998
|
}
|
|
19958
19999
|
};
|
|
19959
20000
|
var liquityPaybackUsingChickenBondSubData = {
|
|
19960
|
-
/**
|
|
19961
|
-
* @param sourceId bondId or subId
|
|
19962
|
-
* @param sourceType 0 for bond, 1 for subId
|
|
19963
|
-
* @param chainId
|
|
20001
|
+
/**
|
|
20002
|
+
* @param sourceId bondId or subId
|
|
20003
|
+
* @param sourceType 0 for bond, 1 for subId
|
|
20004
|
+
* @param chainId
|
|
19964
20005
|
*/
|
|
19965
20006
|
encode: function encode(sourceId, sourceType) {
|
|
19966
20007
|
var chainId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _types_enums__WEBPACK_IMPORTED_MODULE_5__.ChainId.Ethereum;
|
|
@@ -20179,6 +20220,35 @@ var morphoBlueLeverageManagementSubData = {
|
|
|
20179
20220
|
};
|
|
20180
20221
|
}
|
|
20181
20222
|
};
|
|
20223
|
+
var aaveV3OpenOrderSubData = {
|
|
20224
|
+
encode(collAsset, collAssetId, debtAsset, debtAssetId, marketAddr, targetRatio) {
|
|
20225
|
+
var encodedColl = web3_eth_abi__WEBPACK_IMPORTED_MODULE_1___default().encodeParameter('address', collAsset);
|
|
20226
|
+
var encodedCollId = web3_eth_abi__WEBPACK_IMPORTED_MODULE_1___default().encodeParameter('uint8', collAssetId);
|
|
20227
|
+
var encodedDebt = web3_eth_abi__WEBPACK_IMPORTED_MODULE_1___default().encodeParameter('address', debtAsset);
|
|
20228
|
+
var encodedDebtId = web3_eth_abi__WEBPACK_IMPORTED_MODULE_1___default().encodeParameter('uint8', debtAssetId);
|
|
20229
|
+
var encodedMarket = web3_eth_abi__WEBPACK_IMPORTED_MODULE_1___default().encodeParameter('address', marketAddr);
|
|
20230
|
+
var encodedTargetRatio = web3_eth_abi__WEBPACK_IMPORTED_MODULE_1___default().encodeParameter('uint256', (0,_utils__WEBPACK_IMPORTED_MODULE_7__.ratioPercentageToWei)(targetRatio));
|
|
20231
|
+
var useOnBehalfEncoded = web3_eth_abi__WEBPACK_IMPORTED_MODULE_1___default().encodeParameter('bool', false);
|
|
20232
|
+
return [encodedColl, encodedCollId, encodedDebt, encodedDebtId, encodedMarket, encodedTargetRatio, useOnBehalfEncoded];
|
|
20233
|
+
},
|
|
20234
|
+
decode(subData) {
|
|
20235
|
+
var collAsset = web3_eth_abi__WEBPACK_IMPORTED_MODULE_1___default().decodeParameter('address', subData[0]);
|
|
20236
|
+
var collAssetId = Number(web3_eth_abi__WEBPACK_IMPORTED_MODULE_1___default().decodeParameter('uint8', subData[1]));
|
|
20237
|
+
var debtAsset = web3_eth_abi__WEBPACK_IMPORTED_MODULE_1___default().decodeParameter('address', subData[2]);
|
|
20238
|
+
var debtAssetId = Number(web3_eth_abi__WEBPACK_IMPORTED_MODULE_1___default().decodeParameter('uint8', subData[3]));
|
|
20239
|
+
var marketAddr = web3_eth_abi__WEBPACK_IMPORTED_MODULE_1___default().decodeParameter('address', subData[4]);
|
|
20240
|
+
var weiRatio = web3_eth_abi__WEBPACK_IMPORTED_MODULE_1___default().decodeParameter('uint256', subData[5]);
|
|
20241
|
+
var targetRatio = (0,_utils__WEBPACK_IMPORTED_MODULE_7__.weiToRatioPercentage)(weiRatio);
|
|
20242
|
+
return {
|
|
20243
|
+
collAsset,
|
|
20244
|
+
collAssetId,
|
|
20245
|
+
debtAsset,
|
|
20246
|
+
debtAssetId,
|
|
20247
|
+
marketAddr,
|
|
20248
|
+
targetRatio
|
|
20249
|
+
};
|
|
20250
|
+
}
|
|
20251
|
+
};
|
|
20182
20252
|
|
|
20183
20253
|
/***/ }),
|
|
20184
20254
|
/* 31 */
|
|
@@ -33858,6 +33928,28 @@ var aaveV3Encode = {
|
|
|
33858
33928
|
} = triggerData;
|
|
33859
33929
|
var triggerDataEncoded = _triggerService__WEBPACK_IMPORTED_MODULE_5__.aaveV3QuotePriceWithMaximumGasPriceTrigger.encode(baseTokenAddress, quoteTokenAddress, price, ratioState, maximumGasPrice);
|
|
33860
33930
|
return [strategyOrBundleId, isBundle, triggerDataEncoded, subDataEncoded];
|
|
33931
|
+
},
|
|
33932
|
+
openOrder(strategyOrBundleId) {
|
|
33933
|
+
var isBundle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
33934
|
+
var triggerData = arguments.length > 2 ? arguments[2] : undefined;
|
|
33935
|
+
var subData = arguments.length > 3 ? arguments[3] : undefined;
|
|
33936
|
+
var {
|
|
33937
|
+
collAsset,
|
|
33938
|
+
collAssetId,
|
|
33939
|
+
debtAsset,
|
|
33940
|
+
debtAssetId,
|
|
33941
|
+
marketAddr,
|
|
33942
|
+
targetRatio
|
|
33943
|
+
} = subData;
|
|
33944
|
+
var subDataEncoded = _subDataService__WEBPACK_IMPORTED_MODULE_4__.aaveV3OpenOrderSubData.encode(collAsset, collAssetId, debtAsset, debtAssetId, marketAddr, targetRatio);
|
|
33945
|
+
var {
|
|
33946
|
+
baseTokenAddress,
|
|
33947
|
+
quoteTokenAddress,
|
|
33948
|
+
price,
|
|
33949
|
+
state
|
|
33950
|
+
} = triggerData;
|
|
33951
|
+
var triggerDataEncoded = _triggerService__WEBPACK_IMPORTED_MODULE_5__.aaveV3QuotePriceTrigger.encode(baseTokenAddress, quoteTokenAddress, price, state);
|
|
33952
|
+
return [strategyOrBundleId, isBundle, triggerDataEncoded, subDataEncoded];
|
|
33861
33953
|
}
|
|
33862
33954
|
};
|
|
33863
33955
|
var compoundV2Encode = {
|
package/webpack.umd.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
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-sdk',
|
|
9
|
-
libraryTarget: 'umd',
|
|
10
|
-
path: path.resolve(__dirname, 'umd'),
|
|
11
|
-
filename: 'index.js',
|
|
12
|
-
globalObject: 'this'
|
|
13
|
-
},
|
|
14
|
-
module: {
|
|
15
|
-
rules: [
|
|
16
|
-
{
|
|
17
|
-
test: /\.[tj]s$/,
|
|
18
|
-
exclude: /node_modules/,
|
|
19
|
-
use: {
|
|
20
|
-
loader: "babel-loader",
|
|
21
|
-
options: {
|
|
22
|
-
presets: [
|
|
23
|
-
'@babel/preset-typescript',
|
|
24
|
-
[
|
|
25
|
-
"@babel/preset-env",
|
|
26
|
-
{
|
|
27
|
-
"targets": {
|
|
28
|
-
"esmodules": true
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
]
|
|
37
|
-
},
|
|
38
|
-
externals: [
|
|
39
|
-
"decimal.js",
|
|
40
|
-
'web3',
|
|
41
|
-
"web3-eth-abi",
|
|
42
|
-
"web3-utils",
|
|
43
|
-
"@defisaver/tokens",
|
|
44
|
-
"@ethersproject/address",
|
|
45
|
-
"@ethersproject/solidity",
|
|
46
|
-
"@types/web3-eth-abi",
|
|
47
|
-
'@types/web3',
|
|
48
|
-
"axios"],
|
|
49
|
-
resolve: {
|
|
50
|
-
extensions: ['.ts', '.js'],
|
|
51
|
-
},
|
|
52
|
-
};
|
|
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-sdk',
|
|
9
|
+
libraryTarget: 'umd',
|
|
10
|
+
path: path.resolve(__dirname, 'umd'),
|
|
11
|
+
filename: 'index.js',
|
|
12
|
+
globalObject: 'this'
|
|
13
|
+
},
|
|
14
|
+
module: {
|
|
15
|
+
rules: [
|
|
16
|
+
{
|
|
17
|
+
test: /\.[tj]s$/,
|
|
18
|
+
exclude: /node_modules/,
|
|
19
|
+
use: {
|
|
20
|
+
loader: "babel-loader",
|
|
21
|
+
options: {
|
|
22
|
+
presets: [
|
|
23
|
+
'@babel/preset-typescript',
|
|
24
|
+
[
|
|
25
|
+
"@babel/preset-env",
|
|
26
|
+
{
|
|
27
|
+
"targets": {
|
|
28
|
+
"esmodules": true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
externals: [
|
|
39
|
+
"decimal.js",
|
|
40
|
+
'web3',
|
|
41
|
+
"web3-eth-abi",
|
|
42
|
+
"web3-utils",
|
|
43
|
+
"@defisaver/tokens",
|
|
44
|
+
"@ethersproject/address",
|
|
45
|
+
"@ethersproject/solidity",
|
|
46
|
+
"@types/web3-eth-abi",
|
|
47
|
+
'@types/web3',
|
|
48
|
+
"axios"],
|
|
49
|
+
resolve: {
|
|
50
|
+
extensions: ['.ts', '.js'],
|
|
51
|
+
},
|
|
52
|
+
};
|