Documentation ¶
Index ¶
- func InitRootCmd[T transaction.Tx](rootCmd *cobra.Command, logger log.Logger, deps CommandDependencies[T]) (serverv2.ConfigWriter, error)
- func NewRootCmd[T transaction.Tx](args ...string) (*cobra.Command, error)
- func NewTestnetCmd[T transaction.Tx](mm *runtimev2.MM[T]) *cobra.Command
- func ProvideClientContext(configMap runtime.GlobalConfig, appCodec codec.Codec, ...) client.Context
- func RootCommandPersistentPreRun(clientCtx client.Context) func(*cobra.Command, []string) error
- type CommandDependencies
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRootCmd ¶
func InitRootCmd[T transaction.Tx]( rootCmd *cobra.Command, logger log.Logger, deps CommandDependencies[T], ) (serverv2.ConfigWriter, error)
InitRootCmd adds sub-commands to the root command.
func NewRootCmd ¶
NewRootCmd creates a root command
func NewTestnetCmd ¶
NewTestnetCmd creates a root testnet command with subcommands to run an in-process testnet or initialize validator configuration files for running a multi-validator testnet in a separate process
func ProvideClientContext ¶
func ProvideClientContext( configMap runtime.GlobalConfig, appCodec codec.Codec, interfaceRegistry codectypes.InterfaceRegistry, txConfigOpts tx.ConfigOptions, legacyAmino registry.AminoRegistrar, addressCodec address.Codec, validatorAddressCodec address.ValidatorAddressCodec, consensusAddressCodec address.ConsensusAddressCodec, ) client.Context
ProvideClientContext is a depinject Provider function which assembles and returns a client.Context.
Types ¶
type CommandDependencies ¶
type CommandDependencies[T transaction.Tx] struct { GlobalConfig coreserver.ConfigMap TxConfig client.TxConfig ModuleManager *runtimev2.MM[T] App *app.App[T] // could generally be more generic with serverv2.ServerComponent[T] // however, we want to register extra grpc handlers ConsensusServer *cometbft.CometBFTServer[T] ClientContext client.Context }
CommandDependencies is a struct that contains all the dependencies needed to initialize the root command. an alternative design could fetch these even later from the command context
Click to show internal directories.
Click to hide internal directories.