Skip to content

Commit

Permalink
feat: add snapshots command
Browse files Browse the repository at this point in the history
  • Loading branch information
nsonanh committed Mar 15, 2024
1 parent 80ec78f commit eafbcda
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions cmd/dhealthd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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),
Expand All @@ -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,
Expand Down

0 comments on commit eafbcda

Please sign in to comment.