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
(cherry picked from commit 12b45f3)

# Conflicts:
#	x/crisis/client/cli/tx_test.go
#	x/crisis/module.go
  • Loading branch information
julienrbrt authored and mergify[bot] committed Oct 6, 2023
1 parent 53d228f commit b86d9c4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 69 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.

8 changes: 3 additions & 5 deletions x/crisis/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
<<<<<<< HEAD

Check failure on line 28 in x/crisis/module.go

View workflow job for this annotation

GitHub Actions / dependency-review

missing import path

Check failure on line 28 in x/crisis/module.go

View workflow job for this annotation

GitHub Actions / dependency-review

missing import path

Check failure on line 28 in x/crisis/module.go

View workflow job for this annotation

GitHub Actions / dependency-review

missing import path

Check failure on line 28 in x/crisis/module.go

View workflow job for this annotation

GitHub Actions / split-test-files

missing import path
"github.com/cosmos/cosmos-sdk/x/crisis/client/cli"
"github.com/cosmos/cosmos-sdk/x/crisis/exported"
=======

Check failure on line 31 in x/crisis/module.go

View workflow job for this annotation

GitHub Actions / dependency-review

missing import path
>>>>>>> 12b45f3db (feat(x/crisis): add autocli options for tx (#17965))

Check failure on line 32 in x/crisis/module.go

View workflow job for this annotation

GitHub Actions / dependency-review

expected ';', found ':'

Check failure on line 32 in x/crisis/module.go

View workflow job for this annotation

GitHub Actions / dependency-review

expected declaration, found 'for'

Check failure on line 32 in x/crisis/module.go

View workflow job for this annotation

GitHub Actions / dependency-review

illegal character U+0023 '#'
"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 @@ -81,11 +84,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 b86d9c4

Please sign in to comment.