Documentation ¶
Index ¶
- func ProposalIDFromEvents(events sdk.StringEvents) (uint64, error)
- func WeightVoteOptionFromEvents(events sdk.StringEvents) (govtypesv1.WeightedVoteOption, error)
- type DistrModule
- type MintModule
- type Module
- func (m *Module) HandleBlock(b *tmctypes.ResultBlock, blockResults *tmctypes.ResultBlockResults, ...) error
- func (m *Module) HandleGenesis(doc *tmtypes.GenesisDoc, appState map[string]json.RawMessage) error
- func (m *Module) HandleMsg(index int, msg sdk.Msg, tx *juno.Tx) error
- func (m *Module) HandleMsgExec(index int, _ *authz.MsgExec, _ int, executedMsg sdk.Msg, tx *juno.Tx) error
- func (m *Module) Name() string
- func (m *Module) RegisterPeriodicOperations(scheduler *gocron.Scheduler) error
- func (m *Module) UpdateParams(height int64) error
- func (m *Module) UpdateProposalStakingPoolSnapshot(height int64, proposalID uint64) error
- func (m *Module) UpdateProposalStatus(height int64, id uint64) error
- func (m *Module) UpdateProposalTallyResult(proposalID uint64, height int64) error
- func (m *Module) UpdateProposalsStakingPoolSnapshot() error
- func (m *Module) UpdateProposalsTallyResults() error
- type SlashingModule
- type StakingModule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProposalIDFromEvents ¶
func ProposalIDFromEvents(events sdk.StringEvents) (uint64, error)
ProposalIDFromEvent returns the proposal id from the given events
func WeightVoteOptionFromEvents ¶
func WeightVoteOptionFromEvents(events sdk.StringEvents) (govtypesv1.WeightedVoteOption, error)
WeightVoteOptionFromEvents returns the vote option from the given events
Types ¶
type DistrModule ¶
type MintModule ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module represent x/gov module
func NewModule ¶
func NewModule( source govsource.Source, distrModule DistrModule, mintModule MintModule, slashingModule SlashingModule, stakingModule StakingModule, cdc codec.Codec, db *database.Db, ) *Module
NewModule returns a new Module instance
func (*Module) HandleBlock ¶
func (m *Module) HandleBlock( b *tmctypes.ResultBlock, blockResults *tmctypes.ResultBlockResults, txs []*juno.Tx, _ *tmctypes.ResultValidators, ) error
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) HandleMsgExec ¶
func (m *Module) HandleMsgExec(index int, _ *authz.MsgExec, _ int, executedMsg sdk.Msg, tx *juno.Tx) error
HandleMsgExec implements modules.AuthzMessageModule
func (*Module) RegisterPeriodicOperations ¶
RegisterPeriodicOperations implements modules.PeriodicOperationsModule
func (*Module) UpdateParams ¶
UpdateParams updates the governance parameters for the given height
func (*Module) UpdateProposalStakingPoolSnapshot ¶
UpdateProposalStakingPoolSnapshot updates the staking pool snapshot associated with the gov proposal having the provided id
func (*Module) UpdateProposalStatus ¶
UpdateProposalStatus queries the latest details of given proposal ID, updates it's status in database and handles changes if the proposal has been passed.
func (*Module) UpdateProposalTallyResult ¶
UpdateProposalTallyResult updates the tally result associated with the given proposal ID
func (*Module) UpdateProposalsStakingPoolSnapshot ¶
UpdateProposalsStakingPoolSnapshot updates staking pool snapshots for active proposals
func (*Module) UpdateProposalsTallyResults ¶
UpdateProposalsTallyResults updates the tally for active proposals