Skip to content

Commit

Permalink
Add epoch and staking yield entities
Browse files Browse the repository at this point in the history
  • Loading branch information
peroxy committed Jun 11, 2024
1 parent 27b634f commit a3c4b29
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/hubble-db/src/models/EpochEntity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export interface EpochEntity {
id: bigint;
epoch: string;
first_slot: string;
last_slot: string;
start_block_time: Date;
end_block_time: Date;
}
export default EpochEntity;
7 changes: 7 additions & 0 deletions packages/hubble-db/src/models/StakingYieldEntity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export interface StakingYieldEntity {
id: bigint;
created_on: Date;
apy: string;
token_mint_id: number;
}
export default StakingYieldEntity;
4 changes: 4 additions & 0 deletions packages/hubble-db/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ export * from './PointsStakingEntity';
export * from './OwnerScreeningEntity';
export * from './accounting';
export * from './RecentSlotEntity';
export * from './EpochEntity';
export * from './StakingYieldEntity';

export const CLUSTER_TABLE: string = 'cluster';
export const COLLATERAL_TABLE: string = 'collateral';
Expand Down Expand Up @@ -151,6 +153,8 @@ export const ACCOUNTING_CONFIG_TABLE = 'accounting_config';
export const ACCOUNTING_TRANSACTION_TABLE = 'accounting_transaction';
export const ACCOUNTING_BALANCE_TABLE = 'accounting_balance';
export const RECENT_SLOT_TABLE = 'recent_slot';
export const STAKING_YIELD_TABLE = 'staking_yield';
export const EPOCH_TABLE = 'epoch';

export type RESAMPLE_FREQUENCY = 'hour' | 'day';
export const HOURLY_FREQUENCY = 'hour';
Expand Down

0 comments on commit a3c4b29

Please sign in to comment.