-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: snapshotPeriod entity introduced feat: execute poolSnapshots after epoch execution BREAKING CHANGE: `periodStart` deprecated on Snapshots. Substituted by `period` foreign key
- Loading branch information
Showing
9 changed files
with
148 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { SnapshotPeriod } from '../../types/models/SnapshotPeriod' | ||
export class SnapshotPeriodService extends SnapshotPeriod { | ||
static init(periodStart: Date) { | ||
const id = periodStart.toISOString() | ||
const day = periodStart.getUTCDate() | ||
const weekday = periodStart.getUTCDay() | ||
const month = periodStart.getUTCMonth() | ||
const year = periodStart.getUTCFullYear() | ||
logger.info(`Initialising new SnapshotPeriod with Id ${chainId}`) | ||
return new this(id,periodStart,day,weekday,month,year) | ||
} | ||
} |
Oops, something went wrong.