Skip to main contentIn the Towns ecosystem, Permissions are defined actions that users can undertake within a Space. These permissions are fundamental to governing user interactions and activities within the ecosystem. The Towns system includes a range of permissions, each tailored to specific functionalities:
- Read: Allows users to access and view message content within a Space.
- Write: Allows users to create and modify message content within a Space.
- React: Allows users to add reactions to messages.
- AddRemoveChannels: Allows users to create and delete channels within a Space.
- ModifyChannel: Allows users to edit channel settings.
- ModifySpaceSettings: Allows users to change Space settings.
- ModifyRoles: Allows users to create, update, and delete roles and entitlements within a Space.
- ModifyBanning: Allows users to ban and unban members from a Space.
Concept of Roles
Roles in the Towns system are aggregations of the aforementioned Permissions. By combining different permissions into distinct roles, the system simplifies the management of user capabilities and access within a Space.
Functionality of Entitlements
Entitlements play a crucial role in determining user eligibility for different Roles. They dictate how users qualify for certain Roles and can be specific to different Channels or the Space itself.
Implementation of Entitlement Modules
Entitlement Modules are instrumental in defining the requirements for Entitlements. These modules are akin to pricing modules, allowing for the deployment of bespoke smart contracts on the chain. To be incorporated into the Towns system, these contracts must adhere to the IEntitlement Interface and be deployed to Base, with their settings adjusted for each Space.
Default Settings in Spaces
Upon the minting of a new Space, the Towns system automatically deploys two standard Entitlement Modules:
- UserEntitlementModule: This module enables the assignment of Roles based on specific addresses or ENS. For instance, “vitalik.eth” could be assigned the Moderator Role, while “0x44..ccbb” might receive a Read-Only Role.
- TokenEntitlementModule: It facilitates the assignment of Roles based on the ownership of certain assets on-chain. An example would be assigning a Special Role to users holding a Cryptopunk or a Whale Role to those with at least .1 ETH.
Default Roles in Newly Minted Spaces
Each newly minted Space in the Towns system is initialized with two predefined Roles:
Owner - Assigned automatically to the address holding the Owner NFT through the Token Entitlement Module.
This Role encompasses all permissions within the Space and is irrevocable.
Member - Granted to any address holding a Member NFT.
By default, this Role includes “Read” and “Write” Permissions, allowing for basic interaction within the Space.