https://github.com/mgnfy-view/caster
Caster is a merkle tree based efficient, general purpose voting protocol which also supports fractional vote delegation
https://github.com/mgnfy-view/caster
delegation ethereum general-purpose layer2 smart-contracts solidity voting-system
Last synced: 27 days ago
JSON representation
Caster is a merkle tree based efficient, general purpose voting protocol which also supports fractional vote delegation
- Host: GitHub
- URL: https://github.com/mgnfy-view/caster
- Owner: mgnfy-view
- License: mit
- Created: 2024-07-25T11:58:03.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-10-04T04:49:49.000Z (8 months ago)
- Last Synced: 2025-04-08T11:51:39.361Z (about 2 months ago)
- Topics: delegation, ethereum, general-purpose, layer2, smart-contracts, solidity, voting-system
- Language: Solidity
- Homepage:
- Size: 53.7 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
![]()
Caster
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
## About The Project
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.
### Built With
- 
- 
- 
- ## Getting Started
### Prerequisites
Make sure you have git, node.js, and pnpm installed and configured on your system.
### Installation
Clone the repo,
```shell
git clone https://github.com/mgnfy-view/caster.git
```cd into the repo, and install the necessary dependencies
```shell
cd caster
forge test
pnpm intall
```That's it, you are good to go now!
## Roadmap
- [x] Smart contract development
- [x] Unit tests
- [x] Write Docs
- [x] Write a good README.mdSee the [open issues](https://github.com/mgnfy-view/caster/issues) for a full list of proposed features (and known issues).
## Contributing
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!1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request## License
Distributed under the MIT License. See `LICENSE.txt` for more information.
## Reach Out
Here's a gateway to all my socials, don't forget to hit me up!
[][linktree-url]
[contributors-shield]: https://img.shields.io/github/contributors/mgnfy-view/caster.svg?style=for-the-badge
[contributors-url]: https://github.com/mgnfy-view/caster/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/mgnfy-view/caster.svg?style=for-the-badge
[forks-url]: https://github.com/mgnfy-view/caster/network/members
[stars-shield]: https://img.shields.io/github/stars/mgnfy-view/caster.svg?style=for-the-badge
[stars-url]: https://github.com/mgnfy-view/caster/stargazers
[issues-shield]: https://img.shields.io/github/issues/mgnfy-view/caster.svg?style=for-the-badge
[issues-url]: https://github.com/mgnfy-view/caster/issues
[license-shield]: https://img.shields.io/github/license/mgnfy-view/caster.svg?style=for-the-badge
[license-url]: https://github.com/mgnfy-view/caster/blob/master/LICENSE.txt
[linktree-url]: https://linktr.ee/mgnfy.view