Add Ethereum Follow Protocol (EFP) social graph functionality to your Scaffold-ETH 2 project. EFP is the onchain social graph protocol for Ethereum accounts - like Twitter follows, but fully decentralized and portable across any dApp.
npx create-eth@latest -e ethereumidentitykit/scaffold-efp-extOr add to an existing SE-2 project:
# Add the dependency
yarn add ethereum-identity-kit
# Copy the extension files from this repo/efp- Introduction to EFP with component examples, React hooks, API documentation, and self-hosting info/efp-example- Interactive profile preview page to explore EFP profiles
This extension uses Ethereum Identity Kit (EIK) components:
FullWidthProfile- Comprehensive profile with avatar, bio, stats, and social linksProfileCard- Compact profile card for lists and gridsFollowButton- Follow/unfollow button with transaction handlingFollowersAndFollowing- Tabbed list of followers and followingNotifications- Activity feed for social eventsProfileTooltip- Hover tooltip with profile info- And more...
EFP transactions happen on L2s (Base, Optimism). This networks are already available in scaffold.config.ts#targetNetworks. You can remove local chain before pushing to production.
Components automatically detect dark mode from the SE-2 theme. You can also pass darkMode={true/false} to individual components.
import {
ProfileCard,
TransactionProvider,
TransactionModal,
} from "ethereum-identity-kit";
import "ethereum-identity-kit/css";
export default function MyPage() {
return (
<TransactionProvider>
<TransactionModal />
<ProfileCard
addressOrName="vitalik.eth"
showFollowerState
showFollowButton
/>
</TransactionProvider>
);
}import {
FollowButton,
TransactionProvider,
TransactionModal,
} from "ethereum-identity-kit";
import { useAccount } from "wagmi";
export default function MyPage() {
const { address } = useAccount();
return (
<TransactionProvider>
<TransactionModal />
<FollowButton
lookupAddress="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
connectedAddress={address}
/>
</TransactionProvider>
);
}import { useProfileStats, useFollowerState } from "ethereum-identity-kit";
export default function Stats({ address }) {
const { followers, following, statsLoading } = useProfileStats({
addressOrName: address,
});
if (statsLoading) return <span>Loading...</span>;
return (
<div>
<span>{followers} followers</span>
<span>{following} following</span>
</div>
);
}- EFP App - The official EFP app
- Ethereum Identity Kit Docs - Component library documentation
- EIK Playground - Interactive component playground
- EFP Protocol Docs - Protocol documentation
- EFP GitHub - Source code and infrastructure
- EFP List NFT - Mint a list NFT on Base, Optimism, or Mainnet. You own your social graph.
- ENS Identity - Your ENS name is your profile. Avatar, bio, and socials come from ENS records.
- Onchain Actions - Follow, unfollow, block, and mute are stored onchain.
- Portable Graph - Your follows work everywhere EFP is integrated.
For full control, you can self-host the EFP infrastructure stack:
Built with ❤️ by the EFP team
