@bolt-liquidity-hq/sui-client 0.1.0-beta.15 → 0.1.0-beta.16
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 +8 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +8 -22
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -930,7 +930,6 @@ var PoolFeesInfoStruct = import_bcs8.bcs.struct("PoolFeesInfo", {
|
|
|
930
930
|
lp_fee_pct: import_bcs8.bcs.u64()
|
|
931
931
|
});
|
|
932
932
|
var ProtocolFeesInfoStruct = import_bcs8.bcs.struct("ProtocolFeesInfo", {
|
|
933
|
-
bolt_fee_addr: BcsAddressType,
|
|
934
933
|
swap_fee_pct: import_bcs8.bcs.u64(),
|
|
935
934
|
lp_withdrawal_fee_pct: import_bcs8.bcs.u64()
|
|
936
935
|
});
|
|
@@ -1194,10 +1193,10 @@ var import_core14 = require("@bolt-liquidity-hq/core");
|
|
|
1194
1193
|
|
|
1195
1194
|
// src/lib/settlement/parsers.ts
|
|
1196
1195
|
var import_bignumber4 = require("bignumber.js");
|
|
1197
|
-
var parseSettlementConfigStructOutput = (routerClient, poolFeesInfo,
|
|
1196
|
+
var parseSettlementConfigStructOutput = (routerClient, poolFeesInfo, priceOracleContract) => {
|
|
1198
1197
|
return {
|
|
1199
1198
|
priceOracleContract,
|
|
1200
|
-
protocolFeeRecipient:
|
|
1199
|
+
protocolFeeRecipient: "0x",
|
|
1201
1200
|
protocolFee: (0, import_bignumber4.BigNumber)(poolFeesInfo.swap_fee_pct).div(BASIS_POINTS).toFixed(),
|
|
1202
1201
|
lpFee: (0, import_bignumber4.BigNumber)(poolFeesInfo.lp_fee_pct).div(BASIS_POINTS).toFixed(),
|
|
1203
1202
|
allowanceMode: "allow",
|
|
@@ -1211,33 +1210,20 @@ var parseSettlementConfigStructOutput = (routerClient, poolFeesInfo, protocolFee
|
|
|
1211
1210
|
// src/lib/settlement/get-pool-info.ts
|
|
1212
1211
|
var getPoolInfo = async (client, contractAddress) => {
|
|
1213
1212
|
const GET_POOL_FEES_INFO_FUNCTION = "get_pool_fees_info";
|
|
1214
|
-
const GET_PROTOCOL_FEES_INFO_FUNCTION = "get_protocol_fees_info";
|
|
1215
1213
|
const pool = client.routerClient.pools.find((item) => item.poolAddress === contractAddress);
|
|
1216
1214
|
if (!pool) {
|
|
1217
1215
|
throw new import_core14.NotFoundError(`Pool with the address ${contractAddress}`);
|
|
1218
1216
|
}
|
|
1219
|
-
const
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
[pool.baseDenom]
|
|
1226
|
-
),
|
|
1227
|
-
// Query protocol fee information
|
|
1228
|
-
queryDevInspect(
|
|
1229
|
-
client.suiClient,
|
|
1230
|
-
[client.packageId, POOL_MODULE, GET_PROTOCOL_FEES_INFO_FUNCTION],
|
|
1231
|
-
[contractAddress],
|
|
1232
|
-
[pool.baseDenom]
|
|
1233
|
-
)
|
|
1234
|
-
]);
|
|
1217
|
+
const poolFeesInfo = await queryDevInspect(
|
|
1218
|
+
client.suiClient,
|
|
1219
|
+
[client.packageId, POOL_MODULE, GET_POOL_FEES_INFO_FUNCTION],
|
|
1220
|
+
[contractAddress],
|
|
1221
|
+
[pool.baseDenom]
|
|
1222
|
+
);
|
|
1235
1223
|
const poolFeesInfoOutput = parseDevInspectResult(poolFeesInfo, PoolFeesInfoStruct);
|
|
1236
|
-
const protocolFeesInfoOutput = parseDevInspectResult(protocolFeesInfo, ProtocolFeesInfoStruct);
|
|
1237
1224
|
return parseSettlementConfigStructOutput(
|
|
1238
1225
|
client.routerClient,
|
|
1239
1226
|
poolFeesInfoOutput,
|
|
1240
|
-
protocolFeesInfoOutput,
|
|
1241
1227
|
client.contracts.oracle
|
|
1242
1228
|
);
|
|
1243
1229
|
};
|