types

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// module name
	ModuleName = "mint"

	// default paramspace for params keeper
	DefaultParamspace = ModuleName

	// StoreKey is the default store key for mint
	StoreKey = ModuleName

	// QuerierRoute is the querier route for the minting store.
	QuerierRoute = StoreKey

	RouterKey = StoreKey

	// Query endpoints supported by the minting querier
	QueryParameters = "parameters"
	QueryMinter     = "minter"
)

nolint

View Source
const (
	EventTypeMint = ModuleName
)

Variables

View Source
var (
	KeyPerSecondInflationRate = []byte("PerSecondInflationRate")
	KeyMintDenom              = []byte("MintDenom")
)
View Source
var MinterKey = []byte{0x00}

the one key to use for the keeper store

View Source
var ModuleCdc *codec.Codec

Functions

func ParamKeyTable

func ParamKeyTable() params.KeyTable

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis validates the provided genesis state to ensure the expected invariants holds.

Types

type GenesisState

type GenesisState struct {
	Minter Minter `json:"minter" yaml:"minter"` // minter object
	Params Params `json:"params" yaml:"params"` // inflation params
}

GenesisState - minter state

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState creates a default GenesisState object

func NewGenesisState

func NewGenesisState(minter Minter, params Params) GenesisState

NewGenesisState creates a new GenesisState object

type Minter

type Minter struct {
	PreviousMintTime time.Time `json:"previous_mint_time" yaml:"previous_mint_time"`
	Leftover         sdk.Dec   `json:"leftover" yaml:"leftover"`
}

func DefaultInitialMinter

func DefaultInitialMinter() Minter

func InitialMinter

func InitialMinter(previousMintTime time.Time, leftover sdk.Dec) Minter

func NewMinter

func NewMinter(previousMintTime time.Time, leftover sdk.Dec) Minter

func (Minter) Validate

func (m Minter) Validate() error

type Params

type Params struct {
	PerSecondInflationRate sdk.Dec `json:"per_second_inflation_rate" yaml:"per_second_inflation_rate"` // per second inflation rate
	MintDenom              string  `json:"mint_denom" yaml:"mint_denom"`                               // type of coin to mint
}

func DefaultParams

func DefaultParams() Params

func NewParams

func NewParams(
	perSecondInflationRate sdk.Dec, mintDenom string,
) Params

func (*Params) ParamSetPairs

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

func (Params) String

func (p Params) String() string

func (Params) Validate

func (p Params) Validate() error

Jump to

Keyboard shortcuts

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