cmd

package
v23.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 106 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagSelectPoolIds      = "breakdown-by-pool-ids"
	FlagMinimumStakeAmount = "minimum-stake-amount"
)
View Source
const (
	EnvVariable = "OSMOSISD_ENVIRONMENT"
	EnvMainnet  = "mainnet"
	EnvTestnet  = "testnet"
	EnvLocalnet = "localnet"
)
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"

	// FlagSetEnv defines a flag to create environment file & save current home directory into it.
	FlagSetEnv = "set-env"
)

Variables

This section is empty.

Functions

func AddGenesisAccountCmd

func AddGenesisAccountCmd(defaultNodeHome string) *cobra.Command

AddGenesisAccountCmd returns add-genesis-account cobra Command.

func ChangeEnvironmentCmd

func ChangeEnvironmentCmd() *cobra.Command

ExportAirdropSnapshotCmd generates a snapshot.json from a provided exported genesis.json.

func ConfigCmd

func ConfigCmd() *cobra.Command

Override sdk ConfigCmd func

func ConvertBech32Cmd

func ConvertBech32Cmd() *cobra.Command

get cmd to convert any bech32 address to an osmo prefix.

func CreateEnvFile

func CreateEnvFile(cmd *cobra.Command) error

func DebugProtoMarshalledBytes

func DebugProtoMarshalledBytes() *cobra.Command

convert requested proto struct into proto marshalled bytes

func ExportDeriveBalancesCmd

func ExportDeriveBalancesCmd() *cobra.Command

ExportAirdropSnapshotCmd generates a snapshot.json from a provided exported genesis.json.

func GetChainId

func GetChainId(initClientCtx client.Context, cmd *cobra.Command) string

func GetHumanReadableDenomEnvVariables

func GetHumanReadableDenomEnvVariables() (bool, bool)

func GetStructAndFill

func GetStructAndFill(queryPath, module, structName string, structArguments ...string) (interface{}, error)

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 InitTestnet

func InitTestnet(
	clientCtx client.Context,
	cmd *cobra.Command,
	nodeConfig *tmconfig.Config,
	mbm module.BasicManager,
	genBalIterator banktypes.GenesisBalancesIterator,
	genesisParams GenesisParams,
	chainID string,
	outputDir,
	minGasPrices,
	nodeDirPrefix,
	nodeDaemonHome,
	startingIPAddress,
	keyringBackend,
	algoStr string,
	numValidators int,
) error

InitTestnet initializes the testnet.

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 PrepareGenesis

func PrepareGenesis(clientCtx client.Context, appState map[string]json.RawMessage, genDoc *tmtypes.GenesisDoc, genesisParams GenesisParams, chainID string) (map[string]json.RawMessage, *tmtypes.GenesisDoc, error)

func PrepareGenesisCmd

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

func PrintAllEnvironmentCmd

func PrintAllEnvironmentCmd() *cobra.Command

func PrintEnvironmentCmd

func PrintEnvironmentCmd() *cobra.Command

PrintEnvironmentCmd prints the current environment.

func SetCustomEnvVariablesFromClientToml

func SetCustomEnvVariablesFromClientToml(ctx client.Context)

Reads the custom extra values in the config.toml file if set. If they are, then use them.

func StakedToCSVCmd

func StakedToCSVCmd() *cobra.Command

StakedToCSVCmd generates a airdrop.csv from a provided exported balances.json.

func UpdateAssetListCmd

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

Types

type Asset

type Asset struct {
	DenomUnits []DenomUnit `json:"denom_units"`
	Symbol     string      `json:"symbol"`
	Base       string      `json:"base"`
	Traces     []Trace     `json:"traces"`
}

type AssetList

type AssetList struct {
	Assets []Asset `json:"assets"`
}

type DenomUnit

type DenomUnit struct {
	Denom    string   `json:"denom"`
	Exponent uint64   `json:"exponent"`
	Aliases  []string `json:"aliases"`
}

type DenomUnitMap

type DenomUnitMap struct {
	Base     string
	Exponent uint64 `json:"exponent"`
}

type DeriveSnapshot

type DeriveSnapshot struct {
	NumberAccounts uint64                    `json:"num_accounts"`
	Accounts       map[string]DerivedAccount `json:"accounts"`
}

type DerivedAccount

type DerivedAccount struct {
	// TODO: Consider removing this, since duplicated
	Address             string               `json:"address"`
	LiquidBalances      sdk.Coins            `json:"liquid_balance"`
	Staked              osmomath.Int         `json:"staked"`
	UnbondingStake      osmomath.Int         `json:"unbonding_stake"`
	Bonded              sdk.Coins            `json:"bonded"`
	BondedBySelectPools map[uint64]sdk.Coins `json:"bonded_by_select_pools"`
	TotalBalances       sdk.Coins            `json:"total_balances"`
}

DerivedAccount provide fields of snapshot per account It is the simplified struct we are presenting in this 'balances from state export' snapshot for people.

type GenesisParams

type GenesisParams struct {
	AirdropSupply osmomath.Int

	StrategicReserveAccounts []banktypes.Balance

	ConsensusParams *tmtypes.ConsensusParams

	GenesisTime         time.Time
	NativeCoinMetadatas []banktypes.Metadata

	StakingParams      stakingtypes.Params
	MintParams         minttypes.Params
	DistributionParams distributiontypes.Params
	GovParams          govtypesv1.Params

	CrisisConstantFee sdk.Coin

	SlashingParams    slashingtypes.Params
	IncentivesGenesis incentivestypes.GenesisState

	PoolIncentivesGenesis poolincentivestypes.GenesisState

	Epochs []epochstypes.EpochInfo
}

func MainnetGenesisParams

func MainnetGenesisParams() GenesisParams

func TestnetGenesisParams

func TestnetGenesisParams() GenesisParams

type OsmosisCustomClient

type OsmosisCustomClient struct {
	ChainID                   string `mapstructure:"chain-id" json:"chain-id"`
	KeyringBackend            string `mapstructure:"keyring-backend" json:"keyring-backend"`
	Output                    string `mapstructure:"output" json:"output"`
	Node                      string `mapstructure:"node" json:"node"`
	BroadcastMode             string `mapstructure:"broadcast-mode" json:"broadcast-mode"`
	Gas                       string `mapstructure:"gas" json:"gas"`
	GasPrices                 string `mapstructure:"gas-prices" json:"gas-prices"`
	GasAdjustment             string `mapstructure:"gas-adjustment" json:"gas-adjustment"`
	Fees                      string `mapstructure:"fees" json:"fees"`
	HumanReadableDenomsInput  bool   `mapstructure:"human-readable-denoms-input" json:"human-readable-denoms-input"`
	HumanReadableDenomsOutput bool   `mapstructure:"human-readable-denoms-output" json:"human-readable-denoms-output"`
}

func (*OsmosisCustomClient) SetBroadcastMode

func (c *OsmosisCustomClient) SetBroadcastMode(broadcastMode string)

func (*OsmosisCustomClient) SetChainID

func (c *OsmosisCustomClient) SetChainID(chainID string)

func (*OsmosisCustomClient) SetKeyringBackend

func (c *OsmosisCustomClient) SetKeyringBackend(keyringBackend string)

func (*OsmosisCustomClient) SetNode

func (c *OsmosisCustomClient) SetNode(node string)

func (*OsmosisCustomClient) SetOutput

func (c *OsmosisCustomClient) SetOutput(output string)

type Trace

type Trace struct {
	Type         string `json:"type"`
	Counterparty struct {
		BaseDenom string `json:"base_denom"`
	} `json:"counterparty"`
}

Jump to

Keyboard shortcuts

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