@cetusprotocol/aggregator-sdk 1.6.4 → 1.6.6
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.cjs +99 -18
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +99 -18
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3416,7 +3416,7 @@ var AGGREGATOR_V3_CONFIG = {
|
|
|
3416
3416
|
};
|
|
3417
3417
|
|
|
3418
3418
|
// src/api.ts
|
|
3419
|
-
var SDK_VERSION =
|
|
3419
|
+
var SDK_VERSION = 1010606;
|
|
3420
3420
|
function parseRouterResponse(data, byAmountIn) {
|
|
3421
3421
|
let packages = /* @__PURE__ */ new Map();
|
|
3422
3422
|
if (data.packages) {
|
|
@@ -8413,25 +8413,82 @@ function estimateSwapGasBudget(tx) {
|
|
|
8413
8413
|
|
|
8414
8414
|
// src/utils/msafe.ts
|
|
8415
8415
|
var import_bn5 = __toESM(require_bn());
|
|
8416
|
+
var dealWithMsafePackages = (packages) => {
|
|
8417
|
+
if (!packages) {
|
|
8418
|
+
return packages;
|
|
8419
|
+
}
|
|
8420
|
+
if (packages instanceof Map) {
|
|
8421
|
+
return Object.fromEntries(packages);
|
|
8422
|
+
}
|
|
8423
|
+
if (Array.isArray(packages)) {
|
|
8424
|
+
return Object.fromEntries(packages);
|
|
8425
|
+
}
|
|
8426
|
+
return packages;
|
|
8427
|
+
};
|
|
8428
|
+
var restituteMsafePackages = (packages) => {
|
|
8429
|
+
if (!packages) {
|
|
8430
|
+
return packages;
|
|
8431
|
+
}
|
|
8432
|
+
if (packages instanceof Map) {
|
|
8433
|
+
return packages;
|
|
8434
|
+
}
|
|
8435
|
+
if (Array.isArray(packages)) {
|
|
8436
|
+
return new Map(
|
|
8437
|
+
packages.map(([key, value]) => [key, value?.toString?.() ?? value])
|
|
8438
|
+
);
|
|
8439
|
+
}
|
|
8440
|
+
if (typeof packages === "object") {
|
|
8441
|
+
return new Map(
|
|
8442
|
+
Object.entries(packages).map(([key, value]) => [
|
|
8443
|
+
key,
|
|
8444
|
+
value?.toString?.() ?? value
|
|
8445
|
+
])
|
|
8446
|
+
);
|
|
8447
|
+
}
|
|
8448
|
+
return packages;
|
|
8449
|
+
};
|
|
8450
|
+
var dealWithMsafeExtendedDetails = (extendedDetails) => {
|
|
8451
|
+
if (!extendedDetails) {
|
|
8452
|
+
return extendedDetails;
|
|
8453
|
+
}
|
|
8454
|
+
const result = {
|
|
8455
|
+
...extendedDetails
|
|
8456
|
+
};
|
|
8457
|
+
const afterSqrtPrice = extendedDetails.after_sqrt_price ?? extendedDetails.afterSqrtPrice;
|
|
8458
|
+
if (afterSqrtPrice != null) {
|
|
8459
|
+
result.after_sqrt_price = afterSqrtPrice.toString();
|
|
8460
|
+
}
|
|
8461
|
+
return result;
|
|
8462
|
+
};
|
|
8463
|
+
var restituteMsafeExtendedDetails = (extendedDetails) => {
|
|
8464
|
+
if (!extendedDetails) {
|
|
8465
|
+
return extendedDetails;
|
|
8466
|
+
}
|
|
8467
|
+
const result = {
|
|
8468
|
+
...extendedDetails
|
|
8469
|
+
};
|
|
8470
|
+
const afterSqrtPrice = extendedDetails.after_sqrt_price ?? extendedDetails.afterSqrtPrice;
|
|
8471
|
+
if (afterSqrtPrice != null) {
|
|
8472
|
+
result.after_sqrt_price = new decimal_default(afterSqrtPrice.toString());
|
|
8473
|
+
}
|
|
8474
|
+
return result;
|
|
8475
|
+
};
|
|
8416
8476
|
var dealWithFastRouterSwapParamsForMsafe = (data) => {
|
|
8417
8477
|
const result = {
|
|
8418
8478
|
...data,
|
|
8419
8479
|
amountIn: data?.amountIn?.toString(),
|
|
8420
8480
|
amountOut: data?.amountOut?.toString(),
|
|
8481
|
+
packages: dealWithMsafePackages(data?.packages),
|
|
8421
8482
|
paths: data?.paths?.map((item) => {
|
|
8422
8483
|
const info = {
|
|
8423
8484
|
...item,
|
|
8424
8485
|
amountIn: item?.amountIn?.toString(),
|
|
8425
|
-
amountOut: item?.amountOut?.toString()
|
|
8486
|
+
amountOut: item?.amountOut?.toString(),
|
|
8487
|
+
extendedDetails: dealWithMsafeExtendedDetails(item?.extendedDetails)
|
|
8426
8488
|
};
|
|
8427
8489
|
if (item?.initialPrice) {
|
|
8428
8490
|
info["initialPrice"] = item?.initialPrice?.toString();
|
|
8429
8491
|
}
|
|
8430
|
-
if (item?.extendedDetails?.after_sqrt_price) {
|
|
8431
|
-
info["extendedDetails"] = {
|
|
8432
|
-
after_sqrt_price: item?.extendedDetails?.afterSqrtPrice?.toString()
|
|
8433
|
-
};
|
|
8434
|
-
}
|
|
8435
8492
|
return info;
|
|
8436
8493
|
})
|
|
8437
8494
|
};
|
|
@@ -8442,18 +8499,15 @@ var restituteMsafeFastRouterSwapParams = (data) => {
|
|
|
8442
8499
|
...data,
|
|
8443
8500
|
amountIn: new import_bn5.default(data?.amountIn),
|
|
8444
8501
|
amountOut: new import_bn5.default(data?.amountOut),
|
|
8502
|
+
packages: restituteMsafePackages(data?.packages),
|
|
8445
8503
|
paths: data?.paths?.map((item) => {
|
|
8446
8504
|
const info = {
|
|
8447
|
-
...item
|
|
8505
|
+
...item,
|
|
8506
|
+
extendedDetails: restituteMsafeExtendedDetails(item?.extendedDetails)
|
|
8448
8507
|
};
|
|
8449
8508
|
if (item?.initialPrice) {
|
|
8450
8509
|
info["initialPrice"] = new decimal_default(item?.initialPrice?.toString());
|
|
8451
8510
|
}
|
|
8452
|
-
if (item?.extendedDetails?.after_sqrt_price) {
|
|
8453
|
-
info["extendedDetails"] = {
|
|
8454
|
-
after_sqrt_price: new decimal_default(item?.extendedDetails?.after_sqrt_price?.toString())
|
|
8455
|
-
};
|
|
8456
|
-
}
|
|
8457
8511
|
return info;
|
|
8458
8512
|
})
|
|
8459
8513
|
};
|
|
@@ -8849,7 +8903,8 @@ var MagmaPropAmmRouter = class {
|
|
|
8849
8903
|
}
|
|
8850
8904
|
};
|
|
8851
8905
|
var HaedalPropAmmRouter = class {
|
|
8852
|
-
constructor(_env) {
|
|
8906
|
+
constructor(_env, pythPriceIDs) {
|
|
8907
|
+
this.pythPriceIDs = pythPriceIDs;
|
|
8853
8908
|
}
|
|
8854
8909
|
swap(txb, flattenedPath, swapContext, _extends) {
|
|
8855
8910
|
const path = flattenedPath.path;
|
|
@@ -8882,6 +8937,16 @@ var HaedalPropAmmRouter = class {
|
|
|
8882
8937
|
"HAEDALPROPAMM quote price info object not found in extended details"
|
|
8883
8938
|
);
|
|
8884
8939
|
}
|
|
8940
|
+
if (!extendedDetails.haedalpropamm_base_price_seed) {
|
|
8941
|
+
throw new Error(
|
|
8942
|
+
"HAEDALPROPAMM base price seed not found in extended details"
|
|
8943
|
+
);
|
|
8944
|
+
}
|
|
8945
|
+
if (!extendedDetails.haedalpropamm_quote_price_seed) {
|
|
8946
|
+
throw new Error(
|
|
8947
|
+
"HAEDALPROPAMM quote price seed not found in extended details"
|
|
8948
|
+
);
|
|
8949
|
+
}
|
|
8885
8950
|
}
|
|
8886
8951
|
prepareSwapData(flattenedPath) {
|
|
8887
8952
|
const path = flattenedPath.path;
|
|
@@ -8891,6 +8956,15 @@ var HaedalPropAmmRouter = class {
|
|
|
8891
8956
|
const extendedDetails = path.extendedDetails;
|
|
8892
8957
|
const [baseType, quoteType] = path.direction ? [path.from, path.target] : [path.target, path.from];
|
|
8893
8958
|
const amountIn = flattenedPath.isLastUseOfIntermediateToken ? AGGREGATOR_V3_CONFIG.MAX_AMOUNT_IN : path.amountIn;
|
|
8959
|
+
const basePriceSeed = extendedDetails.haedalpropamm_base_price_seed;
|
|
8960
|
+
const quotePriceSeed = extendedDetails.haedalpropamm_quote_price_seed;
|
|
8961
|
+
const basePriceInfoObject = this.pythPriceIDs.get(basePriceSeed);
|
|
8962
|
+
const quotePriceInfoObject = this.pythPriceIDs.get(quotePriceSeed);
|
|
8963
|
+
if (!basePriceInfoObject || !quotePriceInfoObject) {
|
|
8964
|
+
throw new Error(
|
|
8965
|
+
"HAEDALPROPAMM requires updated Pyth price info objects for both coins"
|
|
8966
|
+
);
|
|
8967
|
+
}
|
|
8894
8968
|
return {
|
|
8895
8969
|
baseType,
|
|
8896
8970
|
quoteType,
|
|
@@ -8899,8 +8973,8 @@ var HaedalPropAmmRouter = class {
|
|
|
8899
8973
|
publishedAt: path.publishedAt,
|
|
8900
8974
|
poolId: extendedDetails.haedalpropamm_pool_id,
|
|
8901
8975
|
regimeId: extendedDetails.haedalpropamm_regime_id,
|
|
8902
|
-
basePriceInfoObject
|
|
8903
|
-
quotePriceInfoObject
|
|
8976
|
+
basePriceInfoObject,
|
|
8977
|
+
quotePriceInfoObject
|
|
8904
8978
|
};
|
|
8905
8979
|
}
|
|
8906
8980
|
executeSwapContract(txb, swapData, swapContext) {
|
|
@@ -9064,7 +9138,8 @@ var PYTH_ORACLE_BASED_DEXES = [
|
|
|
9064
9138
|
HAEDALPMM,
|
|
9065
9139
|
METASTABLE,
|
|
9066
9140
|
STEAMM_OMM_V2,
|
|
9067
|
-
HAEDALHMMV2
|
|
9141
|
+
HAEDALHMMV2,
|
|
9142
|
+
HAEDALPROPAMM
|
|
9068
9143
|
];
|
|
9069
9144
|
function getAllProviders() {
|
|
9070
9145
|
return ALL_DEXES;
|
|
@@ -9124,6 +9199,12 @@ function findPythPriceIDs(paths) {
|
|
|
9124
9199
|
priceIDs.add(path.extendedDetails.haedalhmmv2_base_price_seed);
|
|
9125
9200
|
}
|
|
9126
9201
|
}
|
|
9202
|
+
if (path.provider === HAEDALPROPAMM) {
|
|
9203
|
+
if (path.extendedDetails && path.extendedDetails.haedalpropamm_base_price_seed && path.extendedDetails.haedalpropamm_quote_price_seed) {
|
|
9204
|
+
priceIDs.add(path.extendedDetails.haedalpropamm_base_price_seed);
|
|
9205
|
+
priceIDs.add(path.extendedDetails.haedalpropamm_quote_price_seed);
|
|
9206
|
+
}
|
|
9207
|
+
}
|
|
9127
9208
|
}
|
|
9128
9209
|
return Array.from(priceIDs);
|
|
9129
9210
|
}
|
|
@@ -9331,7 +9412,7 @@ var _AggregatorClient = class _AggregatorClient {
|
|
|
9331
9412
|
case MAGMAPROPAMM:
|
|
9332
9413
|
return new MagmaPropAmmRouter(this.env);
|
|
9333
9414
|
case HAEDALPROPAMM:
|
|
9334
|
-
return new HaedalPropAmmRouter(this.env);
|
|
9415
|
+
return new HaedalPropAmmRouter(this.env, pythPriceIDs);
|
|
9335
9416
|
case CETUS_TIDE:
|
|
9336
9417
|
return new CetusTideRouter();
|
|
9337
9418
|
default:
|
package/dist/index.d.cts
CHANGED
|
@@ -109,6 +109,8 @@ type ExtendedDetails = {
|
|
|
109
109
|
haedalpropamm_pool_id?: string;
|
|
110
110
|
haedalpropamm_regime_id?: string;
|
|
111
111
|
haedalpropamm_oracle_mode?: string;
|
|
112
|
+
haedalpropamm_base_price_seed?: string;
|
|
113
|
+
haedalpropamm_quote_price_seed?: string;
|
|
112
114
|
haedalpropamm_base_price_info_object?: string;
|
|
113
115
|
haedalpropamm_quote_price_info_object?: string;
|
|
114
116
|
cetus_tide_fill?: CetusTideFill;
|
package/dist/index.d.ts
CHANGED
|
@@ -109,6 +109,8 @@ type ExtendedDetails = {
|
|
|
109
109
|
haedalpropamm_pool_id?: string;
|
|
110
110
|
haedalpropamm_regime_id?: string;
|
|
111
111
|
haedalpropamm_oracle_mode?: string;
|
|
112
|
+
haedalpropamm_base_price_seed?: string;
|
|
113
|
+
haedalpropamm_quote_price_seed?: string;
|
|
112
114
|
haedalpropamm_base_price_info_object?: string;
|
|
113
115
|
haedalpropamm_quote_price_info_object?: string;
|
|
114
116
|
cetus_tide_fill?: CetusTideFill;
|
package/dist/index.js
CHANGED
|
@@ -3410,7 +3410,7 @@ var AGGREGATOR_V3_CONFIG = {
|
|
|
3410
3410
|
};
|
|
3411
3411
|
|
|
3412
3412
|
// src/api.ts
|
|
3413
|
-
var SDK_VERSION =
|
|
3413
|
+
var SDK_VERSION = 1010606;
|
|
3414
3414
|
function parseRouterResponse(data, byAmountIn) {
|
|
3415
3415
|
let packages = /* @__PURE__ */ new Map();
|
|
3416
3416
|
if (data.packages) {
|
|
@@ -8407,25 +8407,82 @@ function estimateSwapGasBudget(tx) {
|
|
|
8407
8407
|
|
|
8408
8408
|
// src/utils/msafe.ts
|
|
8409
8409
|
var import_bn5 = __toESM(require_bn());
|
|
8410
|
+
var dealWithMsafePackages = (packages) => {
|
|
8411
|
+
if (!packages) {
|
|
8412
|
+
return packages;
|
|
8413
|
+
}
|
|
8414
|
+
if (packages instanceof Map) {
|
|
8415
|
+
return Object.fromEntries(packages);
|
|
8416
|
+
}
|
|
8417
|
+
if (Array.isArray(packages)) {
|
|
8418
|
+
return Object.fromEntries(packages);
|
|
8419
|
+
}
|
|
8420
|
+
return packages;
|
|
8421
|
+
};
|
|
8422
|
+
var restituteMsafePackages = (packages) => {
|
|
8423
|
+
if (!packages) {
|
|
8424
|
+
return packages;
|
|
8425
|
+
}
|
|
8426
|
+
if (packages instanceof Map) {
|
|
8427
|
+
return packages;
|
|
8428
|
+
}
|
|
8429
|
+
if (Array.isArray(packages)) {
|
|
8430
|
+
return new Map(
|
|
8431
|
+
packages.map(([key, value]) => [key, value?.toString?.() ?? value])
|
|
8432
|
+
);
|
|
8433
|
+
}
|
|
8434
|
+
if (typeof packages === "object") {
|
|
8435
|
+
return new Map(
|
|
8436
|
+
Object.entries(packages).map(([key, value]) => [
|
|
8437
|
+
key,
|
|
8438
|
+
value?.toString?.() ?? value
|
|
8439
|
+
])
|
|
8440
|
+
);
|
|
8441
|
+
}
|
|
8442
|
+
return packages;
|
|
8443
|
+
};
|
|
8444
|
+
var dealWithMsafeExtendedDetails = (extendedDetails) => {
|
|
8445
|
+
if (!extendedDetails) {
|
|
8446
|
+
return extendedDetails;
|
|
8447
|
+
}
|
|
8448
|
+
const result = {
|
|
8449
|
+
...extendedDetails
|
|
8450
|
+
};
|
|
8451
|
+
const afterSqrtPrice = extendedDetails.after_sqrt_price ?? extendedDetails.afterSqrtPrice;
|
|
8452
|
+
if (afterSqrtPrice != null) {
|
|
8453
|
+
result.after_sqrt_price = afterSqrtPrice.toString();
|
|
8454
|
+
}
|
|
8455
|
+
return result;
|
|
8456
|
+
};
|
|
8457
|
+
var restituteMsafeExtendedDetails = (extendedDetails) => {
|
|
8458
|
+
if (!extendedDetails) {
|
|
8459
|
+
return extendedDetails;
|
|
8460
|
+
}
|
|
8461
|
+
const result = {
|
|
8462
|
+
...extendedDetails
|
|
8463
|
+
};
|
|
8464
|
+
const afterSqrtPrice = extendedDetails.after_sqrt_price ?? extendedDetails.afterSqrtPrice;
|
|
8465
|
+
if (afterSqrtPrice != null) {
|
|
8466
|
+
result.after_sqrt_price = new decimal_default(afterSqrtPrice.toString());
|
|
8467
|
+
}
|
|
8468
|
+
return result;
|
|
8469
|
+
};
|
|
8410
8470
|
var dealWithFastRouterSwapParamsForMsafe = (data) => {
|
|
8411
8471
|
const result = {
|
|
8412
8472
|
...data,
|
|
8413
8473
|
amountIn: data?.amountIn?.toString(),
|
|
8414
8474
|
amountOut: data?.amountOut?.toString(),
|
|
8475
|
+
packages: dealWithMsafePackages(data?.packages),
|
|
8415
8476
|
paths: data?.paths?.map((item) => {
|
|
8416
8477
|
const info = {
|
|
8417
8478
|
...item,
|
|
8418
8479
|
amountIn: item?.amountIn?.toString(),
|
|
8419
|
-
amountOut: item?.amountOut?.toString()
|
|
8480
|
+
amountOut: item?.amountOut?.toString(),
|
|
8481
|
+
extendedDetails: dealWithMsafeExtendedDetails(item?.extendedDetails)
|
|
8420
8482
|
};
|
|
8421
8483
|
if (item?.initialPrice) {
|
|
8422
8484
|
info["initialPrice"] = item?.initialPrice?.toString();
|
|
8423
8485
|
}
|
|
8424
|
-
if (item?.extendedDetails?.after_sqrt_price) {
|
|
8425
|
-
info["extendedDetails"] = {
|
|
8426
|
-
after_sqrt_price: item?.extendedDetails?.afterSqrtPrice?.toString()
|
|
8427
|
-
};
|
|
8428
|
-
}
|
|
8429
8486
|
return info;
|
|
8430
8487
|
})
|
|
8431
8488
|
};
|
|
@@ -8436,18 +8493,15 @@ var restituteMsafeFastRouterSwapParams = (data) => {
|
|
|
8436
8493
|
...data,
|
|
8437
8494
|
amountIn: new import_bn5.default(data?.amountIn),
|
|
8438
8495
|
amountOut: new import_bn5.default(data?.amountOut),
|
|
8496
|
+
packages: restituteMsafePackages(data?.packages),
|
|
8439
8497
|
paths: data?.paths?.map((item) => {
|
|
8440
8498
|
const info = {
|
|
8441
|
-
...item
|
|
8499
|
+
...item,
|
|
8500
|
+
extendedDetails: restituteMsafeExtendedDetails(item?.extendedDetails)
|
|
8442
8501
|
};
|
|
8443
8502
|
if (item?.initialPrice) {
|
|
8444
8503
|
info["initialPrice"] = new decimal_default(item?.initialPrice?.toString());
|
|
8445
8504
|
}
|
|
8446
|
-
if (item?.extendedDetails?.after_sqrt_price) {
|
|
8447
|
-
info["extendedDetails"] = {
|
|
8448
|
-
after_sqrt_price: new decimal_default(item?.extendedDetails?.after_sqrt_price?.toString())
|
|
8449
|
-
};
|
|
8450
|
-
}
|
|
8451
8505
|
return info;
|
|
8452
8506
|
})
|
|
8453
8507
|
};
|
|
@@ -8843,7 +8897,8 @@ var MagmaPropAmmRouter = class {
|
|
|
8843
8897
|
}
|
|
8844
8898
|
};
|
|
8845
8899
|
var HaedalPropAmmRouter = class {
|
|
8846
|
-
constructor(_env) {
|
|
8900
|
+
constructor(_env, pythPriceIDs) {
|
|
8901
|
+
this.pythPriceIDs = pythPriceIDs;
|
|
8847
8902
|
}
|
|
8848
8903
|
swap(txb, flattenedPath, swapContext, _extends) {
|
|
8849
8904
|
const path = flattenedPath.path;
|
|
@@ -8876,6 +8931,16 @@ var HaedalPropAmmRouter = class {
|
|
|
8876
8931
|
"HAEDALPROPAMM quote price info object not found in extended details"
|
|
8877
8932
|
);
|
|
8878
8933
|
}
|
|
8934
|
+
if (!extendedDetails.haedalpropamm_base_price_seed) {
|
|
8935
|
+
throw new Error(
|
|
8936
|
+
"HAEDALPROPAMM base price seed not found in extended details"
|
|
8937
|
+
);
|
|
8938
|
+
}
|
|
8939
|
+
if (!extendedDetails.haedalpropamm_quote_price_seed) {
|
|
8940
|
+
throw new Error(
|
|
8941
|
+
"HAEDALPROPAMM quote price seed not found in extended details"
|
|
8942
|
+
);
|
|
8943
|
+
}
|
|
8879
8944
|
}
|
|
8880
8945
|
prepareSwapData(flattenedPath) {
|
|
8881
8946
|
const path = flattenedPath.path;
|
|
@@ -8885,6 +8950,15 @@ var HaedalPropAmmRouter = class {
|
|
|
8885
8950
|
const extendedDetails = path.extendedDetails;
|
|
8886
8951
|
const [baseType, quoteType] = path.direction ? [path.from, path.target] : [path.target, path.from];
|
|
8887
8952
|
const amountIn = flattenedPath.isLastUseOfIntermediateToken ? AGGREGATOR_V3_CONFIG.MAX_AMOUNT_IN : path.amountIn;
|
|
8953
|
+
const basePriceSeed = extendedDetails.haedalpropamm_base_price_seed;
|
|
8954
|
+
const quotePriceSeed = extendedDetails.haedalpropamm_quote_price_seed;
|
|
8955
|
+
const basePriceInfoObject = this.pythPriceIDs.get(basePriceSeed);
|
|
8956
|
+
const quotePriceInfoObject = this.pythPriceIDs.get(quotePriceSeed);
|
|
8957
|
+
if (!basePriceInfoObject || !quotePriceInfoObject) {
|
|
8958
|
+
throw new Error(
|
|
8959
|
+
"HAEDALPROPAMM requires updated Pyth price info objects for both coins"
|
|
8960
|
+
);
|
|
8961
|
+
}
|
|
8888
8962
|
return {
|
|
8889
8963
|
baseType,
|
|
8890
8964
|
quoteType,
|
|
@@ -8893,8 +8967,8 @@ var HaedalPropAmmRouter = class {
|
|
|
8893
8967
|
publishedAt: path.publishedAt,
|
|
8894
8968
|
poolId: extendedDetails.haedalpropamm_pool_id,
|
|
8895
8969
|
regimeId: extendedDetails.haedalpropamm_regime_id,
|
|
8896
|
-
basePriceInfoObject
|
|
8897
|
-
quotePriceInfoObject
|
|
8970
|
+
basePriceInfoObject,
|
|
8971
|
+
quotePriceInfoObject
|
|
8898
8972
|
};
|
|
8899
8973
|
}
|
|
8900
8974
|
executeSwapContract(txb, swapData, swapContext) {
|
|
@@ -9058,7 +9132,8 @@ var PYTH_ORACLE_BASED_DEXES = [
|
|
|
9058
9132
|
HAEDALPMM,
|
|
9059
9133
|
METASTABLE,
|
|
9060
9134
|
STEAMM_OMM_V2,
|
|
9061
|
-
HAEDALHMMV2
|
|
9135
|
+
HAEDALHMMV2,
|
|
9136
|
+
HAEDALPROPAMM
|
|
9062
9137
|
];
|
|
9063
9138
|
function getAllProviders() {
|
|
9064
9139
|
return ALL_DEXES;
|
|
@@ -9118,6 +9193,12 @@ function findPythPriceIDs(paths) {
|
|
|
9118
9193
|
priceIDs.add(path.extendedDetails.haedalhmmv2_base_price_seed);
|
|
9119
9194
|
}
|
|
9120
9195
|
}
|
|
9196
|
+
if (path.provider === HAEDALPROPAMM) {
|
|
9197
|
+
if (path.extendedDetails && path.extendedDetails.haedalpropamm_base_price_seed && path.extendedDetails.haedalpropamm_quote_price_seed) {
|
|
9198
|
+
priceIDs.add(path.extendedDetails.haedalpropamm_base_price_seed);
|
|
9199
|
+
priceIDs.add(path.extendedDetails.haedalpropamm_quote_price_seed);
|
|
9200
|
+
}
|
|
9201
|
+
}
|
|
9121
9202
|
}
|
|
9122
9203
|
return Array.from(priceIDs);
|
|
9123
9204
|
}
|
|
@@ -9325,7 +9406,7 @@ var _AggregatorClient = class _AggregatorClient {
|
|
|
9325
9406
|
case MAGMAPROPAMM:
|
|
9326
9407
|
return new MagmaPropAmmRouter(this.env);
|
|
9327
9408
|
case HAEDALPROPAMM:
|
|
9328
|
-
return new HaedalPropAmmRouter(this.env);
|
|
9409
|
+
return new HaedalPropAmmRouter(this.env, pythPriceIDs);
|
|
9329
9410
|
case CETUS_TIDE:
|
|
9330
9411
|
return new CetusTideRouter();
|
|
9331
9412
|
default:
|