2018-06-26 19:00:12 -07:00
|
|
|
// nolint
|
|
|
|
package stake
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/cosmos/cosmos-sdk/x/stake/keeper"
|
2018-09-13 14:23:44 -07:00
|
|
|
"github.com/cosmos/cosmos-sdk/x/stake/querier"
|
2018-06-26 19:00:12 -07:00
|
|
|
"github.com/cosmos/cosmos-sdk/x/stake/tags"
|
|
|
|
"github.com/cosmos/cosmos-sdk/x/stake/types"
|
|
|
|
)
|
|
|
|
|
2018-07-03 21:21:36 -07:00
|
|
|
type (
|
2018-10-07 21:43:47 -07:00
|
|
|
Keeper = keeper.Keeper
|
|
|
|
Validator = types.Validator
|
|
|
|
Description = types.Description
|
|
|
|
Commission = types.Commission
|
|
|
|
Delegation = types.Delegation
|
|
|
|
UnbondingDelegation = types.UnbondingDelegation
|
|
|
|
Redelegation = types.Redelegation
|
|
|
|
Params = types.Params
|
|
|
|
Pool = types.Pool
|
|
|
|
MsgCreateValidator = types.MsgCreateValidator
|
|
|
|
MsgEditValidator = types.MsgEditValidator
|
|
|
|
MsgDelegate = types.MsgDelegate
|
|
|
|
MsgBeginUnbonding = types.MsgBeginUnbonding
|
|
|
|
MsgBeginRedelegate = types.MsgBeginRedelegate
|
|
|
|
GenesisState = types.GenesisState
|
|
|
|
QueryDelegatorParams = querier.QueryDelegatorParams
|
|
|
|
QueryValidatorParams = querier.QueryValidatorParams
|
|
|
|
QueryBondsParams = querier.QueryBondsParams
|
2018-07-03 21:21:36 -07:00
|
|
|
)
|
2018-06-26 19:00:12 -07:00
|
|
|
|
|
|
|
var (
|
2018-07-03 21:21:36 -07:00
|
|
|
NewKeeper = keeper.NewKeeper
|
|
|
|
|
2018-06-26 19:00:12 -07:00
|
|
|
GetValidatorKey = keeper.GetValidatorKey
|
2018-09-24 21:09:31 -07:00
|
|
|
GetValidatorByConsAddrKey = keeper.GetValidatorByConsAddrKey
|
2018-06-26 19:00:12 -07:00
|
|
|
GetValidatorsByPowerIndexKey = keeper.GetValidatorsByPowerIndexKey
|
|
|
|
GetDelegationKey = keeper.GetDelegationKey
|
|
|
|
GetDelegationsKey = keeper.GetDelegationsKey
|
|
|
|
PoolKey = keeper.PoolKey
|
|
|
|
ValidatorsKey = keeper.ValidatorsKey
|
2018-09-24 21:09:31 -07:00
|
|
|
ValidatorsByConsAddrKey = keeper.ValidatorsByConsAddrKey
|
2018-06-26 19:00:12 -07:00
|
|
|
ValidatorsBondedIndexKey = keeper.ValidatorsBondedIndexKey
|
|
|
|
ValidatorsByPowerIndexKey = keeper.ValidatorsByPowerIndexKey
|
|
|
|
DelegationKey = keeper.DelegationKey
|
|
|
|
IntraTxCounterKey = keeper.IntraTxCounterKey
|
|
|
|
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
|
2018-10-09 10:58:59 -07:00
|
|
|
TestingUpdateValidator = keeper.TestingUpdateValidator
|
2018-06-26 19:00:12 -07:00
|
|
|
|
2018-10-19 11:36:00 -07:00
|
|
|
DefaultParamspace = keeper.DefaultParamspace
|
|
|
|
KeyUnbondingTime = types.KeyUnbondingTime
|
|
|
|
KeyMaxValidators = types.KeyMaxValidators
|
|
|
|
KeyBondDenom = types.KeyBondDenom
|
2018-08-31 02:03:43 -07:00
|
|
|
|
2018-09-24 15:23:58 -07:00
|
|
|
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
|
2018-06-26 19:00:12 -07:00
|
|
|
|
2018-07-10 17:16:37 -07:00
|
|
|
NewMsgCreateValidator = types.NewMsgCreateValidator
|
|
|
|
NewMsgCreateValidatorOnBehalfOf = types.NewMsgCreateValidatorOnBehalfOf
|
|
|
|
NewMsgEditValidator = types.NewMsgEditValidator
|
|
|
|
NewMsgDelegate = types.NewMsgDelegate
|
|
|
|
NewMsgBeginUnbonding = types.NewMsgBeginUnbonding
|
|
|
|
NewMsgBeginRedelegate = types.NewMsgBeginRedelegate
|
2018-09-13 14:23:44 -07:00
|
|
|
|
|
|
|
NewQuerier = querier.NewQuerier
|
2018-06-26 19:00:12 -07:00
|
|
|
)
|
|
|
|
|
2018-10-20 13:31:26 -07:00
|
|
|
const (
|
|
|
|
QueryValidators = querier.QueryValidators
|
|
|
|
QueryValidator = querier.QueryValidator
|
|
|
|
QueryDelegatorDelegations = querier.QueryDelegatorDelegations
|
|
|
|
QueryDelegatorUnbondingDelegations = querier.QueryDelegatorUnbondingDelegations
|
|
|
|
QueryDelegatorRedelegations = querier.QueryDelegatorRedelegations
|
|
|
|
QueryDelegation = querier.QueryDelegation
|
|
|
|
QueryUnbondingDelegation = querier.QueryUnbondingDelegation
|
|
|
|
QueryDelegatorValidators = querier.QueryDelegatorValidators
|
|
|
|
QueryDelegatorValidator = querier.QueryDelegatorValidator
|
|
|
|
QueryPool = querier.QueryPool
|
|
|
|
QueryParameters = querier.QueryParameters
|
|
|
|
)
|
|
|
|
|
2018-06-26 19:00:12 -07:00
|
|
|
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
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2018-07-09 17:42:57 -07:00
|
|
|
ErrNilValidatorAddr = types.ErrNilValidatorAddr
|
|
|
|
ErrNoValidatorFound = types.ErrNoValidatorFound
|
|
|
|
ErrValidatorOwnerExists = types.ErrValidatorOwnerExists
|
|
|
|
ErrValidatorPubKeyExists = types.ErrValidatorPubKeyExists
|
2018-08-22 08:56:13 -07:00
|
|
|
ErrValidatorJailed = types.ErrValidatorJailed
|
2018-07-09 17:42:57 -07:00
|
|
|
ErrBadRemoveValidator = types.ErrBadRemoveValidator
|
|
|
|
ErrDescriptionLength = types.ErrDescriptionLength
|
|
|
|
ErrCommissionNegative = types.ErrCommissionNegative
|
|
|
|
ErrCommissionHuge = types.ErrCommissionHuge
|
2018-06-26 19:00:12 -07:00
|
|
|
|
|
|
|
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
|
|
|
|
)
|
|
|
|
|
|
|
|
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
|
|
|
|
)
|