Skip to content

Commit

Permalink
feat(x/crisis): add autocli options for tx (#17965)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Oct 6, 2023
1 parent 96e68fa commit 12b45f3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 173 deletions.
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

0 comments on commit 12b45f3

Please sign in to comment.