refactor: wrong autocli description (#18120)
This commit is contained in:
parent
437373e6d2
commit
3747519da0
@ -76,6 +76,14 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
},
|
||||
},
|
||||
},
|
||||
// Tx is purposely left empty, as the only tx is MsgUpdateParams which is gov gated.
|
||||
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||
Service: authv1beta1.Msg_ServiceDesc.ServiceName,
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "UpdateParams",
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
|
||||
gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
"github.com/spf13/cobra"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
modulev1 "cosmossdk.io/api/cosmos/vesting/module/v1"
|
||||
@ -16,6 +17,7 @@ import (
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/module"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
|
||||
)
|
||||
|
||||
@ -62,6 +64,11 @@ func (AppModuleBasic) ValidateGenesis(_ codec.JSONCodec, _ client.TxEncodingConf
|
||||
// is a no-op.
|
||||
func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *gwruntime.ServeMux) {}
|
||||
|
||||
// GetTxCmd returns the root tx command for the vesting module.
|
||||
func (amb AppModuleBasic) GetTxCmd() *cobra.Command {
|
||||
return cli.GetTxCmd()
|
||||
}
|
||||
|
||||
// AppModule extends the AppModuleBasic implementation by implementing the
|
||||
// AppModule interface.
|
||||
type AppModule struct {
|
||||
|
||||
@ -23,6 +23,14 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
"comet": cmtservice.CometBFTAutoCLIDescriptor,
|
||||
},
|
||||
},
|
||||
// Tx is purposely left empty, as the only tx is MsgUpdateParams which is gov gated.
|
||||
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||
Service: consensusv1.Msg_ServiceDesc.ServiceName,
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "UpdateParams",
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@ import (
|
||||
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
govv1 "cosmossdk.io/api/cosmos/gov/v1"
|
||||
govv1beta1 "cosmossdk.io/api/cosmos/gov/v1beta1"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/version"
|
||||
)
|
||||
@ -91,12 +90,6 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
Short: "Query the current chain constitution",
|
||||
},
|
||||
},
|
||||
// map v1beta1 as a sub-command
|
||||
SubCommands: map[string]*autocliv1.ServiceCommandDescriptor{
|
||||
"v1beta1": {
|
||||
Service: govv1beta1.Query_ServiceDesc.ServiceName,
|
||||
},
|
||||
},
|
||||
EnhanceCustomCommand: true, // We still have manual commands in gov that we want to keep
|
||||
},
|
||||
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||
@ -141,12 +134,6 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
},
|
||||
// map v1beta1 as a sub-command
|
||||
SubCommands: map[string]*autocliv1.ServiceCommandDescriptor{
|
||||
"v1beta1": {
|
||||
Service: govv1beta1.Msg_ServiceDesc.ServiceName,
|
||||
},
|
||||
},
|
||||
EnhanceCustomCommand: true, // We still have manual commands in gov that we want to keep
|
||||
},
|
||||
}
|
||||
|
||||
@ -232,7 +232,7 @@ func NewCmdWeightedVote() *cobra.Command {
|
||||
find the proposal-id by running "%s query gov proposals".
|
||||
|
||||
Example:
|
||||
$ %s tx gov weighted-vote 1 yes=0.6,no=0.3,abstain=0.05,no_with_veto=0.05 --from mykey
|
||||
$ %s tx gov weighted-vote 1 yes=0.6,no=0.3,abstain=0.05,no-with-veto=0.05 --from mykey
|
||||
`,
|
||||
version.AppName, version.AppName,
|
||||
),
|
||||
|
||||
@ -153,8 +153,8 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
},
|
||||
{
|
||||
RpcMethod: "UpdateGroupPolicyMetadata",
|
||||
Use: "update-group-policy-admin [admin] [group-policy-account] [new-admin]",
|
||||
Short: "Update a group policy admin",
|
||||
Use: "update-group-policy-metadata [admin] [group-policy-account] [new-metadata]",
|
||||
Short: "Update a group policy metadata",
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "admin"}, {ProtoField: "group_policy_address"}, {ProtoField: "metadata"},
|
||||
},
|
||||
|
||||
@ -28,7 +28,13 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
},
|
||||
},
|
||||
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||
Service: mintv1beta1.Query_ServiceDesc.ServiceName,
|
||||
Service: mintv1beta1.Msg_ServiceDesc.ServiceName,
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "UpdateParams",
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,7 +47,17 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
},
|
||||
},
|
||||
Tx: &autocliv1.ServiceCommandDescriptor{
|
||||
Service: upgradev1beta1.Query_ServiceDesc.ServiceName,
|
||||
Service: upgradev1beta1.Msg_ServiceDesc.ServiceName,
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "SoftwareUpgrade",
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
{
|
||||
RpcMethod: "CancelUpgrade",
|
||||
Skip: true, // skipped because authority gated
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user