Skip to content

Commit

Permalink
root.go
Browse files Browse the repository at this point in the history
  • Loading branch information
GNaD13 committed Apr 29, 2024
1 parent d900b4c commit 49ed0da
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Binary file added test/.DS_Store
Binary file not shown.
16 changes: 13 additions & 3 deletions test/simapp/simd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ import (
"os"
"path/filepath"

rosettaCmd "cosmossdk.io/tools/rosetta/cmd"

dbm "github.com/cometbft/cometbft-db"
tmcfg "github.com/cometbft/cometbft/config"
tmcli "github.com/cometbft/cometbft/libs/cli"
"github.com/cometbft/cometbft/libs/log"
"github.com/realio-tech/multi-staking-module/test/simapp"
app "github.com/realio-tech/multi-staking-module/test/simapp"
"github.com/spf13/cast"
"github.com/spf13/cobra"

Expand All @@ -34,6 +37,7 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/cosmos/cosmos-sdk/x/crisis"
genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
)

// NewRootCmd creates a new root command for simd. It is called once in the
Expand Down Expand Up @@ -158,7 +162,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) {

rootCmd.AddCommand(
genutilcli.InitCmd(simapp.ModuleBasics, simapp.DefaultNodeHome),
genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, simapp.DefaultNodeHome),
genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome, genutiltypes.DefaultMessageValidator),
genutilcli.MigrateGenesisCmd(),
genutilcli.GenTxCmd(simapp.ModuleBasics, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, simapp.DefaultNodeHome),
genutilcli.ValidateGenesisCmd(simapp.ModuleBasics),
Expand All @@ -181,7 +185,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) {
)

// add rosetta
rootCmd.AddCommand(server.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Codec))
rootCmd.AddCommand(rosettaCmd.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Codec))
}

func addModuleInitFlags(startCmd *cobra.Command) {
Expand Down Expand Up @@ -296,8 +300,14 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a
// appExport creates a new simapp (optionally at a given height)
// and exports state.
func (a appCreator) appExport(
logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string,
logger log.Logger,
db dbm.DB,
traceStore io.Writer,
height int64,
forZeroHeight bool,
jailAllowedAddrs []string,
appOpts servertypes.AppOptions,
modulesToExport []string,
) (servertypes.ExportedApp, error) {
var simApp *simapp.SimApp
homePath, ok := appOpts.Get(flags.FlagHome).(string)
Expand Down

0 comments on commit 49ed0da

Please sign in to comment.