gov

package
v3.2.0-stargate Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthModule

type AuthModule interface {
	RefreshAccounts(height int64, addresses []string) error
}

type DistrModule

type DistrModule interface {
	UpdateParams(height int64) error
}

type MintModule

type MintModule interface {
	UpdateParams(height int64) error
	UpdateInflation() error
}

type Module

type Module struct {
	// contains filtered or unexported fields
}

Module represent x/gov module

func NewModule

func NewModule(
	source govsource.Source,
	authModule AuthModule,
	distrModule DistrModule,
	mintModule MintModule,
	slashingModule SlashingModule,
	stakingModule StakingModule,
	cdc codec.Marshaler,
	db *database.Db,
) *Module

NewModule returns a new Module instance

func (*Module) HandleBlock

HandleBlock implements modules.BlockModule

func (*Module) HandleGenesis

func (m *Module) HandleGenesis(doc *tmtypes.GenesisDoc, appState map[string]json.RawMessage) error

HandleGenesis implements modules.Module

func (*Module) HandleMsg

func (m *Module) HandleMsg(index int, msg sdk.Msg, tx *juno.Tx) error

HandleMsg implements modules.MessageModule

func (*Module) Name

func (m *Module) Name() string

Name implements modules.Module

func (*Module) UpdateParams

func (m *Module) UpdateParams(height int64) error

UpdateParams updates the governance parameters for the given height

func (*Module) UpdateProposal

func (m *Module) UpdateProposal(height int64, id uint64) error

func (*Module) UpdateProposalSnapshots added in v3.2.0

func (m *Module) UpdateProposalSnapshots(height int64, blockVals *tmctypes.ResultValidators, id uint64) error

type SlashingModule

type SlashingModule interface {
	UpdateParams(height int64) error
}

type StakingModule

type StakingModule interface {
	GetStakingPool(height int64) (*types.Pool, error)
	GetValidatorsWithStatus(height int64, status string) ([]stakingtypes.Validator, []types.Validator, error)
	GetValidatorsVotingPowers(height int64, vals *tmctypes.ResultValidators) ([]types.ValidatorVotingPower, error)
	GetValidatorsStatuses(height int64, validators []stakingtypes.Validator) ([]types.ValidatorStatus, error)
	UpdateParams(height int64) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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