User
Draft. The identity contract that stores player profiles and preferences.
Purpose
The User contract manages player identity in Akkadia. It stores both system-assigned attributes (properties) and user-controlled data (metadata), providing a flexible profile system that respects player ownership while enabling administrative features.
GnoLand Link
Key Concepts
Properties vs Metadata
The contract distinguishes between two types of user data:
Properties (Admin-controlled)
- Set by the admin for system purposes
- Examples: verification status, account flags, system-assigned roles
- Users cannot modify their own properties
Metadata (User-controlled)
- Set by users for personalization
- Examples: display name, avatar, preferences
- Only the user (or admin) can modify
Both types are stored as key-value pairs, allowing flexible extension without contract upgrades.
Reserved Keys
The address key is reserved and automatically set during user creation. It cannot be modified and ensures each profile is permanently linked to its blockchain address.
User Lifecycle
- Creation - A user record is created when a player first interacts with Akkadia. Users can self-register or be registered by admin.
- Modification - Properties updated by admin, metadata updated by the user
- Deletion - Users can delete their own account, or admin can remove accounts
What’s On-Chain
- User existence (registered addresses)
- Properties map per user (admin-managed attributes)
- Metadata map per user (user-managed attributes)
- Total user count
Capabilities
For Players
- Create your own user profile
- Set and update your metadata (display name, preferences, etc.)
- Delete your own account
- View your properties and metadata
For Admin
- Create user profiles for any address
- Set properties on any user (verification, flags, etc.)
- Set metadata on any user (override capability)
- Delete any user account
For Anyone
- Query user profiles by address
- List all users with pagination
- Check if an address is registered
Related
- Admin - Role system for property management
- Personal World - World ownership linked to user identity
Last updated on