@gearbox-protocol/sdk 3.0.0-next.187 → 3.0.0-next.188

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.
@@ -35,6 +35,6 @@ export declare class GaugeMath {
35
35
  private static removeVotes;
36
36
  static revertVote({ balanceAfter, initialVote, nextVoteType, voteAfter, }: UnvoteProps): bigint | undefined;
37
37
  static getBaseVote: (v: GaugeQuotaParams) => BaseVote | undefined;
38
- static getGaugeApy({ quota, voteAfter, vote }: GetGaugeApyProps): number | bigint | null;
38
+ static getGaugeApy({ quota, voteAfter, vote }: GetGaugeApyProps): bigint | null;
39
39
  }
40
40
  export {};
@@ -99,7 +99,7 @@ class GaugeMath {
99
99
  if (total === 0n)
100
100
  return quota.minRate;
101
101
  const r = (caImpact + lpImpact) / total;
102
- return Number(r);
102
+ return r;
103
103
  }
104
104
  }
105
105
  exports.GaugeMath = GaugeMath;
@@ -301,7 +301,7 @@ describe("GaugeMath getGaugeApy() test", () => {
301
301
  const r = gaugeMath_1.GaugeMath.getGaugeApy({
302
302
  quota,
303
303
  });
304
- (0, chai_1.expect)(r).to.be.eql(5000);
304
+ (0, chai_1.expect)(r).to.be.eql(5000n);
305
305
  });
306
306
  it("should calculate quota with prev vote", () => {
307
307
  const quota = {
@@ -317,7 +317,7 @@ describe("GaugeMath getGaugeApy() test", () => {
317
317
  quota,
318
318
  vote,
319
319
  });
320
- (0, chai_1.expect)(r).to.be.eql(5000);
320
+ (0, chai_1.expect)(r).to.be.eql(5000n);
321
321
  });
322
322
  it("should calculate quota with same vote increase", () => {
323
323
  const quota = {
@@ -338,7 +338,7 @@ describe("GaugeMath getGaugeApy() test", () => {
338
338
  vote,
339
339
  voteAfter,
340
340
  });
341
- (0, chai_1.expect)(r).to.be.eql(4761);
341
+ (0, chai_1.expect)(r).to.be.eql(4761n);
342
342
  });
343
343
  it("should calculate quota with different vote increase", () => {
344
344
  const quota = {
@@ -362,7 +362,7 @@ describe("GaugeMath getGaugeApy() test", () => {
362
362
  vote,
363
363
  voteAfter,
364
364
  });
365
- (0, chai_1.expect)(r).to.be.eql(6315);
365
+ (0, chai_1.expect)(r).to.be.eql(6315n);
366
366
  });
367
367
  it("should calculate quota with vote remove", () => {
368
368
  const quota = {
@@ -383,6 +383,6 @@ describe("GaugeMath getGaugeApy() test", () => {
383
383
  vote,
384
384
  voteAfter,
385
385
  });
386
- (0, chai_1.expect)(r).to.be.eql(5555);
386
+ (0, chai_1.expect)(r).to.be.eql(5555n);
387
387
  });
388
388
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "3.0.0-next.187",
3
+ "version": "3.0.0-next.188",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",