config

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Bech32Prefix defines the Bech32 prefix used for accounts on the exemplary Cosmos EVM blockchain.
	Bech32Prefix = "cosmos"

	// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address.
	Bech32PrefixAccAddr = Bech32Prefix
	// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key.
	Bech32PrefixAccPub = Bech32Prefix + sdk.PrefixPublic
	// Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address.
	Bech32PrefixValAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator
	// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key.
	Bech32PrefixValPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic
	// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address.
	Bech32PrefixConsAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus
	// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key.
	Bech32PrefixConsPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic
	// DisplayDenom defines the denomination displayed to users in client applications.
	DisplayDenom = "atom"
	// BaseDenom defines to the default denomination used in the Cosmos EVM example chain.
	BaseDenom = "aatom"
	// BaseDenomUnit defines the precision of the base denomination.
	BaseDenomUnit = 18
)

Variables

This section is empty.

Functions

func GetChainIDFromHome

func GetChainIDFromHome(home string) (string, error)

GetChainIDFromHome returns the chain ID from the client configuration in the given home directory.

func OpenDB

func OpenDB(_ types.AppOptions, home string, backendType dbm.BackendType) (dbm.DB, error)

OpenDB opens a database based on the specified backend type. It takes the home directory where the database data will be stored, along with the backend type. It opens a database named "application" using the specified backend type and the data directory. It returns the opened database and an error (if any). If the database opens successfully, the error will be nil.

NOTE: this is included in builds without rocksdb. When building the binary with rocksdb, the code in 'rocksdb.go' will be included instead of this

func OpenReadOnlyDB

func OpenReadOnlyDB(home string, backendType dbm.BackendType) (dbm.DB, error)

OpenReadOnlyDB opens rocksdb backend in read-only mode.

func SetBech32Prefixes

func SetBech32Prefixes(config *sdk.Config)

SetBech32Prefixes sets the global prefixes to be used when serializing addresses and public keys to Bech32 strings.

func SetBip44CoinType

func SetBip44CoinType(config *sdk.Config)

SetBip44CoinType sets the global coin type to be used in hierarchical deterministic wallets.

Types

This section is empty.

Jump to

Keyboard shortcuts

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