Documentation ¶
Index ¶
- Constants
- Variables
- func BeginBlocker(ctx sdk.Context, k Keeper) sdk.Tags
- func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState)
- func ParamTypeTable() params.TypeTable
- func RegisterCodec(cdc *codec.Codec)
- func ValidateGenesis(data GenesisState) error
- type FeeKeeper
- type GenesisState
- type Keeper
- type Minter
- type Params
- func (p *Params) GetParamSpace() string
- func (p *Params) KeyValuePairs() params.KeyValuePairs
- func (p *Params) ReadOnly() bool
- func (p Params) String() string
- func (p *Params) StringFromBytes(cdc *codec.Codec, key string, bytes []byte) (string, error)
- func (p *Params) Validate(key string, value string) (interface{}, sdk.Error)
Constants ¶
const (
DefaultParamSpace = "mint"
)
default paramspace for params keeper
Variables ¶
var ( // params store for inflation params KeyInflation = []byte("Inflation") )
Parameter store key
Functions ¶
func BeginBlocker ¶
Called every block, process inflation on the first block of every hour
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState)
new mint genesis
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis validates the provided staking genesis state to ensure the expected invariants holds. (i.e. params in correct bounds, no duplicate validators)
Types ¶
type GenesisState ¶
type GenesisState struct { Minter Minter `json:"minter"` // minter object Params Params `json:"params"` // inflation params }
GenesisState - all distribution state that must be provided at genesis
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
get raw genesis raw message for testing
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, keeper Keeper) GenesisState
ExportGenesis returns a GenesisState for a given context and keeper. The GenesisState will contain the pool, and validator/delegator distribution info's
func NewGenesisState ¶
func NewGenesisState(minter Minter, params Params) GenesisState
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
keeper of the stake store
func (Keeper) GetParamSet ¶
get inflation params from the global param store
type Minter ¶
type Minter struct { LastUpdate time.Time `json:"last_update"` // time which the last update was made to the minter MintDenom string `json:"mint_denom"` // type of coin to mint InflationBase sdk.Int `json:"inflation_basement"` }
current inflation state
func (Minter) BlockProvision ¶
get the provisions for a block based on the annual provisions rate
type Params ¶
mint parameters
func (*Params) GetParamSpace ¶
Implements params.ParamStruct
func (*Params) KeyValuePairs ¶
func (p *Params) KeyValuePairs() params.KeyValuePairs