From d97e4ce9a5b0e0adb61b2a14cd354e90c6c0ac26 Mon Sep 17 00:00:00 2001 From: ali Date: Mon, 28 Oct 2024 01:52:14 +0330 Subject: [PATCH] update stream times based on production values --- src/scripts/configs.ts | 4 +++- src/scripts/helpers.ts | 7 +++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/scripts/configs.ts b/src/scripts/configs.ts index 0d8a2d55c..9640f181e 100644 --- a/src/scripts/configs.ts +++ b/src/scripts/configs.ts @@ -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'; diff --git a/src/scripts/helpers.ts b/src/scripts/helpers.ts index 564cb3d62..4a5a2708d 100644 --- a/src/scripts/helpers.ts +++ b/src/scripts/helpers.ts @@ -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) { @@ -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, }; }