cmd

package
v0.1.429-bweng-test-1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: Apache-2.0 Imports: 62 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCacheSize int    = 10000
	FlagDBPath       string = "db-path"
	FlagOutputDir    string = "output-dir"
	FlagModuleName   string = "module"
)
View Source
const (
	// FlagOverwrite defines a flag to overwrite an existing genesis JSON file.
	FlagOverwrite = "overwrite"

	// FlagSeed defines a flag to initialize the private validator key from a specific seed.
	FlagRecover = "recover"
)
View Source
const UNRECOGNIZED = "Unrecognized Prefix"

Variables

View Source
var ModuleParserMap = map[string]ModuleParser{
	"bank":    BankParser,
	"mint":    MintParser,
	"dex":     DexParser,
	"staking": StakingParser,
}

Functions

func AddGenesisAccountCmd

func AddGenesisAccountCmd(defaultNodeHome string) *cobra.Command

AddGenesisAccountCmd returns add-genesis-account cobra Command.

func BankParser

func BankParser(key []byte) ([]string, error)

func BuildPrefix

func BuildPrefix(moduleName string) string

func DexParser

func DexParser(key []byte) ([]string, error)

func DumpIavlCmd

func DumpIavlCmd() *cobra.Command

func InitCmd

func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command

InitCmd returns a command that initializes all files needed for Tendermint and the respective application.

func MatchAndExtractDexAddressPrefixKeys

func MatchAndExtractDexAddressPrefixKeys(key []byte) (bool, []string, []byte, error)

func MintParser

func MintParser(key []byte) ([]string, error)

func NewRootCmd

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

NewRootCmd creates a new root command for a Cosmos SDK application

func OpenDB

func OpenDB(dir string) (dbm.DB, error)

func PrintKeys

func PrintKeys(tree *iavl.MutableTree, moduleParser ModuleParser) []byte

func PrintShape

func PrintShape(tree *iavl.MutableTree) ([]byte, error)

func PrintVersions

func PrintVersions(tree *iavl.MutableTree)

func ReadTree

func ReadTree(db dbm.DB, version int, prefix []byte) (*iavl.MutableTree, error)

ReadTree loads an iavl tree from the directory If version is 0, load latest, otherwise, load named version The prefix represents which iavl tree you want to read. The iaviwer will always set a prefix.

func StakingParser

func StakingParser(key []byte) ([]string, error)

Types

type ModuleParser

type ModuleParser func([]byte) ([]string, error)

type Option

type Option func(*rootOptions)

Option configures root command option.

Jump to

Keyboard shortcuts

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