feat(voting): first implementation#12
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.
|
matbour
left a comment
There was a problem hiding this comment.
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 contracts and the functions.
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.timestampvalue 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.