Skip to content

Commit

Permalink
feat(params): autocli query support (#17007)
Browse files Browse the repository at this point in the history
(cherry picked from commit 7bf289d)

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
julienrbrt authored and mergify[bot] committed Jul 15, 2023
1 parent fbe45d6 commit 1bac0d5
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 336 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Improvements

<<<<<<< HEAD
* (x/bank) [#16899](https://github.com/cosmos/cosmos-sdk/pull/16899) Align CLI queries with gRPC queries thanks to AutoCLI.
=======
* (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.
>>>>>>> 7bf289d4b (feat(params): autocli query support (#17007))
* (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).
* (x/authz) [#16869](https://github.com/cosmos/cosmos-sdk/pull/16869) Improve error message when grant not found.
Expand Down Expand Up @@ -90,7 +94,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

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

0 comments on commit 1bac0d5

Please sign in to comment.