four-flap-meme-sdk 1.6.43 → 1.6.44

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,7 +7,9 @@ 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
- const PREFUND_BUFFER_PERCENT = 120n; // prefund buffer 百分比 (120 = 1.2x)
10
+ // 增加余额检查 buffer 120% 180%,确保 gasPrice 波动时也有足够余额
11
+ // 预充值使用 200% buffer,这里使用 180% 作为安全阈值
12
+ const PREFUND_BUFFER_PERCENT = 180n; // prefund buffer 百分比 (180 = 1.8x)
11
13
  import { AAAccountManager, encodeExecute, encodeExecuteBatch, encodeExecuteViaMulticall3 } from './aa-account.js';
12
14
  import { encodeApproveCall, lpFeeProfileToV3Fee, } from './portal-ops.js';
13
15
  import { DexQuery, encodeSwapExactETHForTokensSupportingFee, encodeSwapExactTokensForETHSupportingFee, encodeSwapExactETHForTokensV3, encodeSwapExactTokensForETHV3, encodeSwapExactTokensForTokensSupportingFee, } from './dex.js';
@@ -14,7 +14,8 @@ import { VERIFICATION_GAS_LIMIT_DEPLOY, VERIFICATION_GAS_LIMIT_NORMAL, PRE_VERIF
14
14
  // HopWalletManager
15
15
  // ============================================================================
16
16
  const DEFAULT_HOP_CALL_GAS_LIMIT = 150000n;
17
- const DEFAULT_BUFFER_PERCENT = 150n; // 1.5x
17
+ // 增加预充值 buffer 150% 到 200%,确保 gasPrice 波动时也有足够余额
18
+ const DEFAULT_BUFFER_PERCENT = 200n; // 2.0x
18
19
  export class HopWalletManager {
19
20
  constructor(config = {}) {
20
21
  this.config = config;
@@ -7,7 +7,9 @@ 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
- const PREFUND_BUFFER_PERCENT = 120n; // prefund buffer 百分比 (120 = 1.2x)
10
+ // 增加余额检查 buffer 120% 180%,确保 gasPrice 波动时也有足够余额
11
+ // 预充值使用 200% buffer,这里使用 180% 作为安全阈值
12
+ const PREFUND_BUFFER_PERCENT = 180n; // prefund buffer 百分比 (180 = 1.8x)
11
13
  import { AAAccountManager, encodeExecute, encodeExecuteBatch, encodeExecuteViaMulticall3 } from './aa-account.js';
12
14
  import { encodeBuyCall, encodeSellCall, encodeBuyCallWithQuote, encodeSellCallWithQuote, encodeApproveCall, PortalQuery, parseOkb, } from './portal-ops.js';
13
15
  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.43",
3
+ "version": "1.6.44",
4
4
  "description": "SDK for Flap bonding curve and four.meme TokenManager",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",