four-flap-meme-sdk 1.6.63 → 1.6.64

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.
@@ -7,9 +7,10 @@ import { POTATOSWAP_V2_ROUTER, POTATOSWAP_V3_ROUTER, POTATOSWAP_V3_FACTORY, WOKB
7
7
  // 多跳 prefund 估算用的 gas 常量(可配置)
8
8
  const HOP_CALL_GAS_LIMIT = 150000n; // hop 转账操作
9
9
  const DEX_BUY_CALL_GAS_LIMIT = 650000n; // DEX V3 买入操作
10
- // ✅ 增加余额检查 buffer 180% 到 250%,确保 gasPrice 波动时也有足够余额
11
- // 预充值使用 200% buffer,这里使用 250% 作为安全阈值(覆盖更大的 gasPrice 波动)
12
- const PREFUND_BUFFER_PERCENT = 250n; // prefund buffer 百分比 (250 = 2.5x)
10
+ // ✅ 余额检查 buffer 必须和预充值时使用的 buffer 一致
11
+ // hop-wallet-manager.ts 预充值使用 DEFAULT_BUFFER_PERCENT = 200n
12
+ // 这里也使用 200n,确保预充值后检查能通过
13
+ const PREFUND_BUFFER_PERCENT = 200n; // prefund buffer 百分比 (200 = 2.0x)
13
14
  import { AAAccountManager, encodeExecute, encodeExecuteBatch, encodeExecuteViaMulticall3 } from './aa-account.js';
14
15
  import { encodeApproveCall, lpFeeProfileToV3Fee, } from './portal-ops.js';
15
16
  import { DexQuery, encodeSwapExactETHForTokensSupportingFee, encodeSwapExactTokensForETHSupportingFee, encodeSwapExactETHForTokensV3, encodeSwapExactTokensForETHV3, encodeSwapExactTokensForTokensSupportingFee, encodeSwapExactOutputForTokensV3, // ✅ 新增:精确输出买入(V3 exactOutput)
@@ -7,9 +7,10 @@ import { FLAP_PORTAL, ZERO_ADDRESS, MULTICALL3, VERIFICATION_GAS_LIMIT_DEPLOY, V
7
7
  // 多跳 prefund 估算用的 gas 常量(可配置)
8
8
  const HOP_CALL_GAS_LIMIT = 150000n; // hop 转账操作
9
9
  const PORTAL_BUY_CALL_GAS_LIMIT = 450000n; // Portal 买入操作
10
- // ✅ 增加余额检查 buffer 180% 到 250%,确保 gasPrice 波动时也有足够余额
11
- // 预充值使用 200% buffer,这里使用 250% 作为安全阈值(覆盖更大的 gasPrice 波动)
12
- const PREFUND_BUFFER_PERCENT = 250n; // prefund buffer 百分比 (250 = 2.5x)
10
+ // ✅ 余额检查 buffer 必须和预充值时使用的 buffer 一致
11
+ // hop-wallet-manager.ts 预充值使用 DEFAULT_BUFFER_PERCENT = 200n
12
+ // 这里也使用 200n,确保预充值后检查能通过
13
+ const PREFUND_BUFFER_PERCENT = 200n; // prefund buffer 百分比 (200 = 2.0x)
13
14
  import { AAAccountManager, encodeExecute, encodeExecuteBatch, encodeExecuteViaMulticall3 } from './aa-account.js';
14
15
  import { encodeBuyCall, encodeSellCall, encodeBuyCallWithQuote, encodeSellCallWithQuote, encodeApproveCall, PortalQuery, parseOkb, } from './portal-ops.js';
15
16
  import { BundleExecutor } from './bundle.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "four-flap-meme-sdk",
3
- "version": "1.6.63",
3
+ "version": "1.6.64",
4
4
  "description": "SDK for Flap bonding curve and four.meme TokenManager",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",