Comment on page
Toggle contracts have authority to switch the
hat.activestatus of a hat, such as from
inactive. When a hat is inactive, it does not have any wearers (i.e., the balance of its previous wearers' is changed to 0).
Any address can serve as a hat's toggle. As with eligibility modules, Hats Protocol supports two categories of toggle modules:
- 1.Mechanistic toggles are logic contracts that implement the
IHatsToggleinterface, which enables the hats contract to pull a hat's active status by calling
checkTogglefrom within the
Hats.balanceOffunction. Mechanistic toggle enable instantaneous deactivation (or reactivation) based on pre-defined logic, such as timestamps ("this hat expires at the end of the year").
- 2.Humanistic toggles are either EOAs or governance contracts. To deactivate (or reactivate) a hat, humanistic toggles must push updates to the Hats contract by calling