Skip to content

Commit

Permalink
Merge pull request #54 from stabilitydao/alien-dev
Browse files Browse the repository at this point in the history
minEarn and rewards can be "TBA", add 2 contests
  • Loading branch information
a17 authored Oct 17, 2024
2 parents de56e8d + e5d0cce commit 6dd0ede
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
21 changes: 19 additions & 2 deletions src/contests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
},
}
4 changes: 2 additions & 2 deletions tests/contests.test.ts
Original file line number Diff line number Diff line change
@@ -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', () => {
Expand All @@ -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)
})
})
2 changes: 2 additions & 0 deletions tools/create-contests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 6dd0ede

Please sign in to comment.