diff --git a/cmd/lavad/cmd/root.go b/cmd/lavad/cmd/root.go index d33ecfbea..e25cf025a 100644 --- a/cmd/lavad/cmd/root.go +++ b/cmd/lavad/cmd/root.go @@ -98,7 +98,7 @@ func NewRootCmd() (*cobra.Command, appparams.EncodingConfig) { }, } - initRootCmd(rootCmd, encodingConfig, tempApplication.ModuleBasics) + initRootCmd(rootCmd, encodingConfig) addLogFlagsToSubCommands(rootCmd) if err := autoCliOpts(initClientCtx, tempApplication).EnhanceRootCommand(rootCmd); err != nil { @@ -151,7 +151,7 @@ func NewLavaProtocolRootCmd() *cobra.Command { tempApplication := app.New(log.NewNopLogger(), dbm.NewMemDB(), nil, true, map[int64]bool{}, app.DefaultNodeHome, 5, encodingConfig, sims.EmptyAppOptions{}) - initLavaProtocolRootCmd(rootCmd, tempApplication.ModuleBasics) + initLavaProtocolRootCmd(rootCmd) addLogFlagsToSubCommands(rootCmd) if err := autoCliOpts(initClientCtx, tempApplication).EnhanceRootCommand(rootCmd); err != nil { @@ -184,15 +184,14 @@ func autoCliOpts(initClientCtx client.Context, tempApp *app.LavaApp) autocli.App func initLavaProtocolRootCmd( rootCmd *cobra.Command, - moduleBasics module.BasicManager, ) { rootCmd.AddCommand( tmcli.NewCompletionCmd(rootCmd, true), ) rootCmd.AddCommand( - queryCommand(moduleBasics), - txCommand(moduleBasics), + queryCommand(), + txCommand(), keys.Commands(), ) @@ -233,7 +232,6 @@ func initTendermintConfig() *tmcfg.Config { func initRootCmd( rootCmd *cobra.Command, encodingConfig appparams.EncodingConfig, - moduleBasics module.BasicManager, ) { gentxModule, ok := app.ModuleBasics[genutiltypes.ModuleName].(genutil.AppModuleBasic) if !ok { @@ -275,8 +273,8 @@ func initRootCmd( // add keybase, auxiliary RPC, query, and tx child commands rootCmd.AddCommand( server.StatusCommand(), - queryCommand(moduleBasics), - txCommand(moduleBasics), + queryCommand(), + txCommand(), keys.Commands(), ) } @@ -301,7 +299,7 @@ func setLogLevelFieldNameFromFlag(cmd *cobra.Command) error { } // queryCommand returns the sub-command to send queries to the app -func queryCommand(moduleBasics module.BasicManager) *cobra.Command { +func queryCommand() *cobra.Command { cmd := &cobra.Command{ Use: "query", Aliases: []string{"q"}, @@ -319,14 +317,13 @@ func queryCommand(moduleBasics module.BasicManager) *cobra.Command { authcmd.QueryTxCmd(), ) - moduleBasics.AddQueryCommands(cmd) cmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID") return cmd } // txCommand returns the sub-command to send transactions to the app -func txCommand(moduleBasics module.BasicManager) *cobra.Command { +func txCommand() *cobra.Command { cmd := &cobra.Command{ Use: "tx", Short: "Transactions subcommands", @@ -346,7 +343,6 @@ func txCommand(moduleBasics module.BasicManager) *cobra.Command { authcmd.GetDecodeCommand(), ) - moduleBasics.AddTxCommands(cmd) cmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID") return cmd