Caster is a merkle tree based efficient, general purpose voting protocol which also supports fractional vote delegation
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
Caster is a general purpose, on-chain, merkle tree based voting protocol which also supports fractional vote delegation. Users can create voting campaigns in a permissionless manner by supplying a merkle root and the campaign params, and paying a fee of 0.001 ether
. Voting campaigns can be single option (rhetorical questions), or multiple option voting campaigns (select from an array of options). Whitelisted users eligible to vote in a campaign can mint themselves a unique voting id (Caster Nft) by verifying themselves as a part of the merkle tree. This Nft provides the voters with the voting power assigned by the campaign creator.
Voters can delegate their votes to a single user or multiple users (fractional vote delegation). By default, votes are delegated to the voter itself and once the voter delegates to another user, they cannot be recovered.
Campaigns run for a finite duration (less than 365 days, which is the max duration). At the end of each campaign, the result can be obtained using CasterCampaign::getResultSingleOption()
or CasterCampaign::getResultMultipleOption()
depending on the campaign type.
Make sure you have git, node.js, and pnpm installed and configured on your system.
Clone the repo,
git clone https://github.com/mgnfy-view/caster.git
cd into the repo, and install the necessary dependencies
cd caster
forge test
pnpm intall
That's it, you are good to go now!
- Smart contract development
- Unit tests
- Write Docs
- Write a good README.md
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Here's a gateway to all my socials, don't forget to hit me up!