cmd

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGenesisAccountCmd

func AddGenesisAccountCmd(defaultNodeHome string) *cobra.Command

AddGenesisAccountCmd returns add-genesis-account cobra Command.

func SetPrefixes

func SetPrefixes(accountAddressPrefix string)

Types

type App

type App interface {
	servertypes.Application
	ExportableApp
}

App represents a Cosmos SDK application that can be run as a server and with an exportable state

type AppBuilder

type AppBuilder func(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	skipUpgradeHeights map[int64]bool,
	homePath string,
	invCheckPeriod uint,
	encodingConfig EncodingConfig,
	appOpts servertypes.AppOptions,
	baseAppOptions ...func(*baseapp.BaseApp),
) App

AppBuilder is a method that allows to build an app

type EncodingConfig

type EncodingConfig struct {
	InterfaceRegistry types.InterfaceRegistry
	Marshaler         codec.Codec
	TxConfig          client.TxConfig
	Amino             *codec.LegacyAmino
}

EncodingConfig specifies the concrete encoding types to use for a given app. This is provided for compatibility between protobuf and amino implementations.

func MakeEncodingConfig

func MakeEncodingConfig(moduleBasics module.BasicManager) EncodingConfig

MakeEncodingConfig creates an EncodingConfig for testing

func NewRootCmd

func NewRootCmd(
	appName,
	accountAddressPrefix,
	defaultNodeHome,
	defaultChainID string,
	moduleBasics module.BasicManager,
	buildApp AppBuilder,
	options ...Option,
) (*cobra.Command, EncodingConfig)

NewRootCmd creates a new root command for a Cosmos SDK application

type ExportableApp

type ExportableApp interface {
	ExportAppStateAndValidators(
		forZeroHeight bool,
		jailAllowedAddrs []string,
		modulesToExport []string,
	) (servertypes.ExportedApp, error)
	LoadHeight(height int64) error
}

ExportableApp represents an app with an exportable state

type Option

type Option func(*rootOptions)

Option configures root command option.

func AddSubCmd

func AddSubCmd(cmd ...*cobra.Command) Option

AddSubCmd adds sub commands.

func CustomizeStartCmd

func CustomizeStartCmd(h func(startCmd *cobra.Command)) Option

CustomizeStartCmd accepts a handler to customize the start command.

func WithEnvPrefix

func WithEnvPrefix(envPrefix string) Option

WithEnvPrefix accepts a new prefix for environment variables.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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