Documentation ¶
Index ¶
- Constants
- func NewAppUpgradeProposalHandler(k *Keeper) gov.Handler
- func NewQuerier(keeper Keeper) sdk.Querier
- type BankKeeper
- type Keeper
- func (k Keeper) AddNewVersionInfo(ctx sdk.Context, versionInfo types.VersionInfo)
- func (Keeper) AfterDepositPeriodPassed(_ sdk.Context, _ gov.Proposal)
- func (Keeper) AfterSubmitProposalHandler(_ sdk.Context, _ gov.Proposal)
- func (k Keeper) CheckMsgSubmitProposal(ctx sdk.Context, msg gov.MsgSubmitProposal) sdk.Error
- func (k Keeper) ClearSignals(ctx sdk.Context, protocol uint64)
- func (k Keeper) ClearUpgradeConfig(ctx sdk.Context)
- func (k Keeper) DeleteSignal(ctx sdk.Context, protocol uint64, address string) bool
- func (k Keeper) GetAppUpgradeConfig(ctx sdk.Context) (proto.AppUpgradeConfig, bool)
- func (k Keeper) GetCurrentVersion(ctx sdk.Context) uint64
- func (k Keeper) GetMaxDepositPeriod(ctx sdk.Context, content gov.Content) (maxDepositPeriod time.Duration)
- func (k Keeper) GetMinDeposit(ctx sdk.Context, content gov.Content) (minDeposit sdk.DecCoins)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.UpgradeParams)
- func (k Keeper) GetProtocolKeeper() ProtocolKeeper
- func (k Keeper) GetSignal(ctx sdk.Context, protocol uint64, address string) bool
- func (k Keeper) GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool)
- func (k Keeper) GetVotingPeriod(ctx sdk.Context, content gov.Content) (votingPeriod time.Duration)
- func (k Keeper) IterateBondedValidatorsByPower(ctx sdk.Context, ...)
- func (Keeper) RejectedHandler(_ sdk.Context, _ gov.Content)
- func (k Keeper) SetAppUpgradeConfig(ctx sdk.Context, proposalID, version, upgradeHeight uint64, software string) sdk.Error
- func (k Keeper) SetCurrentVersion(ctx sdk.Context, currentVersion uint64)
- func (k Keeper) SetLastFailedVersion(ctx sdk.Context, lastFailedVersion uint64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.UpgradeParams)
- func (k Keeper) SetSignal(ctx sdk.Context, protocol uint64, address string)
- func (Keeper) VoteHandler(_ sdk.Context, _ gov.Proposal, _ gov.Vote) (string, sdk.Error)
- type ProtocolKeeper
- type StakingKeeper
Constants ¶
const ( QueryUpgradeConfig = "config" QueryUpgradeVersion = "version" QueryUpgradeFailedVersion = "failed_version" )
const
Variables ¶
This section is empty.
Functions ¶
func NewAppUpgradeProposalHandler ¶
NewAppUpgradeProposalHandler creates a new upgrade handler for gov module
func NewQuerier ¶
NewQuerier is the module level router for state queries
Types ¶
type BankKeeper ¶
BankKeeper shows the expected action of bank keeper in this module
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper is the keeper struct of the upgrade store
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, pk ProtocolKeeper, sk StakingKeeper, ck BankKeeper, paramSpace params.Subspace) Keeper
NewKeeper creates a new upgrade keeper
func (Keeper) AddNewVersionInfo ¶
func (k Keeper) AddNewVersionInfo(ctx sdk.Context, versionInfo types.VersionInfo)
AddNewVersionInfo adds new version info
func (Keeper) AfterDepositPeriodPassed ¶
func (Keeper) AfterSubmitProposalHandler ¶
func (Keeper) CheckMsgSubmitProposal ¶
CheckMsgSubmitProposal implements ProposalHandler interface
func (Keeper) ClearSignals ¶
ClearSignals cleans up signals
func (Keeper) ClearUpgradeConfig ¶
ClearUpgradeConfig clears upgrade config
func (Keeper) DeleteSignal ¶
DeleteSignal removes signal
func (Keeper) GetAppUpgradeConfig ¶
GetAppUpgradeConfig gets app upgrade config
func (Keeper) GetCurrentVersion ¶
GetCurrentVersion gets current version
func (Keeper) GetMaxDepositPeriod ¶
func (k Keeper) GetMaxDepositPeriod(ctx sdk.Context, content gov.Content) (maxDepositPeriod time.Duration)
GetMaxDepositPeriod implements ProposalHandler interface
func (Keeper) GetMinDeposit ¶
GetMinDeposit implements ProposalHandler interface
func (Keeper) GetParams ¶
func (k Keeper) GetParams(ctx sdk.Context) (params types.UpgradeParams)
GetParams gets inflation params from the global param store
func (Keeper) GetProtocolKeeper ¶
func (k Keeper) GetProtocolKeeper() ProtocolKeeper
GetProtocolKeeper gets proto keeper
func (Keeper) GetValidatorByConsAddr ¶
func (k Keeper) GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool)
GetValidatorByConsAddr gets validator by its consensus address
func (Keeper) GetVotingPeriod ¶
GetVotingPeriod implements ProposalHandler interface
func (Keeper) IterateBondedValidatorsByPower ¶
func (k Keeper) IterateBondedValidatorsByPower(ctx sdk.Context, fn func(index int64, validator exported.ValidatorI) (stop bool))
IterateBondedValidatorsByPower iterates bonded validators by power
func (Keeper) SetAppUpgradeConfig ¶
func (k Keeper) SetAppUpgradeConfig(ctx sdk.Context, proposalID, version, upgradeHeight uint64, software string, ) sdk.Error
SetAppUpgradeConfig sets app upgrade config for test deprecated
func (Keeper) SetCurrentVersion ¶
SetCurrentVersion sets current version to store
func (Keeper) SetLastFailedVersion ¶
SetLastFailedVersion sets last failed version to store
func (Keeper) SetParams ¶
func (k Keeper) SetParams(ctx sdk.Context, params types.UpgradeParams)
SetParams sets upgrade params to store
type ProtocolKeeper ¶
type ProtocolKeeper interface { IsValidVersion(ctx sdk.Context, version uint64) bool GetUpgradeConfigByStore(store sdk.KVStore) (upgradeConfig proto.AppUpgradeConfig, found bool) GetUpgradeConfig(ctx sdk.Context) (upgradeConfig proto.AppUpgradeConfig, found bool) SetUpgradeConfig(ctx sdk.Context, upgradeConfig proto.AppUpgradeConfig) GetCurrentVersion(ctx sdk.Context) uint64 SetLastFailedVersion(ctx sdk.Context, lastFailedVersion uint64) SetCurrentVersion(ctx sdk.Context, currentVersion uint64) ClearUpgradeConfig(ctx sdk.Context) GetLastFailedVersion(ctx sdk.Context) uint64 }
ProtocolKeeper shows the expected action of proto keeper in this module
type StakingKeeper ¶
type StakingKeeper interface { IsValidator(ctx sdk.Context, addr sdk.AccAddress) bool IterateBondedValidatorsByPower(ctx sdk.Context, fn func(index int64, validator exported.ValidatorI) (stop bool)) GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator types.Validator, found bool) }
StakingKeeper shows the expected action of staking keeper in this module