types

package
v0.0.1-kaiju.1 Latest Latest
Warning

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

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

	AttoKaijuDenom = "akaiju" // 1e-18
	MicroFUSDDenom = "ufusd"  // 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 (
	// MicroFUSDTarget defines the target exchange rate of ufusd denominated in uUSD.
	MicroFUSDTarget = 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