commands

package
v1.1.1-hotfix.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 27 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InitFilesCmd = &cobra.Command{
	Use:   "init",
	Short: "Initialize Dymint",
	RunE:  initFiles,
}

InitFilesCmd initialises a fresh Dymint Core instance.

View Source
var RootCmd = &cobra.Command{
	Use:   "dymint",
	Short: "ABCI-client implementation for dymension's autonomous rollapps",
	PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {
		v := viper.GetViper()

		if err := v.BindPFlags(cmd.Flags()); err != nil {
			return err
		}

		tmconfig, err = ParseConfig(cmd)
		if err != nil {
			return err
		}

		if tmconfig.LogFormat == cfg.LogFormatJSON {
			logger = log.NewTMJSONLogger(log.NewSyncWriter(os.Stdout))
		}

		logger, err = tmflags.ParseLogLevel(tmconfig.LogLevel, logger, cfg.DefaultLogLevel)
		if err != nil {
			return err
		}

		if viper.GetBool(cli.TraceFlag) {
			logger = log.NewTracingLogger(logger)
		}

		logger = logger.With("module", "main")
		return nil
	},
}

RootCmd is the root command for Dymint core.

View Source
var ShowNodeIDCmd = &cobra.Command{
	Use:     "show-node-id",
	Aliases: []string{"show_node_id"},
	Short:   "Show this node's ID",
	RunE:    showNodeID,
}

ShowNodeIDCmd dumps node's ID to the standard output.

View Source
var ShowSequencer = &cobra.Command{
	Use:     "show-sequencer",
	Aliases: []string{"show_sequencer"},
	Short:   "Show this node's sequencer info",
	RunE:    showSequencer,
}

ShowSequencer adds capabilities for showing the validator info.

Functions

func InitFilesWithConfig

func InitFilesWithConfig(config *cfg.Config) error

InitFilesWithConfig initialises a fresh Dymint instance.

func NewRunNodeCmd

func NewRunNodeCmd() *cobra.Command

NewRunNodeCmd returns the command that allows the CLI to start a node. It can be used with a custom PrivValidator and in-process ABCI application.

func ParseConfig

func ParseConfig(cmd *cobra.Command) (*cfg.Config, error)

ParseConfig retrieves the default environment configuration, sets up the Dymint root and ensures that the root exists

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL