types

package
v0.6.11 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// ModuleKey is the name of the module
	ModuleName = "vote"

	// RouterKey is the message route for gov
	RouterKey = ModuleName

	// QuerierRoute is the querier route for gov
	QuerierRoute = ModuleName

	QueryVoter      = "voter"
	QueryStakeStats = "stake-stats"
)

Variables

This section is empty.

Functions

func ErrAccountNotFound added in v0.4.0

func ErrAccountNotFound() sdk.Error

ErrAccountNotFound - error if account is not found

func ErrFrozenAmountIsNotEmpty added in v0.4.0

func ErrFrozenAmountIsNotEmpty() sdk.Error

ErrFrozenAmountIsNotEmpty

func ErrIllegalWithdraw added in v0.4.0

func ErrIllegalWithdraw() sdk.Error

ErrIllegalWithdraw - error if withdraw is illegal

func ErrInsufficientDeposit added in v0.4.0

func ErrInsufficientDeposit() sdk.Error

ErrInsufficientDeposit - error if voter deposit is insufficient

func ErrInsufficientStake added in v0.4.0

func ErrInsufficientStake() sdk.Error

ErrInsufficientStake

func ErrInvalidCoin added in v0.4.0

func ErrInvalidCoin() sdk.Error

ErrInvalidCoin - error if coin is invalid

func ErrInvalidUsername added in v0.4.0

func ErrInvalidUsername() sdk.Error

ErrInvalidUsername - error if username is invalid

func ErrNegativeFrozenAmount added in v0.6.0

func ErrNegativeFrozenAmount() sdk.Error

ErrNegativeFrozenAmount -

func ErrNoDuty added in v0.4.0

func ErrNoDuty() sdk.Error

ErrNoDuty

func ErrNotAVoterOrHasDuty added in v0.4.0

func ErrNotAVoterOrHasDuty() sdk.Error

ErrNotAVoterOrHasDuty

func ErrQueryFailed added in v0.4.0

func ErrQueryFailed() sdk.Error

ErrQueryFailed - error when query vote store failed

func ErrStakeStatNotFound added in v0.6.0

func ErrStakeStatNotFound(day int64) sdk.Error

ErrStakeStatNotFound -

func ErrValidatorCannotRevoke added in v0.4.0

func ErrValidatorCannotRevoke() sdk.Error

ErrValidatorCannotRevoke - error if voter is validator

func ErrVoterNotFound added in v0.4.0

func ErrVoterNotFound() sdk.Error

ErrVoteNotFound - error if voter is not found

func RegisterWire added in v0.4.0

func RegisterWire(cdc *wire.Codec)

Register concrete types on wire codec

Types

type ClaimInterestMsg added in v0.4.0

type ClaimInterestMsg struct {
	Username types.AccountKey `json:"username"`
}

ClaimInterestMsg - claim interest generated from lino power

func NewClaimInterestMsg added in v0.4.0

func NewClaimInterestMsg(username string) ClaimInterestMsg

NewClaimInterestMsg - return a ClaimInterestMsg

func (ClaimInterestMsg) GetConsumeAmount added in v0.4.0

func (msg ClaimInterestMsg) GetConsumeAmount() types.Coin

GetConsumeAmount - implements types.Msg

func (ClaimInterestMsg) GetPermission added in v0.4.0

func (msg ClaimInterestMsg) GetPermission() types.Permission

GetPermission - implements types.Msg

func (ClaimInterestMsg) GetSignBytes added in v0.4.0

func (msg ClaimInterestMsg) GetSignBytes() []byte

GetSignBytes - implements sdk.Msg

func (ClaimInterestMsg) GetSigners added in v0.4.0

func (msg ClaimInterestMsg) GetSigners() []sdk.AccAddress

GetSigners - implements sdk.Msg

func (ClaimInterestMsg) Route added in v0.4.0

func (msg ClaimInterestMsg) Route() string

Route - implements sdk.Msg

func (ClaimInterestMsg) String added in v0.4.0

func (msg ClaimInterestMsg) String() string

func (ClaimInterestMsg) Type added in v0.4.0

func (msg ClaimInterestMsg) Type() string

Type - implements sdk.Msg

func (ClaimInterestMsg) ValidateBasic added in v0.4.0

func (msg ClaimInterestMsg) ValidateBasic() sdk.Error

ValidateBasic - implements sdk.Msg

type StakeInForMsg added in v0.4.0

type StakeInForMsg struct {
	Sender   types.AccountKey `json:"username"`
	Receiver types.AccountKey `json:"receiver"`
	Deposit  types.LNO        `json:"deposit"`
}

StakeInForMsg - stake in for other people

func NewStakeInForMsg added in v0.4.0

func NewStakeInForMsg(sender, receiver string, deposit types.LNO) StakeInForMsg

NewStakeInForMsg - return a StakeInForMsg

func (StakeInForMsg) GetConsumeAmount added in v0.4.0

func (msg StakeInForMsg) GetConsumeAmount() types.Coin

GetConsumeAmount - implement types.Msg

func (StakeInForMsg) GetPermission added in v0.4.0

func (msg StakeInForMsg) GetPermission() types.Permission

GetPermission - implements types.Msg

func (StakeInForMsg) GetSignBytes added in v0.4.0

func (msg StakeInForMsg) GetSignBytes() []byte

GetSignBytes - implements sdk.Msg

func (StakeInForMsg) GetSigners added in v0.4.0

func (msg StakeInForMsg) GetSigners() []sdk.AccAddress

GetSigners - implements sdk.Msg

func (StakeInForMsg) Route added in v0.4.0

func (msg StakeInForMsg) Route() string

Route - implements sdk.Msg

func (StakeInForMsg) String added in v0.4.0

func (msg StakeInForMsg) String() string

func (StakeInForMsg) Type added in v0.4.0

func (msg StakeInForMsg) Type() string

Type - implements sdk.Msg

func (StakeInForMsg) ValidateBasic added in v0.4.0

func (msg StakeInForMsg) ValidateBasic() sdk.Error

ValidateBasic - implements sdk.Msg

type StakeInMsg added in v0.4.0

type StakeInMsg struct {
	Username types.AccountKey `json:"username"`
	Deposit  types.LNO        `json:"deposit"`
}

StakeInMsg - voter deposit

func NewStakeInMsg added in v0.4.0

func NewStakeInMsg(username string, deposit types.LNO) StakeInMsg

NewStakeInMsg - return a StakeInMsg

func (StakeInMsg) GetConsumeAmount added in v0.4.0

func (msg StakeInMsg) GetConsumeAmount() types.Coin

GetConsumeAmount - implement types.Msg

func (StakeInMsg) GetPermission added in v0.4.0

func (msg StakeInMsg) GetPermission() types.Permission

GetPermission - implements types.Msg

func (StakeInMsg) GetSignBytes added in v0.4.0

func (msg StakeInMsg) GetSignBytes() []byte

GetSignBytes - implements sdk.Msg

func (StakeInMsg) GetSigners added in v0.4.0

func (msg StakeInMsg) GetSigners() []sdk.AccAddress

GetSigners - implements sdk.Msg

func (StakeInMsg) Route added in v0.4.0

func (msg StakeInMsg) Route() string

Route - implements sdk.Msg

func (StakeInMsg) String added in v0.4.0

func (msg StakeInMsg) String() string

func (StakeInMsg) Type added in v0.4.0

func (msg StakeInMsg) Type() string

Type - implements sdk.Msg

func (StakeInMsg) ValidateBasic added in v0.4.0

func (msg StakeInMsg) ValidateBasic() sdk.Error

ValidateBasic - implements sdk.Msg

type StakeOutMsg added in v0.4.0

type StakeOutMsg struct {
	Username types.AccountKey `json:"username"`
	Amount   types.LNO        `json:"amount"`
}

StakeOutMsg - voter withdraw

func NewStakeOutMsg added in v0.4.0

func NewStakeOutMsg(username string, amount types.LNO) StakeOutMsg

NewStakeOutMsg - return StakeOutMsg

func (StakeOutMsg) GetConsumeAmount added in v0.4.0

func (msg StakeOutMsg) GetConsumeAmount() types.Coin

GetConsumeAmount - implement types.Msg

func (StakeOutMsg) GetPermission added in v0.4.0

func (msg StakeOutMsg) GetPermission() types.Permission

GetPermission - implements types.Msg

func (StakeOutMsg) GetSignBytes added in v0.4.0

func (msg StakeOutMsg) GetSignBytes() []byte

GetSignBytes - implements sdk.Msg

func (StakeOutMsg) GetSigners added in v0.4.0

func (msg StakeOutMsg) GetSigners() []sdk.AccAddress

GetSigners - implements sdk.Msg

func (StakeOutMsg) Route added in v0.4.0

func (msg StakeOutMsg) Route() string

Route - implements sdk.Msg

func (StakeOutMsg) String added in v0.4.0

func (msg StakeOutMsg) String() string

func (StakeOutMsg) Type added in v0.4.0

func (msg StakeOutMsg) Type() string

Type - implements sdk.Msg

func (StakeOutMsg) ValidateBasic added in v0.4.0

func (msg StakeOutMsg) ValidateBasic() sdk.Error

ValidateBasic - implements sdk.Msg

type UnassignDutyEvent added in v0.4.0

type UnassignDutyEvent struct {
	Username linotypes.AccountKey `json:"username"`
}

UnassignDutyEvent - unassign duty needs a grace period and after that duty and frozen money will be cleared.

type VoterDuty

type VoterDuty int
const (
	DutyVoter     VoterDuty = 0
	DutyApp       VoterDuty = 1
	DutyValidator VoterDuty = 2
	DutyPending   VoterDuty = 3 // pending is when voter is in unassign period
)

Jump to

Keyboard shortcuts

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