init

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MPL-2.0 Imports: 38 Imported by: 0

Documentation

Overview

Why we overwrite the Init/Testnet functions in cosmos-sdk: 1. Cosmos moved init/testnet cmds to the gaia packages which we never and should not imports. 2. Cosmos has a different init/testnet workflow from ours. Also, the init cmd has some bugs. 3. After overwrite, the code is cleaner and easier to maintain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectGenTxsCmd

func CollectGenTxsCmd(cdc *codec.Codec, appInit server.AppInit) *cobra.Command

func CreateValOperAccount

func CreateValOperAccount(clientDir, keyName string) (sdk.ValAddress, string)

func ExportGenesisFile

func ExportGenesisFile(
	genFile, chainID string, validators []types.GenesisValidator, appState json.RawMessage,
) error

ExportGenesisFile creates and writes the genesis configuration to disk. An error is returned if building or writing the configuration to file fails.

func ExportGenesisFileWithTime

func ExportGenesisFileWithTime(
	genFile, chainID string, validators []types.GenesisValidator,
	appState json.RawMessage, genTime time.Time,
) error

ExportGenesisFileWithTime creates and writes the genesis configuration to disk. An error is returned if building or writing the configuration to file fails.

func GenTxCmd

func GenTxCmd(ctx *server.Context, cdc *codec.Codec) *cobra.Command

GenTxCmd builds the gaiad gentx command. nolint: errcheck

func InitCmd

func InitCmd(ctx *server.Context, cdc *codec.Codec, appInit server.AppInit) *cobra.Command

get cmd to initialize all files for tendermint and application nolint

func InitializeNodeValidatorFiles

func InitializeNodeValidatorFiles(config *cfg.Config) (nodeID string, valPubKey crypto.PubKey)

InitializeNodeValidatorFiles creates private validator and p2p configuration files.

func PrepareCreateValidatorTx

func PrepareCreateValidatorTx(cdc *codec.Codec, chainId, name, memo string,
	valOperAddr sdk.ValAddress, valPubKey crypto.PubKey) json.RawMessage

func ReadOrCreatePrivValidator

func ReadOrCreatePrivValidator(privValKeyFile, privValStateFile string) crypto.PubKey

read of create the private key file for this config

func SnapshotCmd

func SnapshotCmd(ctx *server.Context, cdc *codec.Codec) *cobra.Command

func TestnetFilesCmd

func TestnetFilesCmd(ctx *server.Context, cdc *wire.Codec, appInit server.AppInit) *cobra.Command

get cmd to initialize all files for tendermint testnet and application

func WriteConfigFile

func WriteConfigFile(config *cfg.Config)

Types

This section is empty.

Jump to

Keyboard shortcuts

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