This is an exploratory project for working with hints/dictionaries in cairo. It is based on the code and idea given here. The main modification is around the processing of votes and maintaining the merkel tree. This system allows one to send multiple votes till voting is open. The process_vote function will not update state if new vote is same as previous vote. However, if the new vote is different compared to previous vote then yes/no votes are adjusted accordingly and the merkel tree maintaining state is changed. An important observation here comes from using the dictionary from starkware.cairo.common.dict. Specifically, the dictionary is represented as a chronological list of accesses (read/write/modify). So even a read access means the internal pointer gets updated. This reference is useful.
-
Notifications
You must be signed in to change notification settings - Fork 0
udayj/dynamic_voting_system
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Dynamic voting system
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published