# Seasonal/ Time-Expiry Toggle

A Hats Toggle module that allows an organization to configure certain hats to be automatically toggled off after a given interval, i.e. a "season".

## **Overview**

Organizational structure should not be permanent. By automatically turning off hats by default, SeasonToggle helps ensure that organizations continuously and explicitly revisit their own structure.&#x20;

In Hats Protocol, hats can be configured with Toggle modules that programmatically control whether and when the hat is active or inactive. SeasonToggle adds an automatic expiry for a group of hats within a given branch of an organization's hat tree, unless an admin of that branch explicitly extends it to a new season.

Usage of SeasonToggle involves the following phases:

1. **Setup**: create a new instance of SeasonToggle for the relevant branch of the hat tree
2. **Extension**: renew the branch of hats for a new season

The module's code is open source and is available [here](https://github.com/Hats-Protocol/season-toggle).

## **Using the Seasonal / Time-Expiry Toggle Module**

* Go to the tree that includes the hat you wish to create the module for
* Select "Edit Tree"
* Locate and select the hat
* Open the "Deactivation & Reactivation" section

<figure><img src="https://4112750745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYVrI6eFo60Gwsn2A05qA%2Fuploads%2F9blDL2NSTisA110muHBo%2FDeactivation%20And%20Reactivation.png?alt=media&#x26;token=984c6e6c-6181-47fb-9d25-c59800c6bd07" alt=""><figcaption></figcaption></figure>

* Choose "Automatically" and then choose "Create new Module". This will open the module creation form

<figure><img src="https://4112750745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYVrI6eFo60Gwsn2A05qA%2Fuploads%2FsEta7lB7iV6pSl9BEoCI%2FCreate%20Toggle%20Module.png?alt=media&#x26;token=2b6ae443-6c6c-4418-bdb0-2ab52b6b6a9f" alt=""><figcaption></figcaption></figure>

* Choose "Create new Module"

<figure><img src="https://4112750745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYVrI6eFo60Gwsn2A05qA%2Fuploads%2FIl5euFH0JESEKYVBBi9J%2FCreate%20Module%202.png?alt=media&#x26;token=4c177e21-ea79-4e9a-8d7a-2d44be0e9cca" alt=""><figcaption></figcaption></figure>

* Choose "Season Toggle" in the module type

<figure><img src="https://4112750745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYVrI6eFo60Gwsn2A05qA%2Fuploads%2F2BTrbUAJ4qn8RloEOPn2%2FSeason%20Toggle%20Guide.png?alt=media&#x26;token=df8bb3dd-f15c-400d-8f82-5db3b08dfd8e" alt=""><figcaption></figcaption></figure>

* Fill in the module-specific parameters
* Choose "Deploy & Return" to deploy the module and return to the hat edit form
