cmd

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 84 Imported by: 0

Documentation

Overview

Package cmd contains provenance daemon init functionality.

Index

Constants

View Source
const (
	FlagMarkdown = "markdown"
	FlagYaml     = "yaml"
	FlagRst      = "rst"
	FlagManpage  = "manpage"
)
View Source
const (
	// FlagOverwrite defines a flag to overwrite an existing genesis JSON file.
	FlagOverwrite = "overwrite"
	// FlagRecover defines a flag to initialize the private validator key from a specific seed.
	FlagRecover = "recover"
	// FlagTimeoutCommit is the flag string for providing a consensus.timeout_commit setting.
	FlagTimeoutCommit = "timeout-commit"
)

Variables

View Source
var (
	ErrFail      error = cmderrors.ExitCodeError(30)
	ErrFailRetry error = cmderrors.ExitCodeError(31)
)

Functions

func AddGenesisAccountCmd

func AddGenesisAccountCmd(txConfig client.TxConfig, defaultNodeHome string) *cobra.Command

AddGenesisAccountCmd returns add-account cobra command.

func AddGenesisCustomFloorPriceDenomCmd added in v1.13.0

func AddGenesisCustomFloorPriceDenomCmd(defaultNodeHome string) *cobra.Command

AddGenesisCustomFloorPriceDenomCmd returns add-msg-fee cobra command.

func AddGenesisCustomMarketCmd added in v1.17.1

func AddGenesisCustomMarketCmd(defaultNodeHome string) *cobra.Command

AddGenesisCustomMarketCmd returns add-custom-market cobra command.

func AddGenesisDefaultMarketCmd added in v1.17.1

func AddGenesisDefaultMarketCmd(defaultNodeHome string) *cobra.Command

AddGenesisDefaultMarketCmd returns add-default-market cobra command.

func AddGenesisMarkerCmd

func AddGenesisMarkerCmd(defaultNodeHome string) *cobra.Command

AddGenesisMarkerCmd returns add-marker cobra command.

func AddGenesisMsgFeeCmd added in v1.9.0

func AddGenesisMsgFeeCmd(defaultNodeHome string) *cobra.Command

AddGenesisMsgFeeCmd returns add-msg-fee cobra command.

func AddMetaAddressCmd added in v1.1.0

func AddMetaAddressCmd() *cobra.Command

GetQueryCmd is the top-level command for name CLI queries.

func AddMetaAddressDecoder added in v1.1.0

func AddMetaAddressDecoder() *cobra.Command

AddMetaAddressDecoder returns metadata address parser cobra Command.

func AddMetaAddressEncoder added in v0.2.1

func AddMetaAddressEncoder() *cobra.Command

AddMetaAddressEncoder returns metadata address encoder cobra Command.

func AddRootDomainAccountCmd

func AddRootDomainAccountCmd(defaultNodeHome string) *cobra.Command

AddRootDomainAccountCmd returns add-root-name cobra command.

func ConfigChangedCmd added in v1.7.0

func ConfigChangedCmd() *cobra.Command

ConfigChangedCmd returns a CLI command to get config values different from their defaults.

func ConfigCmd added in v1.7.0

func ConfigCmd() *cobra.Command

ConfigCmd returns a CLI command to update config files.

func ConfigGetCmd added in v1.7.0

func ConfigGetCmd() *cobra.Command

ConfigGetCmd returns a CLI command to get config values.

func ConfigHomeCmd added in v1.9.0

func ConfigHomeCmd() *cobra.Command

ConfigHomeCmd returns a CLI command for ouputting the home directory

func ConfigPackCmd added in v1.7.0

func ConfigPackCmd() *cobra.Command

ConfigPackCmd returns a CLI command for creating a single packed json config file.

func ConfigSetCmd added in v1.7.0

func ConfigSetCmd() *cobra.Command

ConfigSetCmd returns a CLI command to set config values.

func ConfigUnpackCmd added in v1.7.0

func ConfigUnpackCmd() *cobra.Command

ConfigUnpackCmd returns a CLI command for creating the several config toml files.

func Execute

func Execute(rootCmd *cobra.Command) error

Execute executes the root command.

func GenesisCmd added in v1.19.0

func GenesisCmd(txConfig client.TxConfig, moduleBasics module.BasicManager, defaultNodeHome string) *cobra.Command

GenesisCmd creates the genesis command with sub-commands for adding things to the genesis file.

func GetCmdPioSimulateTx added in v1.8.0

func GetCmdPioSimulateTx() *cobra.Command

func GetDocGenCmd added in v1.17.0

func GetDocGenCmd() *cobra.Command

func GetPreUpgradeCmd added in v1.16.0

func GetPreUpgradeCmd() *cobra.Command

GetPreUpgradeCmd returns the pre-upgrade command which cosmovisor runs before starting a node after an upgrade. Anyone not using cosmovisor should manually run this after swapping executables and before restarting the node.

func GetTreeCmd added in v1.19.0

func GetTreeCmd() *cobra.Command

GetTreeCmd gets the tree command that will output all the commands available.

func Init

func Init(
	cmd *cobra.Command,
	mbm module.BasicManager,
	moniker string,
) error

Init initializes genesis and config files.

func InitCmd

func InitCmd(mbm module.BasicManager) *cobra.Command

InitCmd Creates a command for generating genesis and config files.

func InitTestnet

func InitTestnet(
	clientCtx client.Context,
	cmd *cobra.Command,
	nodeConfig *cmtconfig.Config,
	mbm module.BasicManager,
	genBalIterator banktypes.GenesisBalancesIterator,
	outputDir,
	chainID,
	minGasPrices,
	nodeDirPrefix,
	nodeDaemonHome,
	startingIPAddress,
	keyringBackend,
	algoStr string,
	numValidators int,
) error

InitTestnet initializes the testnet

func NewRootCmd

func NewRootCmd(sealConfig bool) (*cobra.Command, params.EncodingConfig)

NewRootCmd creates a new root command for provenanced. It is called once in the main function. Providing sealConfig = false is only for unit tests that want to run multiple commands.

func SafeSaveConfigs added in v1.16.0

func SafeSaveConfigs(cmd *cobra.Command,
	appConfig *serverconfig.Config,
	cmtConfig *cmtconfig.Config,
	clientConfig *config.ClientConfig,
	verbose bool,
) (err error)

SafeSaveConfigs calls config.SaveConfigs but returns an error instead of panicking.

func UpdateConfig added in v1.16.0

func UpdateConfig(cmd *cobra.Command) error

UpdateConfig writes the current config to files. During a pre-upgrade, this, at the very least, updates the config file using the most recent template. It might also force-change some config values.

Types

This section is empty.

Jump to

Keyboard shortcuts

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