@clonegod/ttd-sui-common 2.0.18 → 2.0.20

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.
@@ -359,10 +359,12 @@ class AbstractSuiDexTrade extends dist_1.AbastrcatTrade {
359
359
  amountIn: BigInt(q.amountIn),
360
360
  minOut: BigInt(q.amountOutMin),
361
361
  sqrtPriceLimit: 0n,
362
+ pair: pool_info.pair,
362
363
  gasPriceMultiplier: gasMult,
363
364
  };
364
365
  (0, dist_1.log_info)(`[trade] 转发 swap 给集中执行器`, {
365
366
  dex_id: req.dexId, pair: pool_info.pair, a2b, amountIn: req.amountIn.toString(), minOut: req.minOut.toString(),
367
+ ...(gasMult ? { gasPriceMultiplier: gasMult } : {}),
366
368
  });
367
369
  const res = await this.executorClient.requestSwap(req);
368
370
  if (!res.submitted) {
@@ -12,6 +12,7 @@ export interface SwapExecRequest {
12
12
  minOut: bigint;
13
13
  sqrtPriceLimit: bigint;
14
14
  walletAddress?: string;
15
+ pair?: string;
15
16
  gasPriceMultiplier?: number;
16
17
  }
17
18
  export interface SwapExecResult {
@@ -10,6 +10,8 @@ export interface SwapExecRequestWire {
10
10
  minOut: string;
11
11
  sqrtPriceLimit: string;
12
12
  walletAddress?: string;
13
+ pair?: string;
14
+ gasPriceMultiplier?: number;
13
15
  }
14
16
  export interface ExecRequestEnvelope {
15
17
  type: 'swap';
@@ -15,6 +15,8 @@ function toWire(req) {
15
15
  minOut: req.minOut.toString(),
16
16
  sqrtPriceLimit: req.sqrtPriceLimit.toString(),
17
17
  walletAddress: req.walletAddress,
18
+ pair: req.pair,
19
+ gasPriceMultiplier: req.gasPriceMultiplier,
18
20
  };
19
21
  }
20
22
  function fromWire(w) {
@@ -28,5 +30,7 @@ function fromWire(w) {
28
30
  minOut: BigInt(w.minOut),
29
31
  sqrtPriceLimit: BigInt(w.sqrtPriceLimit),
30
32
  walletAddress: w.walletAddress,
33
+ pair: w.pair,
34
+ gasPriceMultiplier: w.gasPriceMultiplier,
31
35
  };
32
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-sui-common",
3
- "version": "2.0.18",
3
+ "version": "2.0.20",
4
4
  "description": "Sui common library",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/index.js",