impermax-sdk 2.1.556 → 2.1.558
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.
|
@@ -153,7 +153,7 @@ exports.ROUTER_V3 = {
|
|
|
153
153
|
//[Extension.UniswapV3]: '0x63F3d5eCde1a0F8675d4358F41d9134Afef0b63c'
|
|
154
154
|
//[Extension.UniswapV3]: '0xf5f995952132871436d8fd61f38bf4a3eb2d662e'
|
|
155
155
|
//[Extension.UniswapV3]: '0x58c5Ca4Ba713A9BBD2A95aCcbC9f545718C822C5'
|
|
156
|
-
[types_1.Extension.UniswapV3]: '
|
|
156
|
+
[types_1.Extension.UniswapV3]: '0xb03Dd150d6b55d59a5650E5eEc7322E652617aA4',
|
|
157
157
|
[types_1.Extension.AeroCL]: '0xd894B2C116Ba9473109e3d2675EA25964E1f8797'
|
|
158
158
|
},
|
|
159
159
|
[types_1.Networks.Scroll]: {},
|
|
@@ -7,7 +7,7 @@ const onchainInteractionsNftlp_1 = __importDefault(require("./onchainInteraction
|
|
|
7
7
|
const ether_utils_1 = require("../../../../utils/ether-utils");
|
|
8
8
|
const general_1 = require("../../../../config/general");
|
|
9
9
|
// TODO fix this
|
|
10
|
-
const MAX_SWAP_AND_CLOSE_SLIPPAGE = 1.
|
|
10
|
+
const MAX_SWAP_AND_CLOSE_SLIPPAGE = 1.01;
|
|
11
11
|
class OnchainInteractionsNftlpGenericCL extends onchainInteractionsNftlp_1.default {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
@@ -163,7 +163,6 @@ class OnchainInteractionsNftlpGenericCL extends onchainInteractionsNftlp_1.defau
|
|
|
163
163
|
const price = positionObject.marketPrice;
|
|
164
164
|
const amountOut = (-borrowADelta) - (-depositADelta);
|
|
165
165
|
const amountInMaximum = amountOut * price * MAX_SWAP_AND_CLOSE_SLIPPAGE;
|
|
166
|
-
console.log("swap", 0, amountOut, amountInMaximum);
|
|
167
166
|
actions.push(await actionsGetter.methods.getSwapAction(0, await borrowableA.toBigNumber(amountOut), await borrowableB.toBigNumber(amountInMaximum)).call());
|
|
168
167
|
}
|
|
169
168
|
actions.push(await actionsGetter.methods.getRepayRouterAction(0, maximizeRepay ? general_1.MAX_UINT : await borrowableA.toBigNumber(-borrowADelta), isEthA ? router._address : this.getAccountAddress()).call());
|
|
@@ -193,7 +192,6 @@ class OnchainInteractionsNftlpGenericCL extends onchainInteractionsNftlp_1.defau
|
|
|
193
192
|
const price = positionObject.marketPrice;
|
|
194
193
|
const amountOut = (-borrowBDelta) - (-depositBDelta);
|
|
195
194
|
const amountInMaximum = amountOut / price * MAX_SWAP_AND_CLOSE_SLIPPAGE;
|
|
196
|
-
console.log("swap", 1, amountOut, amountInMaximum);
|
|
197
195
|
actions.push(await actionsGetter.methods.getSwapAction(1, await borrowableB.toBigNumber(amountOut), await borrowableA.toBigNumber(amountInMaximum)).call());
|
|
198
196
|
}
|
|
199
197
|
actions.push(await actionsGetter.methods.getRepayRouterAction(1, maximizeRepay ? general_1.MAX_UINT : await borrowableB.toBigNumber(-borrowBDelta), isEthB ? router._address : this.getAccountAddress()).call());
|
|
@@ -241,7 +239,6 @@ class OnchainInteractionsNftlpGenericCL extends onchainInteractionsNftlp_1.defau
|
|
|
241
239
|
if (ethValue > 0 || doWithdrawEth) {
|
|
242
240
|
actions.push(await actionsGetter.methods.getWithdrawEthAction(this.getAccountAddress()).call());
|
|
243
241
|
}
|
|
244
|
-
console.log("actions", actions);
|
|
245
242
|
return {
|
|
246
243
|
actions,
|
|
247
244
|
ethValue,
|