cmd

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HumanCoinUnit       = "stars"
	BaseCoinUnit        = "ustars"
	StarsExponent       = 6
	Bech32PrefixAccAddr = "stars"
)
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"
)

Variables

This section is empty.

Functions

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,
	outputDir,
	chainID,
	minGasPrices,
	nodeDirPrefix,
	nodeDaemonHome,
	startingIPAddress,
	keyringBackend,
	algoStr string,
	numValidators int,
) error

Initialize the testnet

func PrepareGenesis

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

fill with data

func PrepareGenesisCmd

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

func TestnetCmd

func TestnetCmd(mbm module.BasicManager) *cobra.Command

get cmd to initialize all files for tendermint testnet and application

Types

type GenesisParams

type GenesisParams struct {
	AirdropSupply sdk.Int

	StrategicReserveAccounts []banktypes.Balance

	ConsensusParams *tmproto.ConsensusParams

	GenesisTime         time.Time
	NativeCoinMetadatas []banktypes.Metadata

	StakingParams      stakingtypes.Params
	DistributionParams distributiontypes.Params
	GovParams          govtypes.Params

	CrisisConstantFee sdk.Coin

	SlashingParams slashingtypes.Params

	AllocParams alloctypes.Params
	ClaimParams claimtypes.Params
	MintParams  minttypes.Params
}

func DevnetGenesisParams

func DevnetGenesisParams() GenesisParams

func LocalnetGenesisParams

func LocalnetGenesisParams() GenesisParams

func MainnetGenesisParams

func MainnetGenesisParams() GenesisParams

params only

func TestnetGenesisParams

func TestnetGenesisParams() GenesisParams

params only

type Snapshot

type Snapshot struct {
	TotalStarsAirdropAmount sdk.Int                    `json:"total_stars_amount"`
	Accounts                map[string]SnapshotAccount `json:"accounts"`
}

type SnapshotAccount

type SnapshotAccount struct {
	AtomAddress              string  `json:"atom_address"`
	OsmoAddress              string  `json:"osmo_address"`
	RegenAddress             string  `json:"regen_address"`
	StargazeHubDelegator     bool    `json:"sg_hub_delegator"`
	StargazeOsmosisDelegator bool    `json:"sg_osmosis_delegator"`
	StargazeRegenDelegator   bool    `json:"sg_regen_delegator"`
	AtomStaker               bool    `json:"atom_staker"`
	OsmoStaker               bool    `json:"osmo_staker"`
	OsmosisLiquidityProvider bool    `json:"osmosis_lp"`
	AirdropAmount            sdk.Int `json:"airdrop_amount"`
}

type TestnetNode

type TestnetNode struct {
	Name             string
	OutsidePortRange string
	InsidePortRange  string
	APIPort          string
	GRPCPort         string
}

TestnetNode holds configuration for nodes

Jump to

Keyboard shortcuts

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