pos

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	QueryValidators          = "validators"
	QueryValidator           = "validator"
	QueryDelegator           = "delegator"
	QueryDelegation          = "delegation"
	QueryUnbondingDelegation = "unbondingDelegation"
	QueryDelegatorValidators = "delegatorValidators"
	QueryDelegatorValidator  = "delegatorValidator"
	QueryPool                = "pool"
	QueryParameters          = "parameters"
	QueryValidatorDistInfo   = "validatorDistInfo"
)

query endpoints supported by the staking Querier

Variables

View Source
var (
	ValidatorChanged = false
)

Functions

func EndBlocker

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

func InitGenesis

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

func NewHandler

func NewHandler(k keeper.Keeper) sdk.Handler

func NewQuerier

func NewQuerier(k keep.Keeper, cdc *amino.Codec) sdk.Querier

func RegisterCodec

func RegisterCodec(cdc *amino.Codec) *amino.Codec

Types

type GenesisState

type GenesisState struct {
	Pool       posTypes.Pool         `json:"pool"`
	Params     posTypes.Params       `json:"params"`
	Validators []posTypes.Validator  `json:"validators"`
	Bonds      []posTypes.Delegation `json:"bonds"`
}

GenesisState - all staking state that must be provided at genesis

func GenerateGenesis

func GenerateGenesis(pubKey types.PubKeySecp256k1) GenesisState

func NewGenesisState

func NewGenesisState(pool posTypes.Pool, params posTypes.Params, validators []posTypes.Validator, bonds []posTypes.Delegation) GenesisState

type QueryBondsParams

type QueryBondsParams struct {
	DelegatorAddr sdk.AccAddress
	ValidatorAddr sdk.AccAddress
}

defines the params for the following queries: - 'custom/stake/delegation' - 'custom/stake/unbondingDelegation' - 'custom/stake/delegatorValidator'

type QueryDelegationParams

type QueryDelegationParams struct {
	ValidatorAddr sdk.AccAddress
	DelegatorAddr sdk.AccAddress
}

type QueryDelegatorParams

type QueryDelegatorParams struct {
	DelegatorAddr sdk.AccAddress
}

defines the params for the following queries: - 'custom/stake/delegator' - 'custom/stake/delegatorValidators'

type QueryValidatorDistParams

type QueryValidatorDistParams struct {
	ValidatorAddr sdk.AccAddress
}

type QueryValidatorParams

type QueryValidatorParams struct {
	ValidatorAddr sdk.AccAddress
}

defines the params for the following queries: - 'custom/stake/validator'

Directories

Path Synopsis
nolint
nolint

Jump to

Keyboard shortcuts

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