Skip to content

Commit

Permalink
update stream times based on production values
Browse files Browse the repository at this point in the history
  • Loading branch information
ae2079 committed Oct 27, 2024
1 parent 095d49a commit d97e4ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/scripts/configs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import path from 'path';

export const streamStartDate = 1729500000; // should be timestamp of deploying funding pot contract in secs
export const streamStartDate = 1730196000; // Oct 29, 2024, 10am GMT
export const streamEndDate = 1793268000; // Oct 29, 2026, 10am GMT
export const streamCliff = 31536000; // 1 year in secs = 365 * 24 * 60 * 60

// The URL of the GitHub repository containing the reports
export const repoUrl = 'https://github.com/InverterNetwork/funding-pot.git';
Expand Down
7 changes: 3 additions & 4 deletions src/scripts/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/* eslint-disable no-console */
import fs from 'fs-extra';
import { streamStartDate } from './configs';
import { streamCliff, streamEndDate, streamStartDate } from './configs';
import { AppDataSource } from '../orm';
import { EarlyAccessRound } from '../entities/earlyAccessRound';
import { QfRound } from '../entities/qfRound';

const SIX_MONTH_IN_SEC = 15768000;
const ONE_YEAR_IN_SEC = 31536000;
const TWO_YEARS_IN_SEC = 63072000;

// Function to ensure directory exists or create it
export function ensureDirectoryExists(dirPath: string) {
Expand All @@ -27,8 +26,8 @@ export function toScreamingSnakeCase(str: string): string {
export function getStreamDetails(isEarlyAccess: boolean) {
return {
START: streamStartDate,
CLIFF: isEarlyAccess ? ONE_YEAR_IN_SEC : SIX_MONTH_IN_SEC,
END: streamStartDate + (isEarlyAccess ? TWO_YEARS_IN_SEC : ONE_YEAR_IN_SEC),
CLIFF: isEarlyAccess ? streamCliff : SIX_MONTH_IN_SEC,
END: isEarlyAccess ? streamEndDate : streamStartDate + ONE_YEAR_IN_SEC,
};
}

Expand Down

0 comments on commit d97e4ce

Please sign in to comment.