four-flap-meme-sdk 1.6.74 → 1.6.75
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.
- package/dist/xlayer/wash-ops.js +3 -4
- package/package.json +1 -1
package/dist/xlayer/wash-ops.js
CHANGED
|
@@ -266,19 +266,18 @@ export async function buildWashOps(params) {
|
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
268
|
else if (poolType === 'v3') {
|
|
269
|
-
// ✅ V3 报价:使用 slot0
|
|
269
|
+
// ✅ V3 报价:使用 slot0 现货价(不加安全边际,确保卖干净)
|
|
270
270
|
expectedTokenAmounts = await mapWithConcurrency(buyWeiList, 4, async (buyWei) => {
|
|
271
271
|
if (buyWei <= 0n)
|
|
272
272
|
return 0n;
|
|
273
273
|
try {
|
|
274
|
-
//
|
|
275
|
-
|
|
274
|
+
// 直接使用 slot0 现货价(无币模式需要卖干净,不留残余)
|
|
275
|
+
return await quoteV3BuyViaSlot0({
|
|
276
276
|
rpcUrl: config.rpcUrl,
|
|
277
277
|
tokenAddress: params.tokenAddress,
|
|
278
278
|
wokbAmount: buyWei,
|
|
279
279
|
fee: v3Fee,
|
|
280
280
|
});
|
|
281
|
-
return (slotQuoted * 95n) / 100n;
|
|
282
281
|
}
|
|
283
282
|
catch {
|
|
284
283
|
return 0n;
|