Replies: 1 comment
-
Do you have a concrete example in mind? I wonder how much of an edge case this is and if passing just an array with one vote wouldn't solve it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context
Our current implementation of
IVotingStrategy
allows someone to cast multiple votes at once by providing an array of encoded votes:Source
This method is called in the
RoundImplementation
contract:Source
Not every voting strategy is going to want to accept multiple votes. But this method is required by the interface and is the assumed behavior.
Suggested Implementation
We could overload
vote()
and provide two implementations, one for casting multiple votes and one for casting a single vote:We would have to update the
RoundImplementation
contract and overload thevote()
method there too:Normally, we would implement an internal
_vote()
method but I think we should avoid doing that here because we want people to be able to structure their votes however they want and I think we want to avoid looping through the votes array here.Beta Was this translation helpful? Give feedback.
All reactions