util

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlocksPerMinute = int64(10)
	BlocksPerHour   = BlocksPerMinute * 60
	BlocksPerDay    = BlocksPerHour * 24
	BlocksPerWeek   = BlocksPerDay * 7
	BlocksPerMonth  = BlocksPerDay * 30
	BlocksPerYear   = BlocksPerDay * 365

	BlocksPerEpoch = BlocksPerWeek
)

nolint

View Source
const (
	// CoinType defines LUNA bip44 coin type
	CoinType = uint32(330)
	// FullFundraiserPath defines full fundraiser path for LUNA coin type
	FullFundraiserPath = "44'/330'/0'/0/0"
)
View Source
const (
	// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address
	Bech32PrefixAccAddr = "terra"
	// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key
	Bech32PrefixAccPub = "terrapub"
	// Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address
	Bech32PrefixValAddr = "terravaloper"
	// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key
	Bech32PrefixValPub = "terravaloperpub"
	// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address
	Bech32PrefixConsAddr = "terravalcons"
	// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key
	Bech32PrefixConsPub = "terravalconspub"
)

Variables

This section is empty.

Functions

func GetEpoch added in v0.0.5

func GetEpoch(ctx sdk.Context) int64

GetEpoch returns the current epoch, starting from 0

func IsPeriodLastBlock added in v0.0.7

func IsPeriodLastBlock(ctx sdk.Context, blocksPerPeriod int64) bool

IsPeriodLastBlock returns true if we are at the last block of the period

Types

This section is empty.

Jump to

Keyboard shortcuts

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