gov

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: MIT Imports: 21 Imported by: 1

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
}

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.Codec,
	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, 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