@magmaprotocol/magma-clmm-sdk 0.5.85 → 0.5.87
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/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2316,28 +2316,28 @@ function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amou
|
|
|
2316
2316
|
}
|
|
2317
2317
|
case 2 /* Curve */: {
|
|
2318
2318
|
if (activeId < minBinId) {
|
|
2319
|
-
const
|
|
2320
|
-
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin,
|
|
2321
|
-
}
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2319
|
+
const weights = toWeightDecendingOrder(minBinId, maxBinId);
|
|
2320
|
+
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin, weights);
|
|
2321
|
+
} else if (activeId > maxBinId) {
|
|
2322
|
+
const weights = toWeightAscendingOrder(minBinId, maxBinId);
|
|
2323
|
+
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin, weights);
|
|
2324
|
+
} else {
|
|
2325
|
+
const weights = toWeightCurve(minBinId, maxBinId, activeId);
|
|
2326
|
+
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin, weights);
|
|
2325
2327
|
}
|
|
2326
|
-
const weights = toWeightCurve(minBinId, maxBinId, activeId);
|
|
2327
|
-
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin, weights);
|
|
2328
2328
|
break;
|
|
2329
2329
|
}
|
|
2330
2330
|
case 3 /* BidAsk */: {
|
|
2331
2331
|
if (activeId < minBinId) {
|
|
2332
|
-
const
|
|
2333
|
-
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin,
|
|
2334
|
-
}
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2332
|
+
const weights = toWeightAscendingOrder(minBinId, maxBinId);
|
|
2333
|
+
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin, weights);
|
|
2334
|
+
} else if (activeId > maxBinId) {
|
|
2335
|
+
const weights = toWeightDecendingOrder(minBinId, maxBinId);
|
|
2336
|
+
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin, weights);
|
|
2337
|
+
} else {
|
|
2338
|
+
const weights = toWeightBidAsk(minBinId, maxBinId, activeId);
|
|
2339
|
+
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin, weights);
|
|
2338
2340
|
}
|
|
2339
|
-
const weights = toWeightBidAsk(minBinId, maxBinId, activeId);
|
|
2340
|
-
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin, weights);
|
|
2341
2341
|
break;
|
|
2342
2342
|
}
|
|
2343
2343
|
default:
|
|
@@ -10930,7 +10930,7 @@ var DlmmModule = class {
|
|
|
10930
10930
|
tx.object(CLOCK_ADDRESS)
|
|
10931
10931
|
];
|
|
10932
10932
|
tx.moveCall({
|
|
10933
|
-
target: `${integrate.published_at}::${DlmmScript}::
|
|
10933
|
+
target: `${integrate.published_at}::${DlmmScript}::raise_by_strategy`,
|
|
10934
10934
|
typeArguments,
|
|
10935
10935
|
arguments: args
|
|
10936
10936
|
});
|
|
@@ -10993,7 +10993,7 @@ var DlmmModule = class {
|
|
|
10993
10993
|
tx.object(CLOCK_ADDRESS)
|
|
10994
10994
|
];
|
|
10995
10995
|
tx.moveCall({
|
|
10996
|
-
target: `${integrate.published_at}::${DlmmScript}::
|
|
10996
|
+
target: `${integrate.published_at}::${DlmmScript}::raise_by_strategy_${params.rewards_token.length}`,
|
|
10997
10997
|
typeArguments,
|
|
10998
10998
|
arguments: args
|
|
10999
10999
|
});
|