types

package
v0.1.0-warmage....-c068d24 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 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 = "mage"
	// BaseDenom defines to the default denomination used in Warmage (staking, EVM, governance, etc.)
	BaseDenom = AttoMageDenom

	AttoMageDenom = "amage" // 1e-18
	MicroUSWDenom = "uusw"  // 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 (
	// MicroUSWTarget defines the target exchange rate of uusw denominated in uUSD.
	MicroUSWTarget = 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