From eafbcda5b8adf0e0a1631e11b774e1bc1bc84726 Mon Sep 17 00:00:00 2001 From: Son Nguyen Date: Fri, 15 Mar 2024 22:29:00 +0700 Subject: [PATCH] feat: add snapshots command --- cmd/dhealthd/cmd/root.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmd/dhealthd/cmd/root.go b/cmd/dhealthd/cmd/root.go index 3f9050f..d85d281 100644 --- a/cmd/dhealthd/cmd/root.go +++ b/cmd/dhealthd/cmd/root.go @@ -44,6 +44,8 @@ import ( "github.com/dhealthproject/dhealth/app" appparams "github.com/dhealthproject/dhealth/app/params" + + "github.com/cosmos/cosmos-sdk/client/snapshot" ) // NewRootCmd creates a new root command for a Cosmos SDK application @@ -111,6 +113,11 @@ func initRootCmd( initSDKConfig() gentxModule := app.ModuleBasics[genutiltypes.ModuleName].(genutil.AppModuleBasic) + + a := appCreator{ + encodingConfig, + } + rootCmd.AddCommand( genutilcli.InitCmd(app.ModuleBasics, app.DefaultNodeHome), genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome, gentxModule.GenTxValidator), @@ -126,13 +133,10 @@ func initRootCmd( tmcli.NewCompletionCmd(rootCmd, true), debug.Cmd(), config.Cmd(), + snapshot.Cmd(a.newApp), // this line is used by starport scaffolding # root/commands ) - a := appCreator{ - encodingConfig, - } - // add server commands server.AddCommands( rootCmd,