distribution

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultParamspace = keeper.DefaultParamspace

	ModuleName                       = types.ModuleName
	StoreKey                         = types.StoreKey
	RouterKey                        = types.RouterKey
	QuerierRoute                     = types.QuerierRoute
	ProposalTypeCommunityPoolSpend   = types.ProposalTypeCommunityPoolSpend
	QueryParams                      = types.QueryParams
	QueryValidatorOutstandingRewards = types.QueryValidatorOutstandingRewards
	QueryValidatorCommission         = types.QueryValidatorCommission
	QueryValidatorSlashes            = types.QueryValidatorSlashes
	QueryDelegationRewards           = types.QueryDelegationRewards
	QueryDelegatorTotalRewards       = types.QueryDelegatorTotalRewards
	QueryDelegatorValidators         = types.QueryDelegatorValidators
	QueryWithdrawAddr                = types.QueryWithdrawAddr
	QueryCommunityPool               = types.QueryCommunityPool
	ParamCommunityTax                = types.ParamCommunityTax
	ParamBaseProposerReward          = types.ParamBaseProposerReward
	ParamBonusProposerReward         = types.ParamBonusProposerReward
	ParamWithdrawAddrEnabled         = types.ParamWithdrawAddrEnabled
)

Variables

View Source
var (
	// functions aliases
	RegisterInvariants                         = keeper.RegisterInvariants
	AllInvariants                              = keeper.AllInvariants
	NonNegativeOutstandingInvariant            = keeper.NonNegativeOutstandingInvariant
	CanWithdrawInvariant                       = keeper.CanWithdrawInvariant
	ReferenceCountInvariant                    = keeper.ReferenceCountInvariant
	ModuleAccountInvariant                     = keeper.ModuleAccountInvariant
	NewKeeper                                  = keeper.NewKeeper
	GetValidatorOutstandingRewardsAddress      = keeper.GetValidatorOutstandingRewardsAddress
	GetDelegatorWithdrawInfoAddress            = keeper.GetDelegatorWithdrawInfoAddress
	GetDelegatorStartingInfoAddresses          = keeper.GetDelegatorStartingInfoAddresses
	GetValidatorHistoricalRewardsAddressPeriod = keeper.GetValidatorHistoricalRewardsAddressPeriod
	GetValidatorCurrentRewardsAddress          = keeper.GetValidatorCurrentRewardsAddress
	GetValidatorAccumulatedCommissionAddress   = keeper.GetValidatorAccumulatedCommissionAddress
	GetValidatorSlashEventAddressHeight        = keeper.GetValidatorSlashEventAddressHeight
	GetValidatorOutstandingRewardsKey          = keeper.GetValidatorOutstandingRewardsKey
	GetDelegatorWithdrawAddrKey                = keeper.GetDelegatorWithdrawAddrKey
	GetDelegatorStartingInfoKey                = keeper.GetDelegatorStartingInfoKey
	GetValidatorHistoricalRewardsPrefix        = keeper.GetValidatorHistoricalRewardsPrefix
	GetValidatorHistoricalRewardsKey           = keeper.GetValidatorHistoricalRewardsKey
	GetValidatorCurrentRewardsKey              = keeper.GetValidatorCurrentRewardsKey
	GetValidatorAccumulatedCommissionKey       = keeper.GetValidatorAccumulatedCommissionKey
	GetValidatorSlashEventPrefix               = keeper.GetValidatorSlashEventPrefix
	GetValidatorSlashEventKeyPrefix            = keeper.GetValidatorSlashEventKeyPrefix
	GetValidatorSlashEventKey                  = keeper.GetValidatorSlashEventKey
	ParamKeyTable                              = keeper.ParamKeyTable
	HandleCommunityPoolSpendProposal           = keeper.HandleCommunityPoolSpendProposal
	NewQuerier                                 = keeper.NewQuerier
	MakeTestCodec                              = keeper.MakeTestCodec
	CreateTestInputDefault                     = keeper.CreateTestInputDefault
	CreateTestInputAdvanced                    = keeper.CreateTestInputAdvanced
	RegisterCodec                              = types.RegisterCodec
	NewDelegatorStartingInfo                   = types.NewDelegatorStartingInfo
	ErrEmptyDelegatorAddr                      = types.ErrEmptyDelegatorAddr
	ErrEmptyWithdrawAddr                       = types.ErrEmptyWithdrawAddr
	ErrEmptyValidatorAddr                      = types.ErrEmptyValidatorAddr
	ErrEmptyDelegationDistInfo                 = types.ErrEmptyDelegationDistInfo
	ErrNoValidatorDistInfo                     = types.ErrNoValidatorDistInfo
	ErrNoValidatorCommission                   = types.ErrNoValidatorCommission
	ErrSetWithdrawAddrDisabled                 = types.ErrSetWithdrawAddrDisabled
	ErrBadDistribution                         = types.ErrBadDistribution
	ErrInvalidProposalAmount                   = types.ErrInvalidProposalAmount
	ErrEmptyProposalRecipient                  = types.ErrEmptyProposalRecipient
	ErrNoValidatorExists                       = types.ErrNoValidatorExists
	ErrNoDelegationExists                      = types.ErrNoDelegationExists
	InitialFeePool                             = types.InitialFeePool
	NewGenesisState                            = types.NewGenesisState
	DefaultGenesisState                        = types.DefaultGenesisState
	ValidateGenesis                            = types.ValidateGenesis
	NewMsgSetWithdrawAddress                   = types.NewMsgSetWithdrawAddress
	NewMsgWithdrawDelegatorReward              = types.NewMsgWithdrawDelegatorReward
	NewMsgWithdrawValidatorCommission          = types.NewMsgWithdrawValidatorCommission
	NewCommunityPoolSpendProposal              = types.NewCommunityPoolSpendProposal
	NewQueryValidatorOutstandingRewardsParams  = types.NewQueryValidatorOutstandingRewardsParams
	NewQueryValidatorCommissionParams          = types.NewQueryValidatorCommissionParams
	NewQueryValidatorSlashesParams             = types.NewQueryValidatorSlashesParams
	NewQueryDelegationRewardsParams            = types.NewQueryDelegationRewardsParams
	NewQueryDelegatorParams                    = types.NewQueryDelegatorParams
	NewQueryDelegatorWithdrawAddrParams        = types.NewQueryDelegatorWithdrawAddrParams
	NewQueryDelegatorTotalRewardsResponse      = types.NewQueryDelegatorTotalRewardsResponse
	NewDelegationDelegatorReward               = types.NewDelegationDelegatorReward
	NewValidatorHistoricalRewards              = types.NewValidatorHistoricalRewards
	NewValidatorCurrentRewards                 = types.NewValidatorCurrentRewards
	InitialValidatorAccumulatedCommission      = types.InitialValidatorAccumulatedCommission
	NewValidatorSlashEvent                     = types.NewValidatorSlashEvent

	// variable aliases
	FeePoolKey                           = keeper.FeePoolKey
	ProposerKey                          = keeper.ProposerKey
	ValidatorOutstandingRewardsPrefix    = keeper.ValidatorOutstandingRewardsPrefix
	DelegatorWithdrawAddrPrefix          = keeper.DelegatorWithdrawAddrPrefix
	DelegatorStartingInfoPrefix          = keeper.DelegatorStartingInfoPrefix
	ValidatorHistoricalRewardsPrefix     = keeper.ValidatorHistoricalRewardsPrefix
	ValidatorCurrentRewardsPrefix        = keeper.ValidatorCurrentRewardsPrefix
	ValidatorAccumulatedCommissionPrefix = keeper.ValidatorAccumulatedCommissionPrefix
	ValidatorSlashEventPrefix            = keeper.ValidatorSlashEventPrefix
	ParamStoreKeyCommunityTax            = keeper.ParamStoreKeyCommunityTax
	ParamStoreKeyBaseProposerReward      = keeper.ParamStoreKeyBaseProposerReward
	ParamStoreKeyBonusProposerReward     = keeper.ParamStoreKeyBonusProposerReward
	ParamStoreKeyWithdrawAddrEnabled     = keeper.ParamStoreKeyWithdrawAddrEnabled
	TestAddrs                            = keeper.TestAddrs
	ModuleCdc                            = types.ModuleCdc
	EventTypeSetWithdrawAddress          = types.EventTypeSetWithdrawAddress
	EventTypeRewards                     = types.EventTypeRewards
	EventTypeCommission                  = types.EventTypeCommission
	EventTypeWithdrawRewards             = types.EventTypeWithdrawRewards
	EventTypeWithdrawCommission          = types.EventTypeWithdrawCommission
	EventTypeProposerReward              = types.EventTypeProposerReward
	AttributeKeyWithdrawAddress          = types.AttributeKeyWithdrawAddress
	AttributeKeyValidator                = types.AttributeKeyValidator
	AttributeValueCategory               = types.AttributeValueCategory
)

Functions

func BeginBlocker

func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper)

set the proposer for determining distribution during endblock and distribute rewards for the previous block

func ExportGenesis

func ExportGenesis(ctx sdk.Context, keeper Keeper) types.GenesisState

ExportGenesis returns a GenesisState for a given context and keeper.

func InitGenesis

func InitGenesis(ctx sdk.Context, keeper Keeper, supplyKeeper types.SupplyKeeper, data types.GenesisState)

InitGenesis sets distribution information for genesis

func NewCommunityPoolSpendProposalHandler

func NewCommunityPoolSpendProposalHandler(k Keeper) govtypes.Handler

func NewHandler

func NewHandler(k keeper.Keeper) sdk.Handler

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

AppModule implements an application module for the distr module.

func NewAppModule

func NewAppModule(keeper Keeper, supplyKeeper types.SupplyKeeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)

BeginBlock returns the begin blocker for the distr module.

func (AppModule) EndBlock

EndBlock returns the end blocker for the distr module. It returns no validator updates.

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage

ExportGenesis returns the exported genesis state as raw bytes for the distr module.

func (AppModule) GenerateGenesisState

func (am AppModule) GenerateGenesisState(simState *module.SimulationState)

GenerateGenesisState creates a randomized GenState of the distr module.

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate

InitGenesis performs genesis initialization for the distr module. It returns no validator updates.

func (AppModule) Name

func (AppModule) Name() string

Name returns the distr module's name.

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

NewHandler returns an sdk.Handler for the distr module.

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler returns no sdk.Querier.

func (AppModule) ProposalContents

func (am AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent

ProposalContents returns all the distr content functions used to simulate governance proposals.

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute returns the distr module's querier route name.

func (AppModule) RandomizedParams

func (am AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange

RandomizedParams creates randomized distr param changes for the simulator.

func (AppModule) RegisterInvariants

func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)

RegisterInvariants registers module invariants

func (AppModule) Route

func (AppModule) Route() string

Route returns the message routing key for the distr module.

func (AppModule) WeightedOperations

func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation

WeightedOperations returns the all the distr module operations with their respective weights.

func (*AppModule) WithAccountKeeper

func (am *AppModule) WithAccountKeeper(ak keeper.AccountKeeper) *AppModule

func (*AppModule) WithStakingKeeper

func (am *AppModule) WithStakingKeeper(sk stakingkeeper.Keeper) *AppModule

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic defines the basic application module used by the distr module.

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

default genesis state

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command

GetQueryCmd returns the root query command for the distr module.

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command

get the root tx command of this module

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name returns the distr module's name.

func (AppModuleBasic) RegisterCodec

func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)

register module codec

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)

register rest routes

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error

module validate genesis

type CommunityPoolSpendProposal

type CommunityPoolSpendProposal = types.CommunityPoolSpendProposal

type DelegationDelegatorReward

type DelegationDelegatorReward = types.DelegationDelegatorReward

type DelegatorStartingInfo

type DelegatorStartingInfo = types.DelegatorStartingInfo

type DelegatorStartingInfoRecord

type DelegatorStartingInfoRecord = types.DelegatorStartingInfoRecord

type DelegatorWithdrawInfo

type DelegatorWithdrawInfo = types.DelegatorWithdrawInfo

type FeePool

type FeePool = types.FeePool

type GenesisState

type GenesisState = types.GenesisState

type Hooks

type Hooks = keeper.Hooks

type Keeper

type Keeper = keeper.Keeper

type MsgSetWithdrawAddress

type MsgSetWithdrawAddress = types.MsgSetWithdrawAddress

type MsgWithdrawDelegatorReward

type MsgWithdrawDelegatorReward = types.MsgWithdrawDelegatorReward

type MsgWithdrawValidatorCommission

type MsgWithdrawValidatorCommission = types.MsgWithdrawValidatorCommission

type QueryDelegationRewardsParams

type QueryDelegationRewardsParams = types.QueryDelegationRewardsParams

type QueryDelegatorParams

type QueryDelegatorParams = types.QueryDelegatorParams

type QueryDelegatorTotalRewardsResponse

type QueryDelegatorTotalRewardsResponse = types.QueryDelegatorTotalRewardsResponse

type QueryDelegatorWithdrawAddrParams

type QueryDelegatorWithdrawAddrParams = types.QueryDelegatorWithdrawAddrParams

type QueryValidatorCommissionParams

type QueryValidatorCommissionParams = types.QueryValidatorCommissionParams

type QueryValidatorOutstandingRewardsParams

type QueryValidatorOutstandingRewardsParams = types.QueryValidatorOutstandingRewardsParams

type QueryValidatorSlashesParams

type QueryValidatorSlashesParams = types.QueryValidatorSlashesParams

type ValidatorAccumulatedCommission

type ValidatorAccumulatedCommission = types.ValidatorAccumulatedCommission

type ValidatorAccumulatedCommissionRecord

type ValidatorAccumulatedCommissionRecord = types.ValidatorAccumulatedCommissionRecord

type ValidatorCurrentRewards

type ValidatorCurrentRewards = types.ValidatorCurrentRewards

type ValidatorCurrentRewardsRecord

type ValidatorCurrentRewardsRecord = types.ValidatorCurrentRewardsRecord

type ValidatorHistoricalRewards

type ValidatorHistoricalRewards = types.ValidatorHistoricalRewards

type ValidatorHistoricalRewardsRecord

type ValidatorHistoricalRewardsRecord = types.ValidatorHistoricalRewardsRecord

type ValidatorOutstandingRewards

type ValidatorOutstandingRewards = types.ValidatorOutstandingRewards

type ValidatorOutstandingRewardsRecord

type ValidatorOutstandingRewardsRecord = types.ValidatorOutstandingRewardsRecord

type ValidatorSlashEvent

type ValidatorSlashEvent = types.ValidatorSlashEvent

type ValidatorSlashEventRecord

type ValidatorSlashEventRecord = types.ValidatorSlashEventRecord

type ValidatorSlashEvents

type ValidatorSlashEvents = types.ValidatorSlashEvents

Directories

Path Synopsis
cli
nolint
nolint
nolint nolint
nolint nolint

Jump to

Keyboard shortcuts

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