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
Add method removeVoteForTrack to ConvictionVoting precompile #2201
Conversation
This PR needs some work before it is ready for review.
|
/// @param pollIndex Index of the poll | ||
function removeVote(uint32 pollIndex) external; | ||
|
||
/// @dev Remove vote in poll for track | ||
/// @custom:selector cc3aee1a | ||
/// @param pollIndex Index of the poll | ||
/// @param trackId Id of the track | ||
function removeVoteForTrack(uint32 pollIndex, uint16 trackId) external; |
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.
A note about when we need to specify track could be useful. Alternatively, maybe removing removeVote()
altogether would make this more concise.
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.
LGTM, seems thorough. A test to cover abstaining could be useful.
…oonbeam-foundation#2201) * add remove some vote to conviction voting precompile * fix and add pallet unit test for log * rename fix logs * Adds bunch of ts-tests * Adds test for expired proposals --------- Co-authored-by: crystalin <alan.sapede@gmail.com>
Allows users of the ConvictionVoting precompile to specify class: Some(trackId) for removeVote extrinsic. Previously, the removeVote precompile method assumed class: None, which led to unexpected errors. The new precompile method
removeVoteForTrack
allows users to specify trackId for substrate removeVote extrinsic.