Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecot committed Jan 24, 2025
1 parent bcc6c4a commit afbec49
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
macos_query_port_pid \
query_endpoints_full_tests_all

bun_create_migrations:
create_migrations:
bun run generate

bun_build:
build:
bun run build --verbose

bun_clean_cache:
clean_cache:
bun pm cache rm

docker_build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ interface MainnetActiveProvidersResponse {
providers: string[];
}

interface ProcessedInfoItem {
export interface ProcessedInfoItem {
source: string;
amount: ProcessedTokenArray;
}

interface BlockMetadata {
export interface BlockMetadata {
height: number;
time: string;
seconds_off: number;
date: string;
}

interface ProviderRewardsData {
export interface ProviderRewardsData {
providers: Array<{
address: string;
rewards_by_block: {
Expand Down Expand Up @@ -192,7 +192,7 @@ async function processRewardsResponse(rewards: EstimatedRewardsResponse): Promis
};
}

async function GenLavaLatestProviderRewards(): Promise<ProviderRewardsData> {
export async function GenLavaLatestProviderRewards(): Promise<ProviderRewardsData> {
// logger.info('Generating latest provider rewards...');

const latestBlock = await getMainnetLatestBlock();
Expand Down Expand Up @@ -289,8 +289,3 @@ async function GenLavaLatestProviderRewards(): Promise<ProviderRewardsData> {
}
};
}

export {
GenLavaLatestProviderRewards,
ProviderRewardsData
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { logger } from '@jsinfo/utils/logger';
import { RedisResourceBase } from '@jsinfo/redis/classes/RedisResourceBase';
import { BlockMetadata, GenLavaLatestProviderRewards, ProcessedInfoItem, ProviderRewardsData } from './MainnetGenLavaLatestProviderRewards';
import {
BlockMetadata,
GenLavaLatestProviderRewards,
ProcessedInfoItem,
ProviderRewardsData
} from './MainnetGenLavaLatestProviderRewards';
import * as fs from 'fs';
import * as path from 'path';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class MainnetProviderEstimatedRewardsSpecFilterResource extends RedisResourceBas
}
acc[normalizedSource].push(info.amount.tokens);
return acc;
}, {} as Record<string, Array<Array<{ amount: string; denom: string; original_denom: string; value_usd: string }>>>)
}, {} as Record<string, Array<{ amount: string; denom: string; original_denom: string; value_usd: string; }[]>>)
).map(([source, tokenArrays]) => ({
source,
rewards: this.sumTokens(tokenArrays.flat())
Expand Down

0 comments on commit afbec49

Please sign in to comment.