-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
feat(gov): autocli query support #16987
Conversation
@@ -179,11 +179,6 @@ func (q queryServer) Params(ctx context.Context, req *v1.QueryParamsRequest) (*v | |||
case v1.ParamTallying: | |||
tallyParams := v1.NewTallyParams(params.Quorum, params.Threshold, params.VetoThreshold) | |||
response.TallyParams = &tallyParams | |||
|
|||
default: |
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.
This allows to pass no parameters but still return the whole params.
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.
Left one question but otherwise looks good
GetCmdQueryVote(ac), | ||
GetCmdQueryVotes(), | ||
GetCmdQueryParams(), | ||
GetCmdQueryParam(), | ||
GetCmdQueryProposer(), |
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.
Reason for this staying?
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.
Yeah, it queries events and filters (
cosmos-sdk/x/gov/client/utils/query.go
Line 165 in 90b3907
q := fmt.Sprintf("%s.%s='%d'", types.EventTypeSubmitProposal, types.AttributeKeyProposalID, proposalID) |
In this case, we cannot use AutoCLI. I'll implement #16836, to be able to wire it back in gov.
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.
Now that proposers are in the proposals, we could actually introduce a query for it too.
(cherry picked from commit 8cf483a) # Conflicts: # x/circuit/go.mod # x/circuit/go.sum # x/evidence/go.mod # x/evidence/go.sum # x/gov/client/cli/query.go
Co-authored-by: Julien Robert <[email protected]>
Description
ref: #15901
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change