four-flap-meme-sdk 1.7.41 → 1.7.42

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.
@@ -71,11 +71,11 @@ function buildV2BuyCalls(wallets, buyAmounts, tokenAddress, routerAddress) {
71
71
  const amount = buyAmounts[i];
72
72
  if (amount <= 0n)
73
73
  continue;
74
- // 使用 UnifiedDelegate executeBuyV2 函数
74
+ // 修复:使用用户指定的买入金额,而不是 0(使用全部余额会导致严重 bug)
75
75
  const callData = delegateInterface.encodeFunctionData('executeBuyV2', [
76
76
  routerAddress,
77
77
  path,
78
- 0, // amountIn = 0 表示使用钱包余额
78
+ amount, // 使用指定金额
79
79
  ]);
80
80
  calls.push({
81
81
  target: wallet.address,
@@ -97,13 +97,13 @@ function buildV3BuyCalls(wallets, buyAmounts, tokenAddress, routerAddress, fee)
97
97
  const amount = buyAmounts[i];
98
98
  if (amount <= 0n)
99
99
  continue;
100
- // 使用 UnifiedDelegate executeBuy 函数 (V3)
100
+ // 修复:使用用户指定的买入金额,而不是 0(使用全部余额会导致严重 bug)
101
101
  const callData = delegateInterface.encodeFunctionData('executeBuy', [
102
102
  routerAddress,
103
103
  WOKB_ADDRESS,
104
104
  tokenAddress,
105
105
  fee,
106
- 0, // amountIn = 0 表示使用钱包余额
106
+ amount, // 使用指定金额
107
107
  ]);
108
108
  calls.push({
109
109
  target: wallet.address,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "four-flap-meme-sdk",
3
- "version": "1.7.41",
3
+ "version": "1.7.42",
4
4
  "description": "SDK for Flap bonding curve and four.meme TokenManager",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",