@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 +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
- package/src/transaction/haedal_pmm.ts +4 -2
- package/tests/router.test.ts +2 -2
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
|
-
|
|
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()}::
|
|
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
|
-
|
|
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()}::
|
|
6180
|
+
target: `${client.publishedAtV2()}::haedalpmm::${func}`,
|
|
6179
6181
|
typeArguments: [coinAType, coinBType],
|
|
6180
6182
|
arguments: args
|
|
6181
6183
|
});
|
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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()}::
|
|
63
|
+
target: `${client.publishedAtV2()}::haedalpmm::${func}`,
|
|
62
64
|
typeArguments: [coinAType, coinBType],
|
|
63
65
|
arguments: args,
|
|
64
66
|
}) as TransactionArgument
|
package/tests/router.test.ts
CHANGED
|
@@ -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 = "
|
|
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: ["
|
|
120
|
+
providers: ["HAEDALPMM"],
|
|
121
121
|
})
|
|
122
122
|
|
|
123
123
|
if (res != null) {
|