stake

package
v0.25.0-binance.4 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

nolint

Index

Constants

View Source
const (
	QueryValidators                    = querier.QueryValidators
	QueryValidator                     = querier.QueryValidator
	QueryValidatorUnbondingDelegations = querier.QueryValidatorUnbondingDelegations
	QueryValidatorRedelegations        = querier.QueryValidatorRedelegations
	QueryDelegation                    = querier.QueryDelegation
	QueryUnbondingDelegation           = querier.QueryUnbondingDelegation
	QueryDelegatorDelegations          = querier.QueryDelegatorDelegations
	QueryDelegatorUnbondingDelegations = querier.QueryDelegatorUnbondingDelegations
	QueryDelegatorRedelegations        = querier.QueryDelegatorRedelegations
	QueryDelegatorValidators           = querier.QueryDelegatorValidators
	QueryDelegatorValidator            = querier.QueryDelegatorValidator
	QueryPool                          = querier.QueryPool
	QueryParameters                    = querier.QueryParameters
)
View Source
const (
	DefaultCodespace      = types.DefaultCodespace
	CodeInvalidValidator  = types.CodeInvalidValidator
	CodeInvalidDelegation = types.CodeInvalidDelegation
	CodeInvalidInput      = types.CodeInvalidInput
	CodeValidatorJailed   = types.CodeValidatorJailed
	CodeUnauthorized      = types.CodeUnauthorized
	CodeInternal          = types.CodeInternal
	CodeUnknownRequest    = types.CodeUnknownRequest
)

Variables

View Source
var (
	NewKeeper = keeper.NewKeeper

	GetValidatorKey              = keeper.GetValidatorKey
	GetValidatorByConsAddrKey    = keeper.GetValidatorByConsAddrKey
	GetValidatorsByPowerIndexKey = keeper.GetValidatorsByPowerIndexKey
	GetDelegationKey             = keeper.GetDelegationKey
	GetDelegationsKey            = keeper.GetDelegationsKey
	PoolKey                      = keeper.PoolKey
	IntraTxCounterKey            = keeper.IntraTxCounterKey
	LastValidatorPowerKey        = keeper.LastValidatorPowerKey
	LastTotalPowerKey            = keeper.LastTotalPowerKey
	ValidatorsKey                = keeper.ValidatorsKey
	ValidatorsByConsAddrKey      = keeper.ValidatorsByConsAddrKey
	ValidatorsByPowerIndexKey    = keeper.ValidatorsByPowerIndexKey
	DelegationKey                = keeper.DelegationKey
	GetUBDKey                    = keeper.GetUBDKey
	GetUBDByValIndexKey          = keeper.GetUBDByValIndexKey
	GetUBDsKey                   = keeper.GetUBDsKey
	GetUBDsByValIndexKey         = keeper.GetUBDsByValIndexKey
	GetREDKey                    = keeper.GetREDKey
	GetREDByValSrcIndexKey       = keeper.GetREDByValSrcIndexKey
	GetREDByValDstIndexKey       = keeper.GetREDByValDstIndexKey
	GetREDsKey                   = keeper.GetREDsKey
	GetREDsFromValSrcIndexKey    = keeper.GetREDsFromValSrcIndexKey
	GetREDsToValDstIndexKey      = keeper.GetREDsToValDstIndexKey
	GetREDsByDelToValDstIndexKey = keeper.GetREDsByDelToValDstIndexKey
	TestingUpdateValidator       = keeper.TestingUpdateValidator

	DefaultParamspace = keeper.DefaultParamspace
	KeyUnbondingTime  = types.KeyUnbondingTime
	KeyMaxValidators  = types.KeyMaxValidators
	KeyBondDenom      = types.KeyBondDenom

	DefaultParams         = types.DefaultParams
	InitialPool           = types.InitialPool
	NewValidator          = types.NewValidator
	NewDescription        = types.NewDescription
	NewCommission         = types.NewCommission
	NewCommissionMsg      = types.NewCommissionMsg
	NewCommissionWithTime = types.NewCommissionWithTime
	NewGenesisState       = types.NewGenesisState
	DefaultGenesisState   = types.DefaultGenesisState
	RegisterCodec         = types.RegisterCodec

	NewMsgCreateValidator           = types.NewMsgCreateValidator
	NewMsgCreateValidatorOnBehalfOf = types.NewMsgCreateValidatorOnBehalfOf
	NewMsgEditValidator             = types.NewMsgEditValidator
	NewMsgDelegate                  = types.NewMsgDelegate
	NewMsgBeginUnbonding            = types.NewMsgBeginUnbonding
	NewMsgBeginRedelegate           = types.NewMsgBeginRedelegate

	NewQuerier = querier.NewQuerier
)
View Source
var (
	ErrNilValidatorAddr      = types.ErrNilValidatorAddr
	ErrNoValidatorFound      = types.ErrNoValidatorFound
	ErrValidatorOwnerExists  = types.ErrValidatorOwnerExists
	ErrValidatorPubKeyExists = types.ErrValidatorPubKeyExists
	ErrValidatorJailed       = types.ErrValidatorJailed
	ErrInvalidProposal       = types.ErrInvalidProposal
	ErrBadRemoveValidator    = types.ErrBadRemoveValidator
	ErrDescriptionLength     = types.ErrDescriptionLength
	ErrCommissionNegative    = types.ErrCommissionNegative
	ErrCommissionHuge        = types.ErrCommissionHuge

	ErrNilDelegatorAddr          = types.ErrNilDelegatorAddr
	ErrBadDenom                  = types.ErrBadDenom
	ErrBadDelegationAmount       = types.ErrBadDelegationAmount
	ErrNoDelegation              = types.ErrNoDelegation
	ErrBadDelegatorAddr          = types.ErrBadDelegatorAddr
	ErrNoDelegatorForAddress     = types.ErrNoDelegatorForAddress
	ErrInsufficientShares        = types.ErrInsufficientShares
	ErrDelegationValidatorEmpty  = types.ErrDelegationValidatorEmpty
	ErrNotEnoughDelegationShares = types.ErrNotEnoughDelegationShares
	ErrBadSharesAmount           = types.ErrBadSharesAmount
	ErrBadSharesPercent          = types.ErrBadSharesPercent

	ErrNotMature             = types.ErrNotMature
	ErrNoUnbondingDelegation = types.ErrNoUnbondingDelegation
	ErrNoRedelegation        = types.ErrNoRedelegation
	ErrBadRedelegationDst    = types.ErrBadRedelegationDst

	ErrBothShareMsgsGiven    = types.ErrBothShareMsgsGiven
	ErrNeitherShareMsgsGiven = types.ErrNeitherShareMsgsGiven
	ErrMissingSignature      = types.ErrMissingSignature
)
View Source
var (
	ActionCreateValidator      = tags.ActionCreateValidator
	ActionEditValidator        = tags.ActionEditValidator
	ActionDelegate             = tags.ActionDelegate
	ActionBeginUnbonding       = tags.ActionBeginUnbonding
	ActionCompleteUnbonding    = tags.ActionCompleteUnbonding
	ActionBeginRedelegation    = tags.ActionBeginRedelegation
	ActionCompleteRedelegation = tags.ActionCompleteRedelegation

	TagAction       = tags.Action
	TagSrcValidator = tags.SrcValidator
	TagDstValidator = tags.DstValidator
	TagDelegator    = tags.Delegator
	TagMoniker      = tags.Moniker
	TagIdentity     = tags.Identity
)

Functions

func EndBlocker added in v0.18.0

func EndBlocker(ctx sdk.Context, k keeper.Keeper) (ValidatorUpdates []abci.ValidatorUpdate)

Called every block, update validator set

func InitGenesis added in v0.16.0

func InitGenesis(ctx sdk.Context, keeper Keeper, data types.GenesisState) (res []abci.ValidatorUpdate, err error)

InitGenesis sets the pool and parameters for the provided keeper and initializes the IntraTxCounter. For each validator in data, it sets that validator in the keeper along with manually setting the indexes. In addition, it also sets any delegations found in data. Finally, it updates the bonded validators. Returns final validator set after applying all declaration and delegations

func NewHandler

func NewHandler(k keeper.Keeper, govKeeper gov.Keeper) sdk.Handler

func NewStakeHandler

func NewStakeHandler(k Keeper) sdk.Handler

func ValidateGenesis

func ValidateGenesis(data types.GenesisState) error

ValidateGenesis validates the provided staking genesis state to ensure the expected invariants holds. (i.e. params in correct bounds, no duplicate validators)

func WriteGenesis added in v0.16.0

func WriteGenesis(ctx sdk.Context, keeper Keeper) types.GenesisState

WriteGenesis returns a GenesisState for a given context and keeper. The GenesisState will contain the pool, params, validators, and bonds found in the keeper.

func WriteValidators added in v0.19.0

func WriteValidators(ctx sdk.Context, keeper Keeper) (vals []tmtypes.GenesisValidator)

WriteValidators returns a slice of bonded genesis validators.

Types

type Commission

type Commission = types.Commission

type Delegation added in v0.18.0

type Delegation = types.Delegation

type Description

type Description = types.Description

type GenesisState

type GenesisState = types.GenesisState

type Keeper

type Keeper = keeper.Keeper

type MsgBeginRedelegate added in v0.20.0

type MsgBeginRedelegate = types.MsgBeginRedelegate

type MsgBeginUnbonding added in v0.20.0

type MsgBeginUnbonding = types.MsgBeginUnbonding

type MsgCreateValidator added in v0.18.0

type MsgCreateValidator = types.MsgCreateValidator

func NewTestMsgCreateValidator

func NewTestMsgCreateValidator(address sdk.ValAddress, pubKey crypto.PubKey, amt int64) MsgCreateValidator

func NewTestMsgCreateValidatorOnBehalfOf

func NewTestMsgCreateValidatorOnBehalfOf(delAddr sdk.AccAddress, valAddr sdk.ValAddress, valPubKey crypto.PubKey, amt int64) MsgCreateValidator

func NewTestMsgCreateValidatorWithCommission

func NewTestMsgCreateValidatorWithCommission(address sdk.ValAddress, pubKey crypto.PubKey,
	amt int64, commissionRate sdk.Dec) MsgCreateValidator

type MsgCreateValidatorProposal

type MsgCreateValidatorProposal = types.MsgCreateValidatorProposal

type MsgDelegate

type MsgDelegate = types.MsgDelegate

func NewTestMsgDelegate

func NewTestMsgDelegate(delAddr sdk.AccAddress, valAddr sdk.ValAddress, amt int64) MsgDelegate

type MsgEditValidator added in v0.18.0

type MsgEditValidator = types.MsgEditValidator

type Params

type Params = types.Params

type Pool

type Pool = types.Pool

type QueryBondsParams

type QueryBondsParams = querier.QueryBondsParams

type QueryDelegatorParams

type QueryDelegatorParams = querier.QueryDelegatorParams

type QueryValidatorParams

type QueryValidatorParams = querier.QueryValidatorParams

type Redelegation added in v0.20.0

type Redelegation = types.Redelegation

type UnbondingDelegation added in v0.20.0

type UnbondingDelegation = types.UnbondingDelegation

type Validator

type Validator = types.Validator

Directories

Path Synopsis
client
cli
nolint
nolint
nolint
nolint
nolint
nolint

Jump to

Keyboard shortcuts

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