From 5ba0ce7eaa25f3832a13d3fe728760481bea9068 Mon Sep 17 00:00:00 2001 From: Alien Deployer Date: Fri, 18 Oct 2024 02:51:27 +0300 Subject: [PATCH 1/2] minEarn and rewards can be "TBA", add 2 contests --- src/contests.ts | 21 +++++++++++++++++++-- tools/create-contests.ts | 2 ++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/contests.ts b/src/contests.ts index 6e31f0a..abf0ec6 100644 --- a/src/contests.ts +++ b/src/contests.ts @@ -7,9 +7,10 @@ export interface YieldContest { start: number, // end timestamp end: number, - minEarn: number, + // minimal USD income to pass contest + minEarn: number|"TBA", // contest rewards - rewards: Reward[], + rewards: Reward[]|"TBA", // integration of quest platform campaign integration?: { // Intract campaign id @@ -144,4 +145,20 @@ export const contests: { [contestId: string]: YieldContest } = { }, ], }, + "y4": { + // 05 Dec 2024 - 18 Dec 2024 + name: "Yield Contest #4", + start: 1733356800, // Thu, 05 Dec 2024 00:00:00 GMT + end: 1734566399, // Wed, 18 Dec 2024 23:59:59 GMT + minEarn: "TBA", + rewards: "TBA", + }, + "y5": { + // 19 Dec 2024 - 01 Jan 2025 + name: "Yield Contest #5", + start: 1734566400, // Thu, 19 Dec 2024 00:00:00 GMT + end: 1735775999, // Wed, 01 Jan 2025 23:59:59 GMT + minEarn: "TBA", + rewards: "TBA", + }, } diff --git a/tools/create-contests.ts b/tools/create-contests.ts index 889b586..43c7b2b 100644 --- a/tools/create-contests.ts +++ b/tools/create-contests.ts @@ -20,6 +20,8 @@ for (let i = +(lastId.replace('y', '') || 0) + 1; i < +(lastId.replace('y', '') name: "${name}", start: ${start}, // ${new Date(start * 1000).toUTCString()} end: ${end}, // ${new Date(end * 1000).toUTCString()} + minEarn: "TBA", + rewards: "TBA", \},`) prevTs += PERIOD } From e5d0ccee2c69ab5d2fd4466772a51479ef6f3ef2 Mon Sep 17 00:00:00 2001 From: Alien Deployer Date: Fri, 18 Oct 2024 02:57:22 +0300 Subject: [PATCH 2/2] fix contest types test --- tests/contests.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/contests.test.ts b/tests/contests.test.ts index 9425dc8..f81d078 100644 --- a/tests/contests.test.ts +++ b/tests/contests.test.ts @@ -1,4 +1,4 @@ -import {contests, RewardType, YieldContest} from "../src"; +import {contests, Reward, RewardType, YieldContest} from "../src"; describe('testing contests', () => { test('check start less then end', () => { @@ -8,6 +8,6 @@ describe('testing contests', () => { }) test('types', () => { const c: YieldContest = contests["y1"] - expect(c.rewards[0].type).toEqual(RewardType.POINTS) + expect((c.rewards[0] as Reward).type).toEqual(RewardType.POINTS) }) })