vote

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: Apache-2.0 Imports: 9 Imported by: 6

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 {
	DoesVoterExist(ctx sdk.Context, username linotypes.AccountKey) bool
	StakeIn(ctx sdk.Context, username linotypes.AccountKey, amount linotypes.Coin) sdk.Error
	AddStake(ctx sdk.Context, username linotypes.AccountKey, amount linotypes.Coin) sdk.Error
	StakeOut(ctx sdk.Context, username linotypes.AccountKey, amount linotypes.Coin) sdk.Error
	MinusStake(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
	SlashStake(ctx sdk.Context, username linotypes.AccountKey, amount linotypes.Coin) (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
	// Getter
	GetVoter(ctx sdk.Context, username linotypes.AccountKey) (*model.Voter, sdk.Error)

	// import export
	ExportToFile(ctx sdk.Context, cdc *codec.Codec, filepath string) error
	ImportFromFile(ctx sdk.Context, cdc *codec.Codec, filepath string) error
}

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

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