@meteora-ag/dlmm 1.0.39-rc.34 → 1.0.39-rc.36

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.mjs CHANGED
@@ -5848,6 +5848,10 @@ function findSetBit(startIndex, endIndex, binArrayBitmapExtension) {
5848
5848
  const binArrayOffset = getBinArrayOffset(i);
5849
5849
  const bitmapOffset = getBitmapOffset(i);
5850
5850
  const bitmapChunks = i > 0 ? binArrayBitmapExtension.positiveBinArrayBitmap[bitmapOffset] : binArrayBitmapExtension.negativeBinArrayBitmap[bitmapOffset];
5851
+ console.log(
5852
+ "\u{1F680} ~ bitmapChunks:",
5853
+ bitmapChunks?.map((b) => b.toString())
5854
+ );
5851
5855
  const bitmap = buildBitmapFromU64Arrays(bitmapChunks, 1 /* U512 */);
5852
5856
  if (bitmap.testn(binArrayOffset)) {
5853
5857
  return i;
@@ -5946,6 +5950,17 @@ function findNextBinArrayIndexWithLiquidity(swapForY, activeId, lbPairState, bin
5946
5950
  startBinArrayIndex = BIN_ARRAY_BITMAP_SIZE;
5947
5951
  }
5948
5952
  } else {
5953
+ console.log(
5954
+ ">>>> finNext",
5955
+ startBinArrayIndex.toNumber(),
5956
+ maxBinArrayIndex.toNumber(),
5957
+ binArrayBitmapExtension.negativeBinArrayBitmap.map(
5958
+ (t) => t.map((b) => b.toString())
5959
+ ),
5960
+ binArrayBitmapExtension.positiveBinArrayBitmap.map(
5961
+ (t) => t.map((b) => b.toString())
5962
+ )
5963
+ );
5949
5964
  const binArrayIndex = findSetBit(
5950
5965
  startBinArrayIndex.toNumber(),
5951
5966
  maxBinArrayIndex.toNumber(),
@@ -5962,7 +5977,6 @@ function findNextBinArrayIndexWithLiquidity(swapForY, activeId, lbPairState, bin
5962
5977
  const bitmapType = 0 /* U1024 */;
5963
5978
  const bitmapDetail = bitmapTypeDetail(bitmapType);
5964
5979
  const offset = startBinArrayIndex.add(BIN_ARRAY_BITMAP_SIZE);
5965
- console.log(lbPairState.binArrayBitmap?.map((b) => b.toString()));
5966
5980
  const bitmap = buildBitmapFromU64Arrays(
5967
5981
  lbPairState.binArrayBitmap,
5968
5982
  bitmapType