@cetusprotocol/aggregator-sdk 0.0.0-experimental-20241216120506 → 0.0.0-experimental-20241216203328

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/index.js CHANGED
@@ -6148,7 +6148,9 @@ var HaedalPmm = class {
6148
6148
  this.pythClient = new pythSuiJs.SuiPythClient(suiClient, pythStateId, wormholeStateId);
6149
6149
  } else {
6150
6150
  this.connection = new pythSuiJs.SuiPriceServiceConnection("https://hermes.pyth.network");
6151
- throw new Error("Haedal pmm is not supported on mainnet");
6151
+ const wormholeStateId = "0xaeab97f96cf9877fee2883315d459552b2b921edc16d7ceac6eab944dd88919c";
6152
+ const pythStateId = "0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8";
6153
+ this.pythClient = new pythSuiJs.SuiPythClient(suiClient, pythStateId, wormholeStateId);
6152
6154
  }
6153
6155
  }
6154
6156
  swap(client, txb, path, inputCoin) {
@@ -6177,7 +6179,7 @@ var HaedalPmm = class {
6177
6179
  txb.object(CLOCK_ADDRESS)
6178
6180
  ];
6179
6181
  const res = txb.moveCall({
6180
- target: `${client.publishedAtV2()}::haedal_pmm::${func}`,
6182
+ target: `${client.publishedAtV2()}::haedalpmm::${func}`,
6181
6183
  typeArguments: [coinAType, coinBType],
6182
6184
  arguments: args
6183
6185
  });
package/dist/index.mjs CHANGED
@@ -6146,7 +6146,9 @@ var HaedalPmm = class {
6146
6146
  this.pythClient = new SuiPythClient(suiClient, pythStateId, wormholeStateId);
6147
6147
  } else {
6148
6148
  this.connection = new SuiPriceServiceConnection("https://hermes.pyth.network");
6149
- throw new Error("Haedal pmm is not supported on mainnet");
6149
+ const wormholeStateId = "0xaeab97f96cf9877fee2883315d459552b2b921edc16d7ceac6eab944dd88919c";
6150
+ const pythStateId = "0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8";
6151
+ this.pythClient = new SuiPythClient(suiClient, pythStateId, wormholeStateId);
6150
6152
  }
6151
6153
  }
6152
6154
  swap(client, txb, path, inputCoin) {
@@ -6175,7 +6177,7 @@ var HaedalPmm = class {
6175
6177
  txb.object(CLOCK_ADDRESS)
6176
6178
  ];
6177
6179
  const res = txb.moveCall({
6178
- target: `${client.publishedAtV2()}::haedal_pmm::${func}`,
6180
+ target: `${client.publishedAtV2()}::haedalpmm::${func}`,
6179
6181
  typeArguments: [coinAType, coinBType],
6180
6182
  arguments: args
6181
6183
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cetusprotocol/aggregator-sdk",
3
- "version": "0.0.0-experimental-20241216120506",
3
+ "version": "0.0.0-experimental-20241216203328",
4
4
  "sideEffects": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,7 +19,9 @@ export class HaedalPmm implements Dex {
19
19
  this.pythClient = new SuiPythClient(suiClient, pythStateId, wormholeStateId)
20
20
  } else {
21
21
  this.connection = new SuiPriceServiceConnection("https://hermes.pyth.network")
22
- throw new Error("Haedal pmm is not supported on mainnet")
22
+ const wormholeStateId = "0xaeab97f96cf9877fee2883315d459552b2b921edc16d7ceac6eab944dd88919c";
23
+ const pythStateId = "0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8";
24
+ this.pythClient = new SuiPythClient(suiClient, pythStateId, wormholeStateId)
23
25
  }
24
26
  }
25
27
 
@@ -58,7 +60,7 @@ export class HaedalPmm implements Dex {
58
60
  txb.object(CLOCK_ADDRESS),
59
61
  ]
60
62
  const res = txb.moveCall({
61
- target: `${client.publishedAtV2()}::haedal_pmm::${func}`,
63
+ target: `${client.publishedAtV2()}::haedalpmm::${func}`,
62
64
  typeArguments: [coinAType, coinBType],
63
65
  arguments: args,
64
66
  }) as TransactionArgument
@@ -108,7 +108,7 @@ describe("router module", () => {
108
108
  test("Build router tx", async () => {
109
109
  const byAmountIn = true
110
110
  const amount = "3574839"
111
- const target = "0xaafc4f740de0dd0dde642a31148fb94517087052f19afb0f7bed1dc41a50c77b::scallop_sui::SCALLOP_SUI"
111
+ const target = "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC"
112
112
  const from = "0x2::sui::SUI"
113
113
 
114
114
  const res = await client.findRouters({
@@ -117,7 +117,7 @@ describe("router module", () => {
117
117
  amount: new BN(amount),
118
118
  byAmountIn,
119
119
  depth: 3,
120
- providers: ["SCALLOP"],
120
+ providers: ["HAEDALPMM"],
121
121
  })
122
122
 
123
123
  if (res != null) {