cmd

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2025 License: Apache-2.0 Imports: 56 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagCudosGenesisPath           = "cudos-genesis-path"
	FlagCudosGenesisSha256         = "cudos-genesis-sha256"
	FlagCudosMigrationConfigPath   = "cudos-migration-config-path"
	FlagCudosMigrationConfigSha256 = "cudos-migration-config-sha256"

	FlagManifestDestinationPath = "manifest-destination-path"
)

Module init related flags

Variables

This section is empty.

Functions

func AddCommandExtractAddressInfo added in v0.14.0

func AddCommandExtractAddressInfo(networkMergeCmd *cobra.Command)

func AddCommandManifestAddressInfo added in v0.14.0

func AddCommandManifestAddressInfo(networkMergeCmd *cobra.Command)

func AddCommandVerify added in v0.14.0

func AddCommandVerify(networkMergeCmd *cobra.Command)

func AddCudosFlags added in v0.14.0

func AddCudosFlags(startCmd *cobra.Command)

func AddGenesisAccountCmd

func AddGenesisAccountCmd(defaultNodeHome string) *cobra.Command

AddGenesisAccountCmd returns add-genesis-account cobra Command.

func AddGenesisDelegationCmd

func AddGenesisDelegationCmd(defaultNodeHome string) *cobra.Command

AddGenesisDelegationCmd returns a command to add delegations to genesis.

func AddGenesisWasmMsgCmd

func AddGenesisWasmMsgCmd(defaultNodeHome string) *cobra.Command

func ExtractAddressInfo added in v0.14.0

func ExtractAddressInfo(configFilePath string, GenesisFilePath string, address string, ctx client.Context) error

func LoadGenesisDataFromFile added in v0.14.0

func LoadGenesisDataFromFile(GenesisFilePath string, cudosConfig *app.CudosMergeConfig, manifest *app.UpgradeManifest) (*app.GenesisData, error)

func ManifestAddressInfo added in v0.14.0

func ManifestAddressInfo(manifestFilePath string, address string, ctx client.Context) error

func NewRootCmd

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

NewRootCmd creates a new root command for simd. It is called once in the main function.

func NormaliseJsonFileContent added in v0.14.0

func NormaliseJsonFileContent(path string) (string, error)

func NormaliseJsonFileContentSha256Hex added in v0.14.0

func NormaliseJsonFileContentSha256Hex(path string) (string, error)

func NormalizeJSON added in v0.14.0

func NormalizeJSON(data interface{}) interface{}

NormalizeJSON recursively normalizes the JSON by sorting keys in maps and removing whitespace.

func NormalizeJSONString added in v0.14.0

func NormalizeJSONString(input string) (string, error)

NormalizeJSONString takes a JSON string, normalizes it, and returns the result as a minified string.

func ReadJSONFile added in v0.14.0

func ReadJSONFile(filePath string) (string, error)

ReadJSONFile reads the content of a JSON file and returns it as a []byte.

func VerifyConfigFile added in v0.14.0

func VerifyConfigFile(configFilePath string, GenesisFilePath string, ctx client.Context, manifestFilePath string) error

VerifyConfigFile validates the content of a JSON configuration file.

Types

type DelegationsAggrEntry added in v0.14.0

type DelegationsAggrEntry struct {
	Address      string  `json:"address"`
	SourceTokens sdk.Int `json:"src_amount,omitempty"`
	DestTokens   sdk.Int `json:"dest_amount,omitempty"`
}

type ManifestData added in v0.14.0

type ManifestData struct {
	InitialBalances *app.OrderedMap[string, app.UpgradeBalances]
	MovedBalances   *app.OrderedMap[string, app.UpgradeBalances]

	MigratedBalances     *app.OrderedMap[string, []app.UpgradeBalanceMovement]
	MigratedBalancesAggr *app.OrderedMap[string, MigratedBalance]

	Delegations     *app.OrderedMap[string, []app.UpgradeDelegation]
	DelegationsAggr *app.OrderedMap[string, DelegationsAggrEntry]
	// contains filtered or unexported fields
}

type MigratedBalance added in v0.14.0

type MigratedBalance struct {
	Address       string    `json:"address"`
	SourceBalance sdk.Coins `json:"src_balance,omitempty"`
	DestBalance   sdk.Coins `json:"dest_balance,omitempty"`
}

Jump to

Keyboard shortcuts

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