2018-06-26 19:00:12 -07:00
|
|
|
// nolint
|
2019-01-11 12:08:01 -08:00
|
|
|
package staking
|
2018-06-26 19:00:12 -07:00
|
|
|
|
|
|
|
import (
|
2019-01-11 12:08:01 -08:00
|
|
|
"github.com/cosmos/cosmos-sdk/x/staking/keeper"
|
|
|
|
"github.com/cosmos/cosmos-sdk/x/staking/querier"
|
|
|
|
"github.com/cosmos/cosmos-sdk/x/staking/tags"
|
|
|
|
"github.com/cosmos/cosmos-sdk/x/staking/types"
|
2018-06-26 19:00:12 -07:00
|
|
|
)
|
|
|
|
|
2018-07-03 21:21:36 -07:00
|
|
|
type (
|
2018-12-18 13:43:41 -08: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
|
2019-01-17 09:53:22 -08:00
|
|
|
MsgUndelegate = types.MsgUndelegate
|
2018-12-18 13:43:41 -08:00
|
|
|
MsgBeginRedelegate = types.MsgBeginRedelegate
|
|
|
|
GenesisState = types.GenesisState
|
|
|
|
QueryDelegatorParams = querier.QueryDelegatorParams
|
|
|
|
QueryValidatorParams = querier.QueryValidatorParams
|
|
|
|
QueryBondsParams = querier.QueryBondsParams
|
|
|
|
QueryRedelegationParams = querier.QueryRedelegationParams
|
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
|
2018-10-22 01:18:10 -07:00
|
|
|
LastValidatorPowerKey = keeper.LastValidatorPowerKey
|
2018-10-21 15:26:58 -07:00
|
|
|
LastTotalPowerKey = keeper.LastTotalPowerKey
|
2018-06-26 19:00:12 -07:00
|
|
|
ValidatorsKey = keeper.ValidatorsKey
|
2018-09-24 21:09:31 -07:00
|
|
|
ValidatorsByConsAddrKey = keeper.ValidatorsByConsAddrKey
|
2018-06-26 19:00:12 -07:00
|
|
|
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
|
2018-10-09 10:58:59 -07:00
|
|
|
TestingUpdateValidator = keeper.TestingUpdateValidator
|
2018-11-08 16:28:28 -08:00
|
|
|
UnbondingQueueKey = keeper.UnbondingQueueKey
|
|
|
|
RedelegationQueueKey = keeper.RedelegationQueueKey
|
|
|
|
ValidatorQueueKey = keeper.ValidatorQueueKey
|
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
|
2019-01-16 13:38:05 -08:00
|
|
|
DefaultBondDenom = types.DefaultBondDenom
|
2018-09-24 15:23:58 -07:00
|
|
|
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
|
2019-01-17 09:53:22 -08:00
|
|
|
NewMsgUndelegate = types.NewMsgUndelegate
|
2018-07-10 17:16:37 -07:00
|
|
|
NewMsgBeginRedelegate = types.NewMsgBeginRedelegate
|
2018-09-13 14:23:44 -07:00
|
|
|
|
2018-11-12 14:12:25 -08:00
|
|
|
NewQuerier = querier.NewQuerier
|
|
|
|
NewQueryDelegatorParams = querier.NewQueryDelegatorParams
|
|
|
|
NewQueryValidatorParams = querier.NewQueryValidatorParams
|
|
|
|
NewQueryBondsParams = querier.NewQueryBondsParams
|
2018-06-26 19:00:12 -07:00
|
|
|
)
|
|
|
|
|
2018-10-20 13:31:26 -07:00
|
|
|
const (
|
|
|
|
QueryValidators = querier.QueryValidators
|
|
|
|
QueryValidator = querier.QueryValidator
|
2018-10-22 03:12:05 -07:00
|
|
|
QueryValidatorUnbondingDelegations = querier.QueryValidatorUnbondingDelegations
|
|
|
|
QueryDelegation = querier.QueryDelegation
|
|
|
|
QueryUnbondingDelegation = querier.QueryUnbondingDelegation
|
2018-10-20 13:31:26 -07:00
|
|
|
QueryDelegatorDelegations = querier.QueryDelegatorDelegations
|
|
|
|
QueryDelegatorUnbondingDelegations = querier.QueryDelegatorUnbondingDelegations
|
2018-12-18 13:43:41 -08:00
|
|
|
QueryRedelegations = querier.QueryRedelegations
|
2018-10-20 13:31:26 -07:00
|
|
|
QueryDelegatorValidators = querier.QueryDelegatorValidators
|
|
|
|
QueryDelegatorValidator = querier.QueryDelegatorValidator
|
|
|
|
QueryPool = querier.QueryPool
|
|
|
|
QueryParameters = querier.QueryParameters
|
|
|
|
)
|
|
|
|
|
2018-06-26 19:00:12 -07:00
|
|
|
const (
|
2018-12-19 11:58:30 -08:00
|
|
|
StoreKey = types.StoreKey
|
|
|
|
TStoreKey = types.TStoreKey
|
2019-01-11 12:08:01 -08:00
|
|
|
QuerierRoute = types.QuerierRoute
|
2018-12-19 11:58:30 -08:00
|
|
|
RouterKey = types.RouterKey
|
2018-06-26 19:00:12 -07:00
|
|
|
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-11-29 09:21:45 -08:00
|
|
|
ErrNilValidatorAddr = types.ErrNilValidatorAddr
|
|
|
|
ErrNoValidatorFound = types.ErrNoValidatorFound
|
|
|
|
ErrValidatorOwnerExists = types.ErrValidatorOwnerExists
|
|
|
|
ErrValidatorPubKeyExists = types.ErrValidatorPubKeyExists
|
|
|
|
ErrValidatorPubKeyTypeUnsupported = types.ErrValidatorPubKeyTypeNotSupported
|
|
|
|
ErrValidatorJailed = types.ErrValidatorJailed
|
|
|
|
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 (
|
|
|
|
ActionCompleteUnbonding = tags.ActionCompleteUnbonding
|
|
|
|
ActionCompleteRedelegation = tags.ActionCompleteRedelegation
|
|
|
|
|
|
|
|
TagAction = tags.Action
|
|
|
|
TagSrcValidator = tags.SrcValidator
|
|
|
|
TagDstValidator = tags.DstValidator
|
|
|
|
TagDelegator = tags.Delegator
|
|
|
|
TagMoniker = tags.Moniker
|
|
|
|
TagIdentity = tags.Identity
|
|
|
|
)
|