types

package
v0.0.0-...-1d4aedf Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// DisplayDenom defines the denomination displayed to users in client applications.
	DisplayDenom = "lion"
	// BaseDenom defines to the default denomination used in Merlion (staking, EVM, governance, etc.)
	BaseDenom = AttoLionDenom

	AttoLionDenom = "alion" // 1e-18
	MicroUSMDenom = "uusm"  // 1e-6
)

nolint

View Source
const (
	BlocksPerMinute = uint64(10) // practical block time 6s
	BlocksPerHour   = BlocksPerMinute * 60
	BlocksPerDay    = BlocksPerHour * 24
	BlocksPerWeek   = BlocksPerDay * 7
	BlocksPerMonth  = BlocksPerDay * 30
	BlocksPerYear   = BlocksPerDay * 365
)

nolint

View Source
const (
	SecondsPerMinute = 60
	SecondsPerHour   = 60 * SecondsPerMinute
	SecondsPerDay    = 24 * SecondsPerHour
	SecondsPerWeek   = 7 * SecondsPerDay
	DaysPer4Years    = 365*4 + 1
	SecondsPer4Years = DaysPer4Years * SecondsPerDay
)

Variables

View Source
var (
	ZeroInt   = sdk.ZeroInt()
	ZeroDec   = sdk.ZeroDec()
	OneInt    = sdk.OneInt()
	OneDec    = sdk.OneDec()
	NegOneInt = sdk.OneInt().Neg()
	NegOneDec = sdk.OneDec().Neg()
)
View Source
var (
	// MicroUSMTarget defines the target exchange rate of uusm denominated in uUSD.
	MicroUSMTarget = sdk.OneDec()
)

Functions

func IsPeriodLastBlock

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

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

func Max

func Max[T constraints.Ordered](x, y T) T

func Min

func Min[T constraints.Ordered](x, y T) T

func SetDenomMetaDataForStableCoins

func SetDenomMetaDataForStableCoins(ctx sdk.Context, k bankkeeper.Keeper)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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