@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.
package/lib/core/gaugeMath.d.ts
CHANGED
|
@@ -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):
|
|
38
|
+
static getGaugeApy({ quota, voteAfter, vote }: GetGaugeApyProps): bigint | null;
|
|
39
39
|
}
|
|
40
40
|
export {};
|
package/lib/core/gaugeMath.js
CHANGED
|
@@ -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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
386
|
+
(0, chai_1.expect)(r).to.be.eql(5555n);
|
|
387
387
|
});
|
|
388
388
|
});
|