-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(voting): first implementation #12
base: dev
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #12 +/- ##
======================================
Coverage ? 97.35%
======================================
Files ? 8
Lines ? 151
Branches ? 32
======================================
Hits ? 147
Misses ? 2
Partials ? 2 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, thank you so much for your work. Regarding the PR, I think that we should take more time to comment our contracts (at the moment, none of the voting contracts have comments).
Please use the @dev
and @notice
and comment all the contract
s and the function
s.
Regarding the Ballot contract, we need to get more info on a few topics.
- What happens if someone has more thatn 25,000 DPS, submit a vote and the, uses the DPS/SQUARE bridge?
- Is the "manual" ballot close by the a owner a good solution? It would let the controls when the ballot ends and might allow to close the ballot at an arbritrary timestamp. We could use the
block.timestamp
value in order to be transparent and decentralized. We could even discuss of removing the Ownable interface.
Regarding the BallogTags, which definitely need to be renamed, I think that using standard keccak digests, like the in the OpenZeppelin AccessControl
. The would allow to save gas by using 32 bytes alignments + using arbitrary long strings as tags.
I also suggest to drop the |
cts to use clone fact ory pattern
Implement a voting features embedding :
Each ballot has its own contract deployed following clone factory pattern (see EIP-1167 and open-zeppelin proposition of minimal proxy implementation.