@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.mjs
CHANGED
|
@@ -2096,28 +2096,28 @@ function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amou
|
|
|
2096
2096
|
}
|
|
2097
2097
|
case 2 /* Curve */: {
|
|
2098
2098
|
if (activeId < minBinId) {
|
|
2099
|
-
const
|
|
2100
|
-
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin,
|
|
2101
|
-
}
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2099
|
+
const weights = toWeightDecendingOrder(minBinId, maxBinId);
|
|
2100
|
+
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin, weights);
|
|
2101
|
+
} else if (activeId > maxBinId) {
|
|
2102
|
+
const weights = toWeightAscendingOrder(minBinId, maxBinId);
|
|
2103
|
+
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin, weights);
|
|
2104
|
+
} else {
|
|
2105
|
+
const weights = toWeightCurve(minBinId, maxBinId, activeId);
|
|
2106
|
+
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin, weights);
|
|
2105
2107
|
}
|
|
2106
|
-
const weights = toWeightCurve(minBinId, maxBinId, activeId);
|
|
2107
|
-
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin, weights);
|
|
2108
2108
|
break;
|
|
2109
2109
|
}
|
|
2110
2110
|
case 3 /* BidAsk */: {
|
|
2111
2111
|
if (activeId < minBinId) {
|
|
2112
|
-
const
|
|
2113
|
-
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin,
|
|
2114
|
-
}
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2112
|
+
const weights = toWeightAscendingOrder(minBinId, maxBinId);
|
|
2113
|
+
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin, weights);
|
|
2114
|
+
} else if (activeId > maxBinId) {
|
|
2115
|
+
const weights = toWeightDecendingOrder(minBinId, maxBinId);
|
|
2116
|
+
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin, weights);
|
|
2117
|
+
} else {
|
|
2118
|
+
const weights = toWeightBidAsk(minBinId, maxBinId, activeId);
|
|
2119
|
+
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin, weights);
|
|
2118
2120
|
}
|
|
2119
|
-
const weights = toWeightBidAsk(minBinId, maxBinId, activeId);
|
|
2120
|
-
res = toAmountBothSide(activeId, binStep, amountX, amountY, amountXInActiveBin, amountYInActiveBin, weights);
|
|
2121
2121
|
break;
|
|
2122
2122
|
}
|
|
2123
2123
|
default:
|
|
@@ -10717,7 +10717,7 @@ var DlmmModule = class {
|
|
|
10717
10717
|
tx.object(CLOCK_ADDRESS)
|
|
10718
10718
|
];
|
|
10719
10719
|
tx.moveCall({
|
|
10720
|
-
target: `${integrate.published_at}::${DlmmScript}::
|
|
10720
|
+
target: `${integrate.published_at}::${DlmmScript}::raise_by_strategy`,
|
|
10721
10721
|
typeArguments,
|
|
10722
10722
|
arguments: args
|
|
10723
10723
|
});
|
|
@@ -10780,7 +10780,7 @@ var DlmmModule = class {
|
|
|
10780
10780
|
tx.object(CLOCK_ADDRESS)
|
|
10781
10781
|
];
|
|
10782
10782
|
tx.moveCall({
|
|
10783
|
-
target: `${integrate.published_at}::${DlmmScript}::
|
|
10783
|
+
target: `${integrate.published_at}::${DlmmScript}::raise_by_strategy_${params.rewards_token.length}`,
|
|
10784
10784
|
typeArguments,
|
|
10785
10785
|
arguments: args
|
|
10786
10786
|
});
|