Skip to content
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

Tally query #90

Closed
JakeHartnell opened this issue Dec 2, 2021 · 0 comments
Closed

Tally query #90

JakeHartnell opened this issue Dec 2, 2021 · 0 comments
Assignees

Comments

@JakeHartnell
Copy link
Member

As a DAO member, I would like to know how close a vote is to passing.

Currently, from the queries included in the cw3 spec, it's a pain to figure this out (especially if there are a large number of voters).

So let's introduce a Tally { proposal_id: u64 } query, which will return info about the current vote tally. Imagine it would look something like this:

#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)]
pub struct VoteTallyResponse {
    // Current proposal status
    pub status: Status,
    // Required passing criteria
    pub threshold: ThresholdResponse,
    // Percentage of turnout
    pub quorum: Decimal,
    // Total number of votes
    pub total_votes: Uint128,
    // absolute number of votes
    pub total_weight: Uint128,
    // Tally's of the different votes
    pub votes: Votes,
}

We should be able to extend the existing proposal implementation in both cw3-dao and cw3-flex-multisig for this.

@JakeHartnell JakeHartnell added this to the Real Artists Ship milestone Dec 3, 2021
@0xekez 0xekez self-assigned this Dec 4, 2021
0xekez added a commit that referenced this issue Dec 4, 2021
@0xekez 0xekez closed this as completed in f1dfa9f Dec 5, 2021
0xekez added a commit that referenced this issue Dec 5, 2021
Add a tally query to dao and multisig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants