diff --git a/db/schema/020__tables/001/create_table__efp_leaderboard.sql b/db/schema/020__tables/001/create_table__efp_leaderboard.sql index 3870ae4..8756085 100644 --- a/db/schema/020__tables/001/create_table__efp_leaderboard.sql +++ b/db/schema/020__tables/001/create_table__efp_leaderboard.sql @@ -4,8 +4,8 @@ ------------------------------------------------------------------------------- CREATE TABLE public.efp_leaderboard ( - "name" TEXT NOT NULL, "address" types.eth_address NOT NULL, + "name" TEXT, "avatar" TEXT, "mutuals" BIGINT, "following" BIGINT, diff --git a/db/schema/050__views/002/events__efp_accounts_with_primary_list/create_view__events__efp_accounts_with_primary_list.sql b/db/schema/050__views/002/events__efp_accounts_with_primary_list/create_view__events__efp_accounts_with_primary_list.sql index e1788d0..39465a2 100644 --- a/db/schema/050__views/002/events__efp_accounts_with_primary_list/create_view__events__efp_accounts_with_primary_list.sql +++ b/db/schema/050__views/002/events__efp_accounts_with_primary_list/create_view__events__efp_accounts_with_primary_list.sql @@ -32,10 +32,10 @@ OR REPLACE VIEW public.view__events__efp_accounts_with_primary_list AS SELECT v.user as address, v.token_id as primary_list_token_id -FROM efp_lists as v, efp_account_metadata AS meta +FROM public.efp_lists as v, public.efp_account_metadata AS meta WHERE meta.address = v.user AND - convert_hex_to_bigint(meta.value) = v.token_id; + public.convert_hex_to_bigint(meta.value) = v.token_id; -- migrate:down diff --git a/db/schema/050__views/003/events__efp_list_records_with_manager_user_tags/create_view__events__efp_list_records_with_manager_user_tags.sql b/db/schema/050__views/003/events__efp_list_records_with_manager_user_tags/create_view__events__efp_list_records_with_manager_user_tags.sql index 9da95fb..49b9551 100644 --- a/db/schema/050__views/003/events__efp_list_records_with_manager_user_tags/create_view__events__efp_list_records_with_manager_user_tags.sql +++ b/db/schema/050__views/003/events__efp_list_records_with_manager_user_tags/create_view__events__efp_list_records_with_manager_user_tags.sql @@ -33,7 +33,7 @@ FROM LEFT JOIN PUBLIC.efp_lists AS l ON l.list_storage_location_chain_id = record_tags.chain_id AND l.list_storage_location_contract_address = record_tags.contract_address AND l.list_storage_location_slot = record_tags.slot - INNER JOIN efp_account_metadata meta ON l.user = meta.address AND l.token_id = convert_hex_to_bigint(meta.value); + INNER JOIN public.efp_account_metadata meta ON l.user = meta.address AND l.token_id = public.convert_hex_to_bigint(meta.value); diff --git a/src/database/generated/index.ts b/src/database/generated/index.ts index b6c4586..beb2205 100644 --- a/src/database/generated/index.ts +++ b/src/database/generated/index.ts @@ -41,6 +41,18 @@ export interface EfpAccountMetadata { value: string } +export interface EfpLeaderboard { + address: string + avatar: string | null + blocks: Int8 | null + created_at: Generated + followers: Int8 | null + following: Int8 | null + mutuals: Int8 | null + name: string + updated_at: Generated +} + export interface EfpListMetadata { chain_id: Int8 contract_address: string @@ -300,6 +312,7 @@ export interface ViewLatestFollows { export interface DB { contracts: Contracts efp_account_metadata: EfpAccountMetadata + efp_leaderboard: EfpLeaderboard efp_list_metadata: EfpListMetadata efp_list_nfts: EfpListNfts efp_list_ops: EfpListOps diff --git a/src/pubsub/publisher/event-interleaver.ts b/src/pubsub/publisher/event-interleaver.ts index 8d1cd38..20a73b6 100644 --- a/src/pubsub/publisher/event-interleaver.ts +++ b/src/pubsub/publisher/event-interleaver.ts @@ -149,7 +149,7 @@ export class EventInterleaver implements EventPublisher, EventSubscriber { async #processQueue(): Promise { const now = new Date() - const batchSize = 10 + const batchSize = 100 // Muted by user // biome-ignore lint/nursery/noEvolvingTypes: let batch = [] @@ -166,7 +166,7 @@ export class EventInterleaver implements EventPublisher, EventSubscriber { await this.#propagateBatch(batch) batch = [] } - await sleep(1000) + // await sleep(1000) } // Propagate any remaining events in the last batch