Documentation ¶
Index ¶
Constants ¶
View Source
const ( EventTypeMint = ModuleName AttributeAllBonded = "all_bonded" )
Minting module event types
View Source
const ( ModuleName = "mint" DefaultParamspace = ModuleName QuerierRoute = ModuleName // Query endpoints supported by the minting querier QueryParameters = "parameters" QueryInflation = "inflation" QueryAnnualProvisions = "annual_provisions" AttributeKeyLatestMinted = "latest_minted" )
Variables ¶
View Source
var ( KeyMintDenom = []byte("MintDenom") KeyInflationRateChange = []byte("InflationRateChange") KeyInflationMax = []byte("InflationMax") KeyInflationMin = []byte("InflationMin") KeyGoalBonded = []byte("GoalBonded") KeyBlocksPerYear = []byte("BlocksPerYear") )
Parameter store keys
View Source
var (
ErrInvalidEndPoint = sdkerrors.Register(string(DefaultCodespace), uint32(CodeInvalidEndPoint), "invalid endpoint")
)
View Source
var LatestMintedKey = []byte{0x01}
View Source
var MintCdc *codec.Codec
View Source
var MinterKey = []byte{0x00}
the one key to use for the keeper store
Functions ¶
func ParamKeyTable ¶
func RegisterCodec ¶
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis validates the provided genesis state to ensure the expected invariants holds.
func ValidateMinter ¶
Types ¶
type CodeType ¶
const ( DefaultCodespace sdk.CodespaceType = "mint" CodeInvalidEndPoint CodeType = 1801 )
type GenesisState ¶
type GenesisState struct { Minter Minter `json:"minter"` Params Params `json:"params"` // inflation param }
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState creates a default GenesisState object
func NewGenesisState ¶
func NewGenesisState(minter Minter, params Params) GenesisState
type Minter ¶
type Minter struct { Inflation sdk.Dec `json:"inflation"` //current annual inflation rate AnnualProvisions sdk.Dec `json:"annual_provisions"` //current annual expected provisions }
func DefaultInitialMinter ¶
func DefaultInitialMinter() Minter
func InitialMinter ¶
func (Minter) BlockProvision ¶
BlockProvision returns the provisions for a block based on the annual provisions rate.
func (Minter) NextAnnualProvisions ¶
NextAnnualProvisions returns the annual provisions based on current total supply and inflation rate.
type Params ¶
type Params struct { MintDenom string `json:"mint_denom"` //types of coin mint InflationRateChange sdk.Dec `json:"inflation_rate_change"` //maximum annual change in inflation rate InflationMax sdk.Dec `json:"inflation_max"` // maximum inflation rate InflationMin sdk.Dec `json:"inflation_min"` // minimum inflation rate GoalBonded sdk.Dec `json:"goal_bonded"` // goal of percent bonded atoms BlocksPerYear uint64 `json:"blocks_per_year"` // expected blocks per year }
func DefaultParams ¶
func DefaultParams() Params
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() params.ParamSetPairs
Source Files ¶
Click to show internal directories.
Click to hide internal directories.