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

feat(params): autocli query support #17007

Merged
merged 3 commits into from
Jul 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Improvements

* (all modules) [#15901](https://github.com/cosmos/cosmos-sdk/issues/15901) All core Cosmos SDK modules query have migrated to [AutoCLI](https://docs.cosmos.network/main/building-modules/autocli), ensuring parity between gRPC and CLI queries.
* (types) [#16890](https://github.com/cosmos/cosmos-sdk/pull/16890) Remove `GetTxCmd() *cobra.Command` and `GetQueryCmd() *cobra.Command` from `module.AppModuleBasic` interface.
* (cli) [#16856](https://github.com/cosmos/cosmos-sdk/pull/16856) Improve `simd prune` UX by using the app default home directory and set pruning method as first variable argument (defaults to default).
* (all) [#16537](https://github.com/cosmos/cosmos-sdk/pull/16537) Properly propagated fmt.Errorf errors + using errors.New where appropriate.
Expand Down Expand Up @@ -102,7 +103,6 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Improvements

* (all) [#16497](https://github.com/cosmos/cosmos-sdk/pull/16497) Removed all exported vestiges of `sdk.MustSortJSON` and `sdk.SortJSON`.
* (x/distribution) [#16218](https://github.com/cosmos/cosmos-sdk/pull/16218) Add Autocli config to distribution module.
* (cli) [#16206](https://github.com/cosmos/cosmos-sdk/pull/16206) Make ABCI handshake profileable.

### Bug Fixes
Expand Down
22 changes: 0 additions & 22 deletions tests/e2e/params/app_config.go
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

params was already sufficiently tested.

This file was deleted.

19 changes: 0 additions & 19 deletions tests/e2e/params/cli_test.go

This file was deleted.

85 changes: 0 additions & 85 deletions tests/e2e/params/grpc.go

This file was deleted.

148 changes: 0 additions & 148 deletions tests/e2e/params/suite.go

This file was deleted.

31 changes: 31 additions & 0 deletions x/params/autocli.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package params

import (
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
paramsv1beta1 "cosmossdk.io/api/cosmos/params/v1beta1"
)

// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
return &autocliv1.ModuleOptions{
Query: &autocliv1.ServiceCommandDescriptor{
Service: paramsv1beta1.Query_ServiceDesc.ServiceName,
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "Params",
Use: "subspace [subspace] [key]",
Short: "Query for raw parameters by subspace and key",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "subspace"},
{ProtoField: "key"},
},
},
{
RpcMethod: "Subspaces",
Use: "subspaces",
Short: "Query for all registered subspaces and all keys for a subspace",
},
},
},
}
}
54 changes: 0 additions & 54 deletions x/params/client/cli/query.go

This file was deleted.

Loading