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
Usingviem, 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, includingavatar, 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.| Rank | Identity | Points |
|---|---|---|
| 1 | nemo.citrea | 1500 |
| 2 | 0x4f0B...9E7b | 1200 |
| 3 | nemo.btc | 900 |