# Hats Elections w/ oSnap

## Basic steps
1. Create the Elected Role hat and other relevant hats
2. Configure/install the Hats Elections Eligibility module on the Elected Role
3. Set up claiming
4. Create & pass the election proposal with M candidates => N are elected
5. Create the ratification proposal to submit N elected candidates
6. Execute the oSnap tx
7. Winners claim the Elected Role hat
#### (1) Create the Elected Role hat
- Also create an Automated Admin hat to enable election winners to claim their Elected Role hat — see [step 3](#3-Set-up-claiming) section for more
- *Example: hats 205.1.1 and 205.1 above*
#### (2) Configure/install the [Hats Elections Eligibility](https://github.com/Hats-Protocol/hats-elections-eligibility) module on the Elected Role
- Parameters:
- Ballot Box — the hat that will submit election results; must be worn by the oSnap-enabled Safe
- Owner (aka Election Term Manager) — a hat that will set the election terms; can be worn by the oSnap-enabled Safe, or another account
- Elected Role — the hat to be worn by the winners of the election
- Initial Term End - the timestamp of the end of the first election term, ie when the winners of the first election should lose their hat
- *Example: https://goerli.etherscan.io/address/0x8be8cf7aaff35fd2f7f5718dea873bb32975c126*
#### (3) Set up claiming
- Deploy an instance of Multi Claims Hatter
- Mint the Automated Admin hat to it
#### (4) Create the election proposal with M candidates => N are elected
- This step is only necessary because Snapshot's transaction builder cannot dynamically pull in data from winning proposal options.
#### (5) Create the ratification proposal to submit N elected candidates
This is an oSnap proposal with the following tx:
- to: address of the Hats Election Eligibility module deployed in (2)
- ABI: `["function elect(uint128 _termEnd, address[] _winners)"]`
- function: `elect()`
- _termEnd: the initial term end param from (2)
- _winners: array of the N winning addresses from (4)
[Example](https://demo.snapshot.org/#/demo.hatsprotocol.eth/proposal/0x49e6d90a3a5142843d66fa131bba0a8ccb3b39dc069a81708354eb2927623f85):

#### (6) Execute the oSnap tx
- This will submit the winners' addresses to the Hats Elections Eligibility module, making the winners eligible to wear the Elected Role hat.
#### (7) Winners claim the elected role hat
We have winners claim to ensure that they consent to assuming the role.
## Advanced Functionality
- Create new election terms
- Recall elections