four-flap-meme-sdk 1.5.70 → 1.5.72
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.
|
@@ -1073,7 +1073,10 @@ dexKey, version) {
|
|
|
1073
1073
|
// DYORSwap 使用 SwapRouter02 风格(multicall)
|
|
1074
1074
|
return DIRECT_ROUTERS.XLAYER.DYORSWAP_ROUTER;
|
|
1075
1075
|
}
|
|
1076
|
-
//
|
|
1076
|
+
// ✅ 修复:根据 version 返回正确的 PotatoSwap Router
|
|
1077
|
+
if (version === 'v3') {
|
|
1078
|
+
return DIRECT_ROUTERS.XLAYER.POTATOSWAP_V3;
|
|
1079
|
+
}
|
|
1077
1080
|
return DIRECT_ROUTERS.XLAYER.POTATOSWAP_V2;
|
|
1078
1081
|
}
|
|
1079
1082
|
throw new Error(`Unsupported chain/dex combination: ${chain}/${dexKey}`);
|
package/dist/xlayer/bundle.js
CHANGED
|
@@ -1607,6 +1607,11 @@ export class BundleExecutor {
|
|
|
1607
1607
|
const info = curveBuyerInfos[i];
|
|
1608
1608
|
const buyData = encodeBuyCall(tokenAddress, amount, 0n);
|
|
1609
1609
|
const buyCallData = encodeExecute(FLAP_PORTAL, amount, buyData);
|
|
1610
|
+
// ✅ 判断是否是最后一笔内盘买入(触发毕业的那笔)
|
|
1611
|
+
const isGraduationTrigger = (i === curveBuyers.length - 1);
|
|
1612
|
+
const callGasLimit = isGraduationTrigger
|
|
1613
|
+
? 7000000n // 毕业触发交易需要更高 gas
|
|
1614
|
+
: (effConfig.fixedGas?.callGasLimit ?? 800000n); // 其他买入使用前端配置或默认值
|
|
1610
1615
|
const buyOpRes = await aaManager.buildUserOpWithFixedGas({
|
|
1611
1616
|
ownerWallet: wallet,
|
|
1612
1617
|
sender: info.sender,
|
|
@@ -1614,7 +1619,7 @@ export class BundleExecutor {
|
|
|
1614
1619
|
nonce: nonceMap.next(info.sender),
|
|
1615
1620
|
initCode: info.deployed ? '0x' : (await aaManager.generateInitCode(wallet.address)),
|
|
1616
1621
|
deployed: info.deployed,
|
|
1617
|
-
fixedGas: { callGasLimit
|
|
1622
|
+
fixedGas: { callGasLimit }
|
|
1618
1623
|
});
|
|
1619
1624
|
const signedBuyOp = await aaManager.signUserOp(buyOpRes.userOp, wallet);
|
|
1620
1625
|
return signedBuyOp.userOp;
|
|
@@ -1643,7 +1648,7 @@ export class BundleExecutor {
|
|
|
1643
1648
|
nonce: nonceMap.next(info.sender),
|
|
1644
1649
|
initCode: info.deployed ? '0x' : (await aaManager.generateInitCode(wallet.address)),
|
|
1645
1650
|
deployed: info.deployed,
|
|
1646
|
-
fixedGas: { callGasLimit: 600000n }
|
|
1651
|
+
fixedGas: { callGasLimit: effConfig.fixedGas?.callGasLimit ?? 600000n }
|
|
1647
1652
|
});
|
|
1648
1653
|
const signedDexBuyOp = await aaManager.signUserOp(dexBuyOpRes.userOp, wallet);
|
|
1649
1654
|
return signedDexBuyOp.userOp;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "four-flap-meme-sdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.72",
|
|
4
4
|
"description": "SDK for Flap bonding curve and four.meme TokenManager",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"typescript": "^5.6.3"
|
|
38
38
|
}
|
|
39
|
-
}
|
|
39
|
+
}
|