# Gitcoin Passport Eligibility

## Overview

A Hats Protocol eligibility module for Gitcoin Passport that sets a target hat's eligibility based on a given Passport score criterion.

Note that Passport scores are stored offchain by default. In order to bring a score onchain, its owner can use Passport's [user interface](https://passport.gitcoin.co/#/dashboard):

<figure><img src="https://4112750745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYVrI6eFo60Gwsn2A05qA%2Fuploads%2FaZ4MeefJopXLyISLVlVh%2FScreenshot%202024-07-25%20at%2017.24.52.png?alt=media&#x26;token=bcd9a2ee-bb5d-420a-b980-5322365f4136" alt=""><figcaption></figcaption></figure>

Additionally, a score is currently valid for 90 days, and thus require an update by its owner in order to not lose eligibility.

The module's code is open source and is available [here](https://github.com/daocoa/gitcoin-passport-eligibility/tree/main).

## **Adding the module to a hat** <a href="#adding-the-module-to-a-hat" id="adding-the-module-to-a-hat"></a>

* 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 "Revocation & Eligibility" section

<figure><img src="https://4112750745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYVrI6eFo60Gwsn2A05qA%2Fuploads%2FYx9lUDNzfu2EkYJDRpcB%2Fimage.png?alt=media&#x26;token=c9e5e149-635a-4f4f-871d-d3caea14214f" alt=""><figcaption></figcaption></figure>

* Choose "Automatically" and then choose "Create new Module". This will open the module creation form
* Choose "Gitcoin Passport Eligibility" in the module type

<figure><img src="https://4112750745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYVrI6eFo60Gwsn2A05qA%2Fuploads%2FXhfqFdq9hcX6YQb31Lz6%2FScreenshot%202024-07-25%20at%2018.36.33.png?alt=media&#x26;token=5d9c449c-0f37-410e-aae0-2aa05b1073c4" alt=""><figcaption></figcaption></figure>

* Fill in the module-specific parameters
* Choose "Deploy & Return" to deploy the module and return to the hat edit form. The module address will be automatically updated on the hat's eligibility property in the form. Once you deploy these changes, the hat's eligibility will be updated.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hatsprotocol.xyz/hats-integrations/eligibility-and-accountability-criteria/gitcoin-passport-eligibility.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
