HatsEligibilityModules is a repo containing a number of separate eligility modules for Hats Protocol. The modules are summarized below:
- AddressEligibility: check if addresses are on a whitelist that admins can edit
- DecentralistEligibility: checks if an address is on a Decentralist list
- ERC20Eligibility: checks if addresses meet a minimum balance of an ERC20 token
- ERC721Eligibility: checks if addresses meet a minimum balance of an ERC721 token
- ERC1155Eligibility: checks if addresses holds at least one minimum balance of a set of ERC1155 token Ids
All contracts are based on the Hats Protocol's repo: hats-module
Note: The contracts in this repo have not been audited - use at your own risk.
For Eligibility Module deployments, see Releases.
This repo uses Foundry for development and testing. To get started:
- Fork the project
- Install Foundry
- To compile the contracts, run
forge build
- To test, run
forge test
. The tests require a private key and a valid mainnet rpc API KEY. A .env.example file is provided.