four-flap-meme-sdk 1.5.60 → 1.5.61

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.
@@ -249,10 +249,11 @@ export class DexExecutor {
249
249
  });
250
250
  // 执行 handleOps
251
251
  const provider = this.aaManager.getProvider();
252
- const entryPoint = this.aaManager.getEntryPoint();
252
+ const entryPointAddress = this.aaManager.getEntryPointAddress(); // ✅ 直接使用地址,避免 ENS
253
253
  const feeData = await provider.getFeeData();
254
254
  // 使用新 Contract 实例避免 TypeScript 类型问题
255
- const entryPointWithSigner = new Contract(await entryPoint.getAddress(), ['function handleOps((address sender,uint256 nonce,bytes initCode,bytes callData,uint256 callGasLimit,uint256 verificationGasLimit,uint256 preVerificationGas,uint256 maxFeePerGas,uint256 maxPriorityFeePerGas,bytes paymasterAndData,bytes signature)[] ops, address payable beneficiary) external'], wallet);
255
+ const entryPointWithSigner = new Contract(entryPointAddress, // 直接使用地址字符串,避免 getAddress() 触发 ENS
256
+ ['function handleOps((address sender,uint256 nonce,bytes initCode,bytes callData,uint256 callGasLimit,uint256 verificationGasLimit,uint256 preVerificationGas,uint256 maxFeePerGas,uint256 maxPriorityFeePerGas,bytes paymasterAndData,bytes signature)[] ops, address payable beneficiary) external'], wallet);
256
257
  const tx = await entryPointWithSigner.handleOps([signedOp.userOp], wallet.address, { gasPrice: feeData.gasPrice ?? 100000000n });
257
258
  const receipt = await tx.wait();
258
259
  return {
@@ -270,7 +271,7 @@ export class DexExecutor {
270
271
  const wallet = createWallet(privateKey, this.config);
271
272
  const accountInfo = await this.aaManager.getAccountInfo(wallet.address);
272
273
  const provider = this.aaManager.getProvider();
273
- const entryPoint = this.aaManager.getEntryPoint();
274
+ const entryPointAddress = this.aaManager.getEntryPointAddress(); // ✅ 直接使用地址,避免 ENS
274
275
  const feeData = await provider.getFeeData();
275
276
  const path = [tokenAddress, this.wokb];
276
277
  const deadline = this.getDeadline();
@@ -307,7 +308,8 @@ export class DexExecutor {
307
308
  const signedSwap = await this.aaManager.signUserOp(swapOp.userOp, wallet);
308
309
  ops.push(signedSwap.userOp);
309
310
  // 执行(使用新 Contract 实例避免 TypeScript 类型问题)
310
- const entryPointWithSigner = new Contract(await entryPoint.getAddress(), ['function handleOps((address sender,uint256 nonce,bytes initCode,bytes callData,uint256 callGasLimit,uint256 verificationGasLimit,uint256 preVerificationGas,uint256 maxFeePerGas,uint256 maxPriorityFeePerGas,bytes paymasterAndData,bytes signature)[] ops, address payable beneficiary) external'], wallet);
311
+ const entryPointWithSigner = new Contract(entryPointAddress, // 直接使用地址字符串,避免 getAddress() 触发 ENS
312
+ ['function handleOps((address sender,uint256 nonce,bytes initCode,bytes callData,uint256 callGasLimit,uint256 verificationGasLimit,uint256 preVerificationGas,uint256 maxFeePerGas,uint256 maxPriorityFeePerGas,bytes paymasterAndData,bytes signature)[] ops, address payable beneficiary) external'], wallet);
311
313
  const tx = await entryPointWithSigner.handleOps(ops, wallet.address, { gasPrice: feeData.gasPrice ?? 100000000n });
312
314
  const receipt = await tx.wait();
313
315
  return {
@@ -326,7 +328,7 @@ export class DexExecutor {
326
328
  const wallet = createWallet(privateKey, this.config);
327
329
  const accountInfo = await this.aaManager.getAccountInfo(wallet.address);
328
330
  const provider = this.aaManager.getProvider();
329
- const entryPoint = this.aaManager.getEntryPoint();
331
+ const entryPointAddress = this.aaManager.getEntryPointAddress(); // ✅ 直接使用地址,避免 ENS
330
332
  const feeData = await provider.getFeeData();
331
333
  const token = new Contract(quoteTokenAddress, ERC20_ABI, provider);
332
334
  const allowance = await token.allowance(accountInfo.sender, this.routerAddress);
@@ -358,7 +360,8 @@ export class DexExecutor {
358
360
  });
359
361
  const signedSwap = await this.aaManager.signUserOp(swapOp.userOp, wallet);
360
362
  ops.push(signedSwap.userOp);
361
- const entryPointWithSigner = new Contract(await entryPoint.getAddress(), ['function handleOps((address sender,uint256 nonce,bytes initCode,bytes callData,uint256 callGasLimit,uint256 verificationGasLimit,uint256 preVerificationGas,uint256 maxFeePerGas,uint256 maxPriorityFeePerGas,bytes paymasterAndData,bytes signature)[] ops, address payable beneficiary) external'], wallet);
363
+ const entryPointWithSigner = new Contract(entryPointAddress, // 直接使用地址字符串,避免 getAddress() 触发 ENS
364
+ ['function handleOps((address sender,uint256 nonce,bytes initCode,bytes callData,uint256 callGasLimit,uint256 verificationGasLimit,uint256 preVerificationGas,uint256 maxFeePerGas,uint256 maxPriorityFeePerGas,bytes paymasterAndData,bytes signature)[] ops, address payable beneficiary) external'], wallet);
362
365
  const tx = await entryPointWithSigner.handleOps(ops, wallet.address, { gasPrice: feeData.gasPrice ?? 100000000n });
363
366
  const receipt = await tx.wait();
364
367
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "four-flap-meme-sdk",
3
- "version": "1.5.60",
3
+ "version": "1.5.61",
4
4
  "description": "SDK for Flap bonding curve and four.meme TokenManager",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",