@typus/typus-perp-sdk 1.0.54-feat-exp-b → 1.0.54-feat-exp-c

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/src/index.js CHANGED
@@ -39,8 +39,8 @@ exports.STAKE_PACKAGE_ID = exports.NETWORK == "MAINNET"
39
39
  ? "0xc427209145715a00a93d7e674a95c556a7147d79fda1bbaeb1a1cac5f9923966"
40
40
  : "0x220e7ba8923c0c30b57c0baab3bc15d781a39bb294cf7af318c0fc816b5cf7e6";
41
41
  exports.STAKE_PUBLISHED_AT = exports.NETWORK == "MAINNET"
42
- ? "0xd50ea488da2b586c3db4e8ad805e9f8aa4891d315d6fc53517d662c3f6fd1b4c"
43
- : "0x48bd9025da4ca26329cef80cd55282ef7d3659f1d31a4688a6a64e4bd0f88668";
42
+ ? "0xd9965c09d5ad7d69306b7c550b3b135d94b34f98c3adc379a7333fff2f05808b"
43
+ : "0x34ba6bf1893409b1a7494350189e060ee79cc2aba6f0c5e4045af9372d96fe85";
44
44
  exports.STAKE_PKG_V1 = exports.NETWORK == "MAINNET"
45
45
  ? "0xc427209145715a00a93d7e674a95c556a7147d79fda1bbaeb1a1cac5f9923966"
46
46
  : "0x220e7ba8923c0c30b57c0baab3bc15d781a39bb294cf7af318c0fc816b5cf7e6";
@@ -137,15 +137,6 @@ function mintStakeLp(config, tx, pythClient, input) {
137
137
  // console.log(iToken);
138
138
  if (input.userShareId) {
139
139
  harvestStakeReward(config, tx, { stakePool: input.stakePool, userShareId: input.userShareId, user: input.user });
140
- (0, functions_2.snapshot)(tx, {
141
- version: __1.STAKE_POOL_VERSION,
142
- registry: __1.STAKE_POOL,
143
- index: BigInt(0),
144
- clock: constants_1.CLOCK,
145
- userShareId: BigInt(input.userShareId),
146
- typusEcosystemVersion: config.version.typus,
147
- typusUserRegistry: config.registry.typus.user,
148
- });
149
140
  }
150
141
  cToken = constants_1.tokenType[__1.NETWORK][input.cTOKEN];
151
142
  lpCoin = (0, functions_1.mintLp)(tx, [cToken, __1.TLP_TOKEN], {
@@ -202,15 +193,6 @@ function unstakeBurn(config, tx, pythClient, input) {
202
193
  finally { if (e_2) throw e_2.error; }
203
194
  }
204
195
  harvestStakeReward(config, tx, { stakePool: input.stakePool, userShareId: input.userShareId, user: input.user });
205
- (0, functions_2.snapshot)(tx, {
206
- version: __1.STAKE_POOL_VERSION,
207
- registry: __1.STAKE_POOL,
208
- index: BigInt(0),
209
- clock: constants_1.CLOCK,
210
- userShareId: BigInt(input.userShareId),
211
- typusEcosystemVersion: config.version.typus,
212
- typusUserRegistry: config.registry.typus.user,
213
- });
214
196
  lpCoin = (0, functions_2.unstake)(tx, __1.TLP_TOKEN, {
215
197
  version: __1.STAKE_POOL_VERSION,
216
198
  registry: __1.STAKE_POOL,
@@ -364,6 +346,15 @@ function harvestStakeReward(config, tx, input) {
364
346
  var e_4, _a;
365
347
  return __generator(this, function (_b) {
366
348
  iTokens = input.stakePool.incentives.map(function (i) { return i.tokenType.name; });
349
+ (0, functions_2.snapshot)(tx, {
350
+ version: __1.STAKE_POOL_VERSION,
351
+ registry: __1.STAKE_POOL,
352
+ index: BigInt(0),
353
+ clock: constants_1.CLOCK,
354
+ userShareId: BigInt(input.userShareId),
355
+ typusEcosystemVersion: config.version.typus,
356
+ typusUserRegistry: config.registry.typus.user,
357
+ });
367
358
  try {
368
359
  for (iTokens_1 = __values(iTokens), iTokens_1_1 = iTokens_1.next(); !iTokens_1_1.done; iTokens_1_1 = iTokens_1.next()) {
369
360
  iToken = iTokens_1_1.value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typus/typus-perp-sdk",
3
- "version": "1.0.54-feat-exp-b",
3
+ "version": "1.0.54-feat-exp-c",
4
4
  "repository": "https://github.com/Typus-Lab/typus-perp-sdk.git",
5
5
  "author": "Typus",
6
6
  "description": "typus perp sdk",