Two key features:
-
resolve players ENS if they have one, use https://viem.sh/docs/ens/actions/getEnsName.html
-
Add a PlayerHandle contract where users can register a single handle for their address (they should be able to change it as well)
- Handles should be unique
- Add a
checkHandleValidity function that restricts names (e.g. only ASCII, minimum 5 characters, maybe not contain dots (to avoid ENS / other name system clashes)
- Add a
checkPlayerEligibility that can be always true for now but down the line will only enable players that have completed some milestones (e.g. minimum amount of matches, minimum spend, ...) to register handles to avoid squatting.
- If a user has an ENS, let them select whether they want to use their handle or their ENS.
- Add an admin role that can be used later to avoid impersonation and squatting of popular names.
The frontend must be modified to display player handles (or ENS).
Two key features:
resolve players ENS if they have one, use https://viem.sh/docs/ens/actions/getEnsName.html
Add a
PlayerHandlecontract where users can register a single handle for their address (they should be able to change it as well)checkHandleValidityfunction that restricts names (e.g. only ASCII, minimum 5 characters, maybe not contain dots (to avoid ENS / other name system clashes)checkPlayerEligibilitythat can be alwaystruefor now but down the line will only enable players that have completed some milestones (e.g. minimum amount of matches, minimum spend, ...) to register handles to avoid squatting.The frontend must be modified to display player handles (or ENS).