@bolt-liquidity-hq/sui-client 0.1.0-beta.15 → 0.1.0-beta.17

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 CHANGED
@@ -98,7 +98,7 @@ var MainnetAssets = {
98
98
  chainId: "101",
99
99
  denom: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
100
100
  decimals: 6,
101
- logo: "https://raw.githubusercontent.com/cosmos/chain-registry/master/noble/images/USDCoin.png",
101
+ logo: "https://raw.githubusercontent.com/cosmos/chain-registry/refs/heads/master/_non-cosmos/ethereum/images/usdc.png",
102
102
  coingeckoId: "usd-coin"
103
103
  }
104
104
  };
@@ -136,7 +136,7 @@ var TestnetAssets = {
136
136
  chainId: "103",
137
137
  denom: "0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29::usdc::USDC",
138
138
  decimals: 6,
139
- logo: "https://raw.githubusercontent.com/cosmos/chain-registry/master/noble/images/USDCoin.png",
139
+ logo: "https://raw.githubusercontent.com/cosmos/chain-registry/refs/heads/master/_non-cosmos/ethereum/images/usdc.png",
140
140
  coingeckoId: "usd-coin"
141
141
  },
142
142
  "::test_btc::TEST_BTC": {
@@ -927,10 +927,11 @@ var PoolInfoStruct = import_bcs8.bcs.struct("PoolInfo", {
927
927
  var PoolFeesInfoStruct = import_bcs8.bcs.struct("PoolFeesInfo", {
928
928
  swap_fee_pct: import_bcs8.bcs.u64(),
929
929
  lp_withdrawal_fee_pct: import_bcs8.bcs.u64(),
930
- lp_fee_pct: import_bcs8.bcs.u64()
930
+ lp_fee_pct: import_bcs8.bcs.u64(),
931
+ max_dynamic_fee: import_bcs8.bcs.u64(),
932
+ limit_ratio: import_bcs8.bcs.u64()
931
933
  });
932
934
  var ProtocolFeesInfoStruct = import_bcs8.bcs.struct("ProtocolFeesInfo", {
933
- bolt_fee_addr: BcsAddressType,
934
935
  swap_fee_pct: import_bcs8.bcs.u64(),
935
936
  lp_withdrawal_fee_pct: import_bcs8.bcs.u64()
936
937
  });
@@ -1194,10 +1195,10 @@ var import_core14 = require("@bolt-liquidity-hq/core");
1194
1195
 
1195
1196
  // src/lib/settlement/parsers.ts
1196
1197
  var import_bignumber4 = require("bignumber.js");
1197
- var parseSettlementConfigStructOutput = (routerClient, poolFeesInfo, protocolFeesInfo, priceOracleContract) => {
1198
+ var parseSettlementConfigStructOutput = (routerClient, poolFeesInfo, priceOracleContract) => {
1198
1199
  return {
1199
1200
  priceOracleContract,
1200
- protocolFeeRecipient: protocolFeesInfo.bolt_fee_addr,
1201
+ protocolFeeRecipient: "0x",
1201
1202
  protocolFee: (0, import_bignumber4.BigNumber)(poolFeesInfo.swap_fee_pct).div(BASIS_POINTS).toFixed(),
1202
1203
  lpFee: (0, import_bignumber4.BigNumber)(poolFeesInfo.lp_fee_pct).div(BASIS_POINTS).toFixed(),
1203
1204
  allowanceMode: "allow",
@@ -1211,33 +1212,20 @@ var parseSettlementConfigStructOutput = (routerClient, poolFeesInfo, protocolFee
1211
1212
  // src/lib/settlement/get-pool-info.ts
1212
1213
  var getPoolInfo = async (client, contractAddress) => {
1213
1214
  const GET_POOL_FEES_INFO_FUNCTION = "get_pool_fees_info";
1214
- const GET_PROTOCOL_FEES_INFO_FUNCTION = "get_protocol_fees_info";
1215
1215
  const pool = client.routerClient.pools.find((item) => item.poolAddress === contractAddress);
1216
1216
  if (!pool) {
1217
1217
  throw new import_core14.NotFoundError(`Pool with the address ${contractAddress}`);
1218
1218
  }
1219
- const [poolFeesInfo, protocolFeesInfo] = await Promise.all([
1220
- // Query pool fee information
1221
- queryDevInspect(
1222
- client.suiClient,
1223
- [client.packageId, POOL_MODULE, GET_POOL_FEES_INFO_FUNCTION],
1224
- [contractAddress],
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
- ]);
1219
+ const poolFeesInfo = await queryDevInspect(
1220
+ client.suiClient,
1221
+ [client.packageId, POOL_MODULE, GET_POOL_FEES_INFO_FUNCTION],
1222
+ [contractAddress],
1223
+ [pool.baseDenom]
1224
+ );
1235
1225
  const poolFeesInfoOutput = parseDevInspectResult(poolFeesInfo, PoolFeesInfoStruct);
1236
- const protocolFeesInfoOutput = parseDevInspectResult(protocolFeesInfo, ProtocolFeesInfoStruct);
1237
1226
  return parseSettlementConfigStructOutput(
1238
1227
  client.routerClient,
1239
1228
  poolFeesInfoOutput,
1240
- protocolFeesInfoOutput,
1241
1229
  client.contracts.oracle
1242
1230
  );
1243
1231
  };