@meteora-ag/dynamic-bonding-curve-sdk 1.4.6 → 1.4.7
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.cjs +33 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +33 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -25157,14 +25157,17 @@ var PoolService = class extends DynamicBondingCurveProgram {
|
|
|
25157
25157
|
referralTokenAccount
|
|
25158
25158
|
} = firstBuyParam;
|
|
25159
25159
|
validateSwapAmount(buyAmount);
|
|
25160
|
-
|
|
25161
|
-
|
|
25162
|
-
|
|
25163
|
-
|
|
25164
|
-
|
|
25165
|
-
|
|
25166
|
-
|
|
25167
|
-
|
|
25160
|
+
let rateLimiterApplied = false;
|
|
25161
|
+
if (baseFee.baseFeeMode === 2 /* RateLimiter */) {
|
|
25162
|
+
rateLimiterApplied = isRateLimiterApplied(
|
|
25163
|
+
currentPoint,
|
|
25164
|
+
new (0, _bnjs2.default)(0),
|
|
25165
|
+
swapBaseForQuote ? 0 /* BaseToQuote */ : 1 /* QuoteToBase */,
|
|
25166
|
+
baseFee.secondFactor,
|
|
25167
|
+
baseFee.thirdFactor,
|
|
25168
|
+
new (0, _bnjs2.default)(baseFee.firstFactor)
|
|
25169
|
+
);
|
|
25170
|
+
}
|
|
25168
25171
|
const quoteTokenFlag = await getTokenType(this.connection, quoteMint);
|
|
25169
25172
|
const { inputMint, outputMint, inputTokenProgram, outputTokenProgram } = this.prepareSwapParams(
|
|
25170
25173
|
false,
|
|
@@ -25540,14 +25543,17 @@ var PoolService = class extends DynamicBondingCurveProgram {
|
|
|
25540
25543
|
this.connection,
|
|
25541
25544
|
poolConfigState.activationType
|
|
25542
25545
|
);
|
|
25543
|
-
|
|
25544
|
-
|
|
25545
|
-
|
|
25546
|
-
|
|
25547
|
-
|
|
25548
|
-
|
|
25549
|
-
|
|
25550
|
-
|
|
25546
|
+
let rateLimiterApplied = false;
|
|
25547
|
+
if (poolConfigState.poolFees.baseFee.baseFeeMode === 2 /* RateLimiter */) {
|
|
25548
|
+
rateLimiterApplied = isRateLimiterApplied(
|
|
25549
|
+
currentPoint,
|
|
25550
|
+
poolState.activationPoint,
|
|
25551
|
+
swapBaseForQuote ? 0 /* BaseToQuote */ : 1 /* QuoteToBase */,
|
|
25552
|
+
poolConfigState.poolFees.baseFee.secondFactor,
|
|
25553
|
+
poolConfigState.poolFees.baseFee.thirdFactor,
|
|
25554
|
+
new (0, _bnjs2.default)(poolConfigState.poolFees.baseFee.firstFactor)
|
|
25555
|
+
);
|
|
25556
|
+
}
|
|
25551
25557
|
const { inputMint, outputMint, inputTokenProgram, outputTokenProgram } = this.prepareSwapParams(swapBaseForQuote, poolState, poolConfigState);
|
|
25552
25558
|
const {
|
|
25553
25559
|
ataTokenA: inputTokenAccount,
|
|
@@ -25648,14 +25654,17 @@ var PoolService = class extends DynamicBondingCurveProgram {
|
|
|
25648
25654
|
this.connection,
|
|
25649
25655
|
poolConfigState.activationType
|
|
25650
25656
|
);
|
|
25651
|
-
|
|
25652
|
-
|
|
25653
|
-
|
|
25654
|
-
|
|
25655
|
-
|
|
25656
|
-
|
|
25657
|
-
|
|
25658
|
-
|
|
25657
|
+
let rateLimiterApplied = false;
|
|
25658
|
+
if (poolConfigState.poolFees.baseFee.baseFeeMode === 2 /* RateLimiter */) {
|
|
25659
|
+
rateLimiterApplied = isRateLimiterApplied(
|
|
25660
|
+
currentPoint,
|
|
25661
|
+
poolState.activationPoint,
|
|
25662
|
+
swapBaseForQuote ? 0 /* BaseToQuote */ : 1 /* QuoteToBase */,
|
|
25663
|
+
poolConfigState.poolFees.baseFee.secondFactor,
|
|
25664
|
+
poolConfigState.poolFees.baseFee.thirdFactor,
|
|
25665
|
+
new (0, _bnjs2.default)(poolConfigState.poolFees.baseFee.firstFactor)
|
|
25666
|
+
);
|
|
25667
|
+
}
|
|
25659
25668
|
const { inputMint, outputMint, inputTokenProgram, outputTokenProgram } = this.prepareSwapParams(swapBaseForQuote, poolState, poolConfigState);
|
|
25660
25669
|
const {
|
|
25661
25670
|
ataTokenA: inputTokenAccount,
|