four-flap-meme-sdk 1.3.26 → 1.3.27

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.
@@ -27,6 +27,7 @@ import { JsonRpcProvider, Transaction } from 'ethers';
27
27
  export class MerkleClient {
28
28
  constructor(config) {
29
29
  // ✅ 区块号缓存(减少 RPC 调用)
30
+ // 注意:TTL 设为 1 秒,确保区块号尽可能新鲜,减少 "Missed inclusion" 风险
30
31
  this.blockNumberCache = null;
31
32
  this.chainId = config.chainId;
32
33
  this.chainName = config.chainId === 56 ? 'bsc' : 'ethereum';
@@ -383,7 +384,7 @@ export class MerkleClient {
383
384
  };
384
385
  }
385
386
  }
386
- MerkleClient.BLOCK_CACHE_TTL_MS = 2000; // 2秒缓存(BSC 约 3 秒出块)
387
+ MerkleClient.BLOCK_CACHE_TTL_MS = 1000; // 1秒缓存(BSC 约 3 秒出块,ETH 约 12 秒)
387
388
  /**
388
389
  * 创建 Merkle 客户端的便捷函数
389
390
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "four-flap-meme-sdk",
3
- "version": "1.3.26",
3
+ "version": "1.3.27",
4
4
  "description": "SDK for Flap bonding curve and four.meme TokenManager",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",