Skip to main content
Namoshi identities are perfect for leaderboards, activity feeds, and social components in your Citrea dApp.

Fetching Names for Leaderboards

When building a leaderboard, you typically have an array of addresses and scores. You should resolve these addresses to Namoshi names in batches or as the user scrolls.

Batch Resolution

Using viem, you can use the getEnsName for each address. For better performance, consider using the UniversalResolver to batch these calls or query your own indexer.

User Profiles & Avatars

Namoshi supports text records, including avatar, github, twitter, and description. Use these to populate rich user profiles.

Leaderboard UI Components

When displaying a leaderboard, always provide a fallback to the truncated address if no Namoshi name is found.

Subgraph Integration

For high-performance leaderboards, we recommend using the Namoshi Subgraph. It allows you to query names and their associated metadata directly with GraphQL, avoiding multiple RPC calls.