Skip to content

Caster is a merkle tree based efficient, general purpose voting protocol which also supports fractional vote delegation

License

Notifications You must be signed in to change notification settings

mgnfy-view/caster

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

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
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. Contributing
  5. License
  6. Contact

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

  • Foundry
  • Solidity
  • NodeJS
  • PNPM

Getting Started

Prerequisites

Make sure you have git, node.js, and pnpm installed and configured on your system.

Installation

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!

Roadmap

  • 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).

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

About

Caster is a merkle tree based efficient, general purpose voting protocol which also supports fractional vote delegation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published