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(x/crisis): add autocli options for tx #17965

Merged
merged 6 commits into from
Oct 6, 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
15 changes: 11 additions & 4 deletions x/crisis/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
Service: crisisv1beta1.Msg_ServiceDesc.ServiceName,
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "VerifyInvariant",
Use: "invariant-broken [module-name] [invariant-route]",
Short: "Submit proof that an invariant broken to halt the chain",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "invariant_module_name"}, {ProtoField: "invariant_route"}},
RpcMethod: "VerifyInvariant",
Use: "invariant-broken [module-name] [invariant-route] --from mykey",
Short: "Submit proof that an invariant broken",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "invariant_module_name"},
{ProtoField: "invariant_route"},
},
},
{
RpcMethod: "UpdateParams",
Skip: true, // Skipped because UpdateParams is authority gated
},
},
},
Expand Down
60 changes: 0 additions & 60 deletions x/crisis/client/cli/tx.go

This file was deleted.

103 changes: 0 additions & 103 deletions x/crisis/client/cli/tx_test.go

This file was deleted.

6 changes: 0 additions & 6 deletions x/crisis/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"github.com/cosmos/cosmos-sdk/telemetry"
"github.com/cosmos/cosmos-sdk/types/module"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/cosmos/cosmos-sdk/x/crisis/client/cli"
"github.com/cosmos/cosmos-sdk/x/crisis/keeper"
"github.com/cosmos/cosmos-sdk/x/crisis/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
Expand Down Expand Up @@ -79,11 +78,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod
// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the crisis module.
func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *gwruntime.ServeMux) {}

// GetTxCmd returns the root tx command for the crisis module.
func (b AppModuleBasic) GetTxCmd() *cobra.Command {
return cli.NewTxCmd()
}

// RegisterInterfaces registers interfaces and implementations of the crisis
// module.
func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) {
Expand Down