@magmaprotocol/magma-clmm-sdk 0.5.13 → 0.5.15
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 +16 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9070,7 +9070,20 @@ var GaugeModule = class {
|
|
|
9070
9070
|
continue;
|
|
9071
9071
|
}
|
|
9072
9072
|
const stakedPositionOfPool = await this.getUserStakedPositionInfoOfPool(userAddr, pool, gauger, coins[0], coins[1]);
|
|
9073
|
-
|
|
9073
|
+
console.log("stakedPositionOfPool", stakedPositionOfPool);
|
|
9074
|
+
stakedPositionOfPool.forEach((value) => {
|
|
9075
|
+
value.infos.forEach((info) => {
|
|
9076
|
+
res.push({
|
|
9077
|
+
coin_type_a: coins[0],
|
|
9078
|
+
coin_type_b: coins[1],
|
|
9079
|
+
liquidity: info.info.liquidity,
|
|
9080
|
+
tick_lower_index: info.info.tick_lower_index.bits,
|
|
9081
|
+
tick_upper_index: info.info.tick_upper_index.bits,
|
|
9082
|
+
pos_object_id: info.info.position_id,
|
|
9083
|
+
pool: info.pool_id
|
|
9084
|
+
});
|
|
9085
|
+
});
|
|
9086
|
+
});
|
|
9074
9087
|
}
|
|
9075
9088
|
return res;
|
|
9076
9089
|
}
|
|
@@ -9078,7 +9091,7 @@ var GaugeModule = class {
|
|
|
9078
9091
|
const tx = new Transaction11();
|
|
9079
9092
|
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
9080
9093
|
const { magma_token, voter_id } = getPackagerConfigs(this.sdk.sdkOptions.magma_config);
|
|
9081
|
-
const typeArguments = [
|
|
9094
|
+
const typeArguments = [poolCoinA, poolCoinB, magma_token];
|
|
9082
9095
|
const args = [tx.object(voter_id), tx.object(gauger), tx.object(pool), tx.pure.address(userAddr), tx.object(CLOCK_ADDRESS)];
|
|
9083
9096
|
tx.moveCall({
|
|
9084
9097
|
target: `${integrate.published_at}::${Gauge}::user_staked_position_infos`,
|
|
@@ -9090,7 +9103,7 @@ var GaugeModule = class {
|
|
|
9090
9103
|
sender: simulationAccount.address
|
|
9091
9104
|
});
|
|
9092
9105
|
if (simulateRes.error != null) {
|
|
9093
|
-
throw new Error(`
|
|
9106
|
+
throw new Error(`user_staked_position_infos error code: ${simulateRes.error ?? "unknown error"}`);
|
|
9094
9107
|
}
|
|
9095
9108
|
const res = [];
|
|
9096
9109
|
simulateRes.events?.forEach((item) => {
|