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(mint): autocli query support #16632

Closed
wants to merge 1 commit into from
Closed
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
35 changes: 35 additions & 0 deletions x/mint/autocli.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package mint

import (
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
mintv1beta1 "cosmossdk.io/api/cosmos/mint/v1beta1"
)

// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
return &autocliv1.ModuleOptions{
Query: &autocliv1.ServiceCommandDescriptor{
Service: mintv1beta1.Query_ServiceDesc.ServiceName,
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "Params",
Use: "params",
Short: "Query the current minting parameters",
},
{
RpcMethod: "Inflation",
Use: "inflation",
Short: "Query the current minting inflation value",
},
{
RpcMethod: "AnnualProvisions",
Use: "annual-provisions",
Short: "Query the current minting annual provisions value",
},
},
},
Tx: &autocliv1.ServiceCommandDescriptor{
Service: mintv1beta1.Msg_ServiceDesc.ServiceName,
},
}
}
117 changes: 0 additions & 117 deletions x/mint/client/cli/query.go

This file was deleted.

207 changes: 0 additions & 207 deletions x/mint/client/cli/query_test.go

This file was deleted.

3 changes: 1 addition & 2 deletions x/mint/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/cosmos/cosmos-sdk/x/mint/client/cli"
"github.com/cosmos/cosmos-sdk/x/mint/exported"
"github.com/cosmos/cosmos-sdk/x/mint/keeper"
"github.com/cosmos/cosmos-sdk/x/mint/simulation"
Expand Down Expand Up @@ -88,7 +87,7 @@ func (AppModuleBasic) GetTxCmd() *cobra.Command { return nil }

// GetQueryCmd returns the root query command for the mint module.
func (AppModuleBasic) GetQueryCmd() *cobra.Command {
return cli.GetQueryCmd()
return nil
}

// AppModule implements an application module for the mint module.
Expand Down