types

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "token"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName

	// RouterKey to be used for routing msgs
	RouterKey = ModuleName

	// QuerierRoute to be used for querierer msgs
	QuerierRoute = ModuleName
)
View Source
const (
	DefaultParamspace = ModuleName
)

Variables

View Source
var (
	StorePrefix   = []byte{0x00} // prefix for keys that store balance
	DeltaPrefix   = []byte{0x01} // prefix for keys that store pdv delta between accruals
	RewardsPrefix = []byte{0x02} // prefix for keys for rewards history
	BanListPrefix = []byte{0x03} // prefix for keys that store bans
)

Key prefixes

View Source
var (
	AccumulatedDelta = sdk.AccAddress{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}
)
View Source
var (
	DefaultRewardsBlockInterval int64 = 483840 // average block time is 5s, 17280 blocks a day, 28 days
)
View Source
var Denominator = sdk.NewInt(1e6)
View Source
var (
	KeyRewardsBlockInterval = []byte("RewardsBlockInterval")
)
View Source
var ModuleCdc = codec.New()

ModuleCdc is the codec for the module

Functions

func ParamKeyTable added in v1.4.0

func ParamKeyTable() subspace.KeyTable

ParamKeyTable for token module

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on codec

Types

type Params added in v1.4.0

type Params struct {
	RewardsBlockInterval int64 `json:"rewards_block_interval" yaml:"rewards_block_interval"`
}

func DefaultParams added in v1.4.0

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func (*Params) ParamSetPairs added in v1.4.0

func (p *Params) ParamSetPairs() subspace.ParamSetPairs

func (Params) Validate added in v1.4.0

func (p Params) Validate() error

type RewardDistribution added in v1.4.0

type RewardDistribution struct {
	Height int64     `json:"height"`
	Coins  sdk.Coins `json:"coins"`
}

Jump to

Keyboard shortcuts

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