vbr

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ModuleName   = types.ModuleName
	StoreKey     = types.StoreKey
	QuerierRoute = types.QuerierRoute
)

Variables

View Source
var (
	NewKeeper  = keeper.NewKeeper
	NewHandler = keeper.NewHandler
	NewQuerier = keeper.NewQuerier

	ModuleCdc     = types.ModuleCdc
	RegisterCodec = types.RegisterCodec
)

Functions

func BeginBlocker

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

BeginBlocker retrieves all the active validators, and based on how many are of them, calculate the reward ONLY for the block proposer on every begin block.

func InitGenesis

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

InitGenesis sets the initial Block Reward Pool amount for genesis.

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis performs basic validation of genesis data returning an error for any failed validation criteria.

Types

type AppModule

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

___________________________ app module

func NewAppModule

func NewAppModule(k Keeper, sk staking.Keeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

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

module begin-block

func (AppModule) EndBlock

module end-block

func (AppModule) ExportGenesis

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

module export genesis

func (AppModule) InitGenesis

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

module init-genesis

func (AppModule) Name

func (AppModule) Name() string

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

module querier

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

func (AppModule) RegisterInvariants

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

func (AppModule) Route

func (AppModule) Route() string

type AppModuleBasic

type AppModuleBasic struct{}

func (AppModuleBasic) DefaultGenesis

func (amb AppModuleBasic) DefaultGenesis() json.RawMessage

genesis default state

func (AppModuleBasic) GetQueryCmd

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

func (AppModuleBasic) GetTxCmd

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

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

module name

func (AppModuleBasic) RegisterCodec

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

module codecs

func (AppModuleBasic) RegisterRESTRoutes

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

func (AppModuleBasic) ValidateGenesis

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

genesis validation

type AppModuleSimulation

type AppModuleSimulation struct{}

AppModuleSimulation defines the module simulation functions used by the auth module.

func (AppModuleSimulation) RegisterStoreDecoder

func (AppModuleSimulation) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)

RegisterStoreDecoder registers a decoder for auth module's types

type GenesisState

type GenesisState struct {
	PoolAmount       sdk.DecCoins `json:"pool_amount"`
	YearlyPoolAmount sdk.DecCoins `json:"yearly_pool_amount"`
	YearNumber       int64        `json:"year_number"`
}

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState returns a default genesis state

func ExportGenesis

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

ExportGenesis returns a GenesisState for a given context and keeper.

type Keeper

type Keeper = keeper.Keeper

type MsgIncrementsBlockRewardsPool

type MsgIncrementsBlockRewardsPool = types.MsgIncrementBlockRewardsPool

Directories

Path Synopsis
client
cli
internal
legacy
v1.3.4
DONTCOVER nolint
DONTCOVER nolint

Jump to

Keyboard shortcuts

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