genesis

package
v28.4.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldGenesisTime                 = "genesis_time"
	FieldChainID                     = "chain_id"
	FieldConsumerChainID             = "app_state.monitoringp.params.consumerChainID"
	FieldLastBlockHeight             = "app_state.monitoringp.params.lastBlockHeight"
	FieldConsensusTimestamp          = "app_state.monitoringp.params.consumerConsensusState.timestamp"
	FieldConsensusNextValidatorsHash = "app_state.monitoringp.params.consumerConsensusState.nextValidatorsHash"
	FieldConsensusRootHash           = "app_state.monitoringp.params.consumerConsensusState.root.hash"
	FieldConsumerUnbondingPeriod     = "app_state.monitoringp.params.consumerUnbondingPeriod"
	FieldConsumerRevisionHeight      = "app_state.monitoringp.params.consumerRevisionHeight"
)

Variables

This section is empty.

Functions

func CheckGenesisContainsAddress

func CheckGenesisContainsAddress(genesisPath, addr string) (bool, error)

CheckGenesisContainsAddress returns true if the address exist into the genesis file.

func ModuleParamField

func ModuleParamField(module, param string) string

ModuleParamField returns the field name of a given module param pair.

Types

type Genesis

type Genesis struct {
	*jsonfile.JSONFile
}

Genesis represents the genesis reader.

func FromPath

func FromPath(path string) (*Genesis, error)

FromPath parses genesis object from path.

func FromURL

func FromURL(ctx context.Context, url, path string) (*Genesis, error)

FromURL fetches the genesis from the given URL and returns its content.

func (*Genesis) Accounts

func (g *Genesis) Accounts() ([]string, error)

Accounts returns the auth accounts from the genesis.

func (*Genesis) ChainID

func (g *Genesis) ChainID() (chainID string, err error)

ChainID returns the chain id from the genesis.

func (*Genesis) GentxCount

func (g *Genesis) GentxCount() (int, error)

GentxCount returns the number of gentx in the genesis.

func (Genesis) HasAccount

func (g Genesis) HasAccount(address string) bool

HasAccount check if account exist into the genesis account.

func (*Genesis) StakeDenom

func (g *Genesis) StakeDenom() (denom string, err error)

StakeDenom returns the stake denom from the genesis.

Jump to

Keyboard shortcuts

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