Skip to content

feat(efp): read-only EFP stats on address profiles#1913

Open
Quantumlyy wants to merge 24 commits into
drips-network:mainfrom
Quantumlyy:efp
Open

feat(efp): read-only EFP stats on address profiles#1913
Quantumlyy wants to merge 24 commits into
drips-network:mainfrom
Quantumlyy:efp

Conversation

@Quantumlyy
Copy link
Copy Markdown

Summary

Adds a read-only Ethereum Follow Protocol integration so address profiles and supporter lists can show public follow graph data from the EFP API. No on-chain follow actions in this PR — just stats, mutual followers, and a way to spot supporters you already follow on EFP.

Gated behind a new enableEfp network flag (same idea as enableEns: off on local testnet, on everywhere else we ship ENS).

Changes

  • $lib/utils/efp — thin client for api.ethfollow.xyz (stats, commonFollowers, followerState, plus batched getSupportersYouFollow).
  • $lib/stores/efp — cached lookups with in-flight dedupe; hydrateStats so SSR data from the profile load does not get re-fetched on the client.
  • EfpStats — follower/following counts (link out to efp.app) and optional “Followers you know” pile.
  • Address profile ([accountId]/+page) — SSR stats in +page.server.ts; client fetch for common followers when viewing someone else while connected.
  • identity-card — stats on the address card via the store (client fetch).
  • supporters.section — “Show supporters you follow” on address profiles; tags matching supporters with a Following label.
  • createAsyncRequestGuard — drops stale common-follower responses when navigating between profiles quickly.
  • Tests — unit coverage for the API client, store, EfpStats, supporter address extraction, and the request guard.

Not in scope: wiring EFP into identity-badge (too noisy there), or any write/follow UI.

Test plan

  • On mainnet (or any network with enableEfp: true), open an address profile with real EFP activity — follower/following counts show and link to efp.app.
  • Same profile, wallet connected as a different address — “Followers you know” appears when the API returns mutuals.
  • Navigate between two profiles quickly — common followers do not flash data from the previous profile.
  • Address profile supporters section — “Show supporters you follow” loads and tags rows; toggle off clears tags.
  • Identity card for an address (e.g. somewhere that renders identity-card with an address) shows stats after load.
  • Local testnet (dev:docker, chain 31337) — no EFP UI, no requests to the EFP API.
  • npm run test:unit — EFP-related tests pass.
  • npx lint-staged --concurrent false and npm run check clean on touched files.

Copilot AI review requested due to automatic review settings June 2, 2026 11:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds EthFollow (EFP) integration to surface follower/following stats and “common followers” in the app UI, with supporting API client, store, and tests.

Changes:

  • Fetch EFP stats server-side for profile pages and hydrate client store.
  • Add EFP UI components (stats + common followers) to profile/identity/supporters views.
  • Introduce EFP API utilities + store + async request guard, with unit tests.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/routes/(pages)/app/(app)/[accountId]/+page.svelte Hydrates/reads EFP stats and looks up common followers for the viewed profile.
src/routes/(pages)/app/(app)/[accountId]/+page.server.ts Loads EFP stats during SSR when enabled.
src/lib/utils/efp/index.ts Adds EFP API client helpers (stats, common followers, follower state).
src/lib/stores/efp/efp.store.ts Adds client-side store + caching for EFP stats/common followers.
src/lib/components/efp-stats/efp-stats.svelte Adds reusable EFP stats/common-followers UI.
src/lib/components/supporters-section/supporters.section.svelte Adds “supporters you follow” highlight using EFP followerState.
src/lib/stores/wallet/network.ts Adds enableEfp feature flag to network config.
*.unit.test.ts Adds unit tests for EFP utilities/store/component + async guard.
Comments suppressed due to low confidence (1)

src/routes/(pages)/app/(app)/[accountId]/+page.server.ts:1

  • await getVotingRounds(...) inside Promise.all([...]) defeats parallelism by awaiting that promise before Promise.all starts. Remove the inner await so all requests are started concurrently.
import { DRIP_LISTS_SECTION_DRIP_LIST_FRAGMENT } from '$lib/components/your-drip-lists-section/your-drip-lists-section.svelte';

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib/stores/efp/__mocks__/index.ts Outdated
Comment thread src/lib/utils/efp/index.ts
Comment thread src/routes/(pages)/app/(app)/[accountId]/+page.svelte
Comment thread src/lib/components/efp-stats/efp-stats.svelte Outdated
Comment thread src/lib/components/supporters-section/supporters.section.svelte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants