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

Add tally endpoint for Gov CLI and REST #2080

Closed
2 tasks
sunnya97 opened this issue Aug 17, 2018 · 4 comments
Closed
2 tasks

Add tally endpoint for Gov CLI and REST #2080

sunnya97 opened this issue Aug 17, 2018 · 4 comments
Assignees
Labels

Comments

@sunnya97
Copy link
Member

sunnya97 commented Aug 17, 2018

Use the querier in #1918

  • Rest
  • CLI
@fedekunze
Copy link
Collaborator

@sunnya97 how would this endpoint be ?

@sunnya97
Copy link
Member Author

It returns a TallyResult.

TallyResult struct {
	Yes        sdk.Dec `json:"yes"`
	Abstain    sdk.Dec `json:"abstain"`
	No         sdk.Dec `json:"no"`
	NoWithVeto sdk.Dec `json:"no_with_veto"`
}

If you call it for a proposal that's already completed voting, it just gives you the final tally results.
If you call it for a proposal currently in its voting period, it gives you the current tally as if it were to end right now.

If you call it for a proposal still in DepositPeriod, it will just return an empty tally.

@fedekunze fedekunze added the lite label Aug 29, 2018
@fedekunze
Copy link
Collaborator

@sunnya97 Are you working on this somewhere ? Otherwise I can pick it up if you like

@sunnya97
Copy link
Member Author

Ah, oops. This was actually closed by #2141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants