@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.js
CHANGED
|
@@ -9273,7 +9273,20 @@ var GaugeModule = class {
|
|
|
9273
9273
|
continue;
|
|
9274
9274
|
}
|
|
9275
9275
|
const stakedPositionOfPool = await this.getUserStakedPositionInfoOfPool(userAddr, pool, gauger, coins[0], coins[1]);
|
|
9276
|
-
|
|
9276
|
+
console.log("stakedPositionOfPool", stakedPositionOfPool);
|
|
9277
|
+
stakedPositionOfPool.forEach((value) => {
|
|
9278
|
+
value.infos.forEach((info) => {
|
|
9279
|
+
res.push({
|
|
9280
|
+
coin_type_a: coins[0],
|
|
9281
|
+
coin_type_b: coins[1],
|
|
9282
|
+
liquidity: info.info.liquidity,
|
|
9283
|
+
tick_lower_index: info.info.tick_lower_index.bits,
|
|
9284
|
+
tick_upper_index: info.info.tick_upper_index.bits,
|
|
9285
|
+
pos_object_id: info.info.position_id,
|
|
9286
|
+
pool: info.pool_id
|
|
9287
|
+
});
|
|
9288
|
+
});
|
|
9289
|
+
});
|
|
9277
9290
|
}
|
|
9278
9291
|
return res;
|
|
9279
9292
|
}
|
|
@@ -9281,7 +9294,7 @@ var GaugeModule = class {
|
|
|
9281
9294
|
const tx = new import_transactions11.Transaction();
|
|
9282
9295
|
const { integrate, simulationAccount } = this.sdk.sdkOptions;
|
|
9283
9296
|
const { magma_token, voter_id } = getPackagerConfigs(this.sdk.sdkOptions.magma_config);
|
|
9284
|
-
const typeArguments = [
|
|
9297
|
+
const typeArguments = [poolCoinA, poolCoinB, magma_token];
|
|
9285
9298
|
const args = [tx.object(voter_id), tx.object(gauger), tx.object(pool), tx.pure.address(userAddr), tx.object(CLOCK_ADDRESS)];
|
|
9286
9299
|
tx.moveCall({
|
|
9287
9300
|
target: `${integrate.published_at}::${Gauge}::user_staked_position_infos`,
|
|
@@ -9293,7 +9306,7 @@ var GaugeModule = class {
|
|
|
9293
9306
|
sender: simulationAccount.address
|
|
9294
9307
|
});
|
|
9295
9308
|
if (simulateRes.error != null) {
|
|
9296
|
-
throw new Error(`
|
|
9309
|
+
throw new Error(`user_staked_position_infos error code: ${simulateRes.error ?? "unknown error"}`);
|
|
9297
9310
|
}
|
|
9298
9311
|
const res = [];
|
|
9299
9312
|
simulateRes.events?.forEach((item) => {
|