pos

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 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.Validator

func InitGenesis

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

func NewHandler

func NewHandler(k keeper.Keeper) sdk.Handler

func NewQuerier

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

func RegisterCodec

func RegisterCodec(cdc *wire.Codec) *wire.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.Address
	ValidatorAddr sdk.Address
}

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

type QueryDelegationParams

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

type QueryDelegatorParams

type QueryDelegatorParams struct {
	DelegatorAddr sdk.Address
}

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

type QueryValidatorDistParams

type QueryValidatorDistParams struct {
	ValidatorAddr sdk.Address
}

type QueryValidatorParams

type QueryValidatorParams struct {
	ValidatorAddr sdk.Address
}

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