@defisaver/automation-sdk 1.2.10 → 1.2.11
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.
|
@@ -136,12 +136,14 @@ export const compoundV3LeverageManagementSubData = {
|
|
|
136
136
|
};
|
|
137
137
|
export const morphoAaveV2LeverageManagementSubData = {
|
|
138
138
|
encode(minRatio, maxRatio, maxOptimalRatio, minOptimalRatio, boostEnabled) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
139
|
+
return [
|
|
140
|
+
ratioPercentageToWei(minRatio),
|
|
141
|
+
ratioPercentageToWei(maxRatio),
|
|
142
|
+
ratioPercentageToWei(maxOptimalRatio),
|
|
143
|
+
ratioPercentageToWei(minOptimalRatio),
|
|
144
|
+
// @ts-ignore
|
|
145
|
+
boostEnabled,
|
|
146
|
+
];
|
|
145
147
|
},
|
|
146
148
|
decode(subData) {
|
|
147
149
|
const ratioWei = mockedWeb3.eth.abi.decodeParameter('uint128', subData[1]);
|
package/package.json
CHANGED
|
@@ -203,13 +203,14 @@ export const morphoAaveV2LeverageManagementSubData = {
|
|
|
203
203
|
minOptimalRatio: number,
|
|
204
204
|
boostEnabled: boolean,
|
|
205
205
|
): SubData {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
206
|
+
return [
|
|
207
|
+
ratioPercentageToWei(minRatio),
|
|
208
|
+
ratioPercentageToWei(maxRatio),
|
|
209
|
+
ratioPercentageToWei(maxOptimalRatio),
|
|
210
|
+
ratioPercentageToWei(minOptimalRatio),
|
|
211
|
+
// @ts-ignore
|
|
212
|
+
boostEnabled,
|
|
213
|
+
];
|
|
213
214
|
},
|
|
214
215
|
decode(subData: SubData): { targetRatio: number } {
|
|
215
216
|
const ratioWei = mockedWeb3.eth.abi.decodeParameter('uint128', subData[1]) as any as string;
|
package/umd/index.js
CHANGED
|
@@ -19141,12 +19141,9 @@ var compoundV3LeverageManagementSubData = {
|
|
|
19141
19141
|
};
|
|
19142
19142
|
var morphoAaveV2LeverageManagementSubData = {
|
|
19143
19143
|
encode(minRatio, maxRatio, maxOptimalRatio, minOptimalRatio, boostEnabled) {
|
|
19144
|
-
|
|
19145
|
-
|
|
19146
|
-
|
|
19147
|
-
var encodedMinOptimalRatio = mockedWeb3.eth.abi.encodeParameter('uint128', new (decimal_js__WEBPACK_IMPORTED_MODULE_0___default())(minOptimalRatio).mul(1e16).toString());
|
|
19148
|
-
var encodedBoostEnabled = mockedWeb3.eth.abi.encodeParameter('bool', boostEnabled);
|
|
19149
|
-
return [encodedMinRatio, encodedMaxRatio, encodedMaxOptimalRatio, encodedMinOptimalRatio, encodedBoostEnabled];
|
|
19144
|
+
return [(0,_utils__WEBPACK_IMPORTED_MODULE_5__.ratioPercentageToWei)(minRatio), (0,_utils__WEBPACK_IMPORTED_MODULE_5__.ratioPercentageToWei)(maxRatio), (0,_utils__WEBPACK_IMPORTED_MODULE_5__.ratioPercentageToWei)(maxOptimalRatio), (0,_utils__WEBPACK_IMPORTED_MODULE_5__.ratioPercentageToWei)(minOptimalRatio),
|
|
19145
|
+
// @ts-ignore
|
|
19146
|
+
boostEnabled];
|
|
19150
19147
|
},
|
|
19151
19148
|
decode(subData) {
|
|
19152
19149
|
var ratioWei = mockedWeb3.eth.abi.decodeParameter('uint128', subData[1]);
|