โกActivation & Deactivation Criteria
Activating and deactivating hats
Last updated
Activating and deactivating hats
Last updated
The permissions and authorities that can be accessed via a hat can be granted and revoked by designated individual or group admins, as well as based on a wide range of automated eligibility and accountability criteria using Hats Modules.
Hats Modules are programmable extensions for roles. Modules can be connected to hats to expand their functionality, such as enabling automatic granting and revocation of hats (and their associated permissions) based on specific conditions.
Any combination of permissions and authorities can be granted or revoked automatically based on a customizable set of criteria, including:
Tokens, NFTs, and attestations, including ERC20 token balance, ERC721 NFTs, ERC1155 NFT tokenIDs, and EAS attestations
Elections and allowlists, including election results from JokeRace, Snapshot, or Tally, automatic term limits, and manually-created allowlists
Achievements and reputation, like badges, onchain points, Colinks, or Gitcoin passport score
Prerequisite actions, like staking, signing an agreement, holding other roles, or being a subscriber
And more: combine multiple criteria with and/or logic, introduce AI agents, or create granular onchain or offchain triggers
Anyone can create their own eligibility or accountability criteria, or tap into the Hats ecosystem of Hats Modulesโprogrammable extensions for rolesโbuilt permissionlessly by community developers and distributed via the Hats Modules Registry, which is curated by Hats protoDAO via the Modules Registry Curator hat. Likewise, any app can tap into the same infrastructure to offer the fast-growing suite of Hats Modules options to their end-users.
A hatโs toggle module is an address that determines whether the hat is active or inactive for all wearers. Toggle modules can activate or deactivate hats automatically based on pre-defined triggers.
For more details on Hats Modules, including what they can unlock and how builders can create new modules, see this blog post. You can also visit this docs page for a general guide about Toggle Modules.
See the subpages within this section for detailed guides for specific Toggle modules you can use with Hats:
Seasonal/ Time-Expiry TogglePass-Through (Hat-Based) ToggleFor more technical details on how Hats toggle modules work, see the Toggle Modules page within the "For Developers" section of these docs.
Modules customize, automate, and extend the behavior of Hats Protocol, and can also serve as adapters or integration points with other protocols and applications.
In a sense, modules are the lifeblood of Hats Protocol. The design space is wide open, ready to be filled with all the possible building blocks of human organization and coordination.
There are two primary ways for developers to work with Hats Modules. Whether you're building new modules or using the Modules SDK to interact with or build applications for existing modules, we have a number of developer tools to make your job easier. See the page below to get started.
๐งฉHats Modules