utils

package
v3.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: CC0-1.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertValidatorAddressToBech32String

func ConvertValidatorAddressToBech32String(address types.Address) string

ConvertValidatorAddressToBech32String converts the given validator address to its Bech32 string representation

func ConvertValidatorPubKeyToBech32String

func ConvertValidatorPubKeyToBech32String(pubKey tmcrypto.PubKey) (string, error)

ConvertValidatorPubKeyToBech32String converts the given pubKey to a Bech32 string

func FindAttributeByKey

func FindAttributeByKey(event abci.Event, attrKey string) (abci.EventAttribute, error)

func FindEventByType

func FindEventByType(events []abci.Event, eventType string) (abci.Event, error)

func FindEventsByType

func FindEventsByType(events []abci.Event, eventType string) []abci.Event

func GetGenesisDocAndState

func GetGenesisDocAndState(genesisPath string, node node.Node) (*tmtypes.GenesisDoc, map[string]json.RawMessage, error)

GetGenesisDocAndState reads the genesis from node or file and returns genesis doc and state

func GetGenesisState

func GetGenesisState(doc *tmtypes.GenesisDoc) (map[string]json.RawMessage, error)

GetGenesisState returns the genesis state by getting it from the given genesis doc

func MaxInt64 added in v3.4.0

func MaxInt64(a, b int64) int64

func ReadGenesisFileGenesisDoc

func ReadGenesisFileGenesisDoc(genesisPath string) (*tmtypes.GenesisDoc, error)

ReadGenesisFileGenesisDoc reads the genesis file located at the given path

Types

This section is empty.

Jump to

Keyboard shortcuts

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