Documentation ¶
Index ¶
Constants ¶
View Source
const ( CodeSpaceIncentive sdk.CodespaceType = "incentive" // 701 ~ 799 CodeInvalidAdjustmentHeight sdk.CodeType = 701 CodeInvalidDefaultRewardPerBlock sdk.CodeType = 702 CodeInvalidPlanHeight sdk.CodeType = 703 CodeInvalidRewardPerBlock sdk.CodeType = 704 CodeInvalidTotalIncentive sdk.CodeType = 705 CodeInvalidPlanToAdd sdk.CodeType = 706 )
View Source
const ( ModuleName = "incentive" QuerierRoute = ModuleName DefaultParamspace = ModuleName RouterKey = ModuleName StoreKey = ModuleName )
Variables ¶
View Source
var ( KeyIncentiveDefaultRewardPerBlock = []byte("incentiveDefaultRewardPerBlock") KeyIncentivePlans = []byte("incentivePlans") )
View Source
var ModuleCdc = codec.New()
Functions ¶
func CheckPlans ¶
func ParamKeyTable ¶
ParamKeyTable type declaration for parameters
func RegisterCodec ¶
Types ¶
type BankKeeper ¶
type BankKeeper interface { SubtractCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, sdk.Error) HasCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) bool }
expected bank keeper
type FeeCollectionKeeper ¶
expected fee collection keeper
type GenesisState ¶
GenesisState - all asset state that must be provided at genesis
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState - Return a default genesis state
func NewGenesisState ¶
func NewGenesisState(state State, param Params) GenesisState
NewGenesisState - Create a new genesis state
func (GenesisState) ValidateGenesis ¶
func (data GenesisState) ValidateGenesis() error
ValidateGenesis performs basic validation of asset genesis data returning an error for any failed validation criteria.
type Params ¶
type Params struct { DefaultRewardPerBlock int64 `json:"default_reward_per_block"` Plans []Plan `json:"plans"` }
func DefaultParams ¶
func DefaultParams() Params
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() params.ParamSetPairs
Click to show internal directories.
Click to hide internal directories.