Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(vk VoteKeeper) sdk.Handler
NewHandler - Handle all "vote" type messages.
func NewQuerier ¶ added in v0.2.0
func NewQuerier(vk VoteKeeper) sdk.Querier
creates a querier for vote REST endpoints
Types ¶
type VoteKeeper ¶ added in v0.3.0
type VoteKeeper interface {
InitGenesis(ctx sdk.Context)
DoesVoterExist(ctx sdk.Context, username linotypes.AccountKey) bool
StakeIn(ctx sdk.Context, username linotypes.AccountKey, amount linotypes.Coin) sdk.Error
StakeOut(ctx sdk.Context, username linotypes.AccountKey, amount linotypes.Coin) sdk.Error
ClaimInterest(ctx sdk.Context, username linotypes.AccountKey) sdk.Error
GetVoterDuty(ctx sdk.Context, username linotypes.AccountKey) (types.VoterDuty, sdk.Error)
AssignDuty(
ctx sdk.Context, username linotypes.AccountKey, duty types.VoterDuty, frozenAmount linotypes.Coin) sdk.Error
// It's caller's duty to move coins from stake-in pool to the destination pool.
SlashStake(ctx sdk.Context, username linotypes.AccountKey, amount linotypes.Coin, destPool linotypes.PoolName) (linotypes.Coin, sdk.Error)
UnassignDuty(ctx sdk.Context, username linotypes.AccountKey, waitingPeriodSec int64) sdk.Error
ExecUnassignDutyEvent(ctx sdk.Context, event types.UnassignDutyEvent) sdk.Error
GetLinoStake(ctx sdk.Context, username linotypes.AccountKey) (linotypes.Coin, sdk.Error)
StakeInFor(ctx sdk.Context, sender linotypes.AccountKey, receiver linotypes.AccountKey, amount linotypes.Coin) sdk.Error
RecordFriction(ctx sdk.Context, friction linotypes.Coin) sdk.Error
DailyAdvanceLinoStakeStats(ctx sdk.Context) sdk.Error
// Getter
GetVoter(ctx sdk.Context, username linotypes.AccountKey) (*model.Voter, sdk.Error)
GetStakeStatsOfDay(ctx sdk.Context, day int64) (model.LinoStakeStat, sdk.Error)
// import export
ExportToFile(ctx sdk.Context, cdc *codec.Codec, filepath string) error
ImportFromFile(ctx sdk.Context, cdc *codec.Codec, filepath string) error
}
Click to show internal directories.
Click to hide internal directories.