four-flap-meme-sdk 1.6.6 → 1.6.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.
@@ -24,11 +24,14 @@ const V3_ROUTER02_SELL_ABI = [
24
24
  ];
25
25
  function encodeExactInputSingleForV3Sell(params) {
26
26
  const iface = new ethers.Interface(V3_ROUTER02_SELL_ABI);
27
+ // ✅ 修复:address(2) 需要用完整的地址格式,而不是 bigint
28
+ // V3 Router 使用 address(2) 表示将 WETH 发送到 Router 自己,然后通过 unwrapWETH9 转回原生币
29
+ const ADDRESS_THIS = '0x0000000000000000000000000000000000000002';
27
30
  const exactInputSingleData = iface.encodeFunctionData('exactInputSingle', [{
28
31
  tokenIn: params.tokenIn,
29
32
  tokenOut: params.tokenOut,
30
33
  fee: params.fee,
31
- recipient: 2n, // address(2) = Router 自己(需要 unwrap)
34
+ recipient: ADDRESS_THIS, // Router 自己(需要 unwrap)
32
35
  amountIn: params.amountIn,
33
36
  amountOutMinimum: params.amountOutMinimum,
34
37
  sqrtPriceLimitX96: 0n,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "four-flap-meme-sdk",
3
- "version": "1.6.6",
3
+ "version": "1.6.7",
4
4
  "description": "SDK for Flap bonding curve and four.meme TokenManager",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",