cmd

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 81 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"
)
View Source
const (
	// EnvTypeFlag is a flag for indicating a testnet
	EnvTypeFlag = "testnet"
	// Flag used to indicate coin type.
	CoinTypeFlag = "coin-type"
)

Variables

View Source
var (
	ErrFail      error = server.ErrorCode{Code: 30}
	ErrFailRetry error = server.ErrorCode{Code: 31}
)

Functions

func AddGenesisAccountCmd

func AddGenesisAccountCmd(defaultNodeHome string) *cobra.Command

AddGenesisAccountCmd returns add-genesis-account cobra Command.

func AddGenesisCustomFloorPriceDenomCmd added in v1.13.0

func AddGenesisCustomFloorPriceDenomCmd(defaultNodeHome string) *cobra.Command

AddGenesisCustomFloorPriceDenomCmd returns add-genesis-msg-fee cobra command.

func AddGenesisCustomMarketCmd added in v1.17.1

func AddGenesisCustomMarketCmd(defaultNodeHome string) *cobra.Command

AddGenesisCustomMarketCmd returns add-genesis-custom-market cobra command.

func AddGenesisDefaultMarketCmd added in v1.17.1

func AddGenesisDefaultMarketCmd(defaultNodeHome string) *cobra.Command

AddGenesisDefaultMarketCmd returns add-genesis-default-market cobra command.

func AddGenesisMarkerCmd

func AddGenesisMarkerCmd(defaultNodeHome string) *cobra.Command

AddGenesisMarkerCmd configures a marker account and adds it to the list of genesis accounts

func AddGenesisMsgFeeCmd added in v1.9.0

func AddGenesisMsgFeeCmd(defaultNodeHome string, interfaceRegistry types.InterfaceRegistry) *cobra.Command

AddGenesisMsgFeeCmd returns add-genesis-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-genesis-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 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 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 *tmconfig.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,
	tmConfig *tmconfig.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