governance

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2020 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxDescriptionLength       = types.MaxDescriptionLength
	MaxTitleLength             = types.MaxTitleLength
	DefaultPeriod              = types.DefaultPeriod
	ModuleName                 = types.ModuleName
	StoreKey                   = types.StoreKey
	RouterKey                  = types.RouterKey
	QuerierRoute               = types.QuerierRoute
	DefaultParamspace          = types.DefaultParamspace
	TypeMsgVote                = types.TypeMsgVote
	TypeMsgSubmitProposal      = types.TypeMsgSubmitProposal
	StatusNil                  = types.StatusNil
	StatusVotingPeriod         = types.StatusVotingPeriod
	StatusPassed               = types.StatusPassed
	StatusRejected             = types.StatusRejected
	StatusFailed               = types.StatusFailed
	ProposalTypeText           = types.ProposalTypeText
	ProposalTypeAddGovernor    = types.ProposalTypeAddGovernor
	ProposalTypeRemoveGovernor = types.ProposalTypeRemoveGovernor

	OptionEmpty = types.OptionEmpty
	OptionYes   = types.OptionYes
	OptionNo    = types.OptionNo
)

Variables

View Source
var (
	// functions aliases
	//RegisterInvariants            = keeper.RegisterInvariants
	//AllInvariants                 = keeper.AllInvariants
	//ModuleAccountInvariant        = keeper.ModuleAccountInvariant
	NewKeeper                   = keeper.NewKeeper
	NewQuerier                  = keeper.NewQuerier
	RegisterCodec               = types.RegisterCodec
	ValidateAbstract            = types.ValidateAbstract
	ErrUnknownProposal          = types.ErrUnknownProposal
	ErrUnknownVote              = types.ErrUnknownVote
	ErrInactiveProposal         = types.ErrInactiveProposal
	ErrInvalidProposalContent   = types.ErrInvalidProposalContent
	ErrInvalidProposalType      = types.ErrInvalidProposalType
	ErrInvalidVote              = types.ErrInvalidVote
	ErrInvalidGenesis           = types.ErrInvalidGenesis
	ErrNoProposalHandlerExists  = types.ErrNoProposalHandlerExists
	NewGenesisState             = types.NewGenesisState
	DefaultGenesisState         = types.DefaultGenesisState
	ValidateGenesis             = types.ValidateGenesis
	GetProposalIDBytes          = types.GetProposalIDBytes
	GetProposalIDFromBytes      = types.GetProposalIDFromBytes
	ProposalKey                 = types.ProposalKey
	ActiveProposalByTimeKey     = types.ActiveProposalByTimeKey
	ActiveProposalQueueKey      = types.ActiveProposalQueueKey
	VotesKey                    = types.VotesKey
	VoteKey                     = types.VoteKey
	SplitProposalKey            = types.SplitProposalKey
	SplitActiveProposalQueueKey = types.SplitActiveProposalQueueKey
	SplitKeyVote                = types.SplitKeyVote
	NewMsgSubmitProposal        = types.NewMsgSubmitProposal
	NewMsgVote                  = types.NewMsgVote
	NewMsgExpedite              = types.NewMsgExpedite
	ParamKeyTable               = types.ParamKeyTable
	NewTallyParams              = types.NewTallyParams
	NewVotingParams             = types.NewVotingParams
	NewParams                   = types.NewParams
	NewProposal                 = types.NewProposal
	NewRouter                   = gov.NewRouter
	ProposalStatusFromString    = types.ProposalStatusFromString
	ValidProposalStatus         = types.ValidProposalStatus
	NewTextProposal             = types.NewTextProposal
	NewAddGovernorProposal      = types.NewAddGovernorProposal
	NewRemoveGovernorProposal   = types.NewRemoveGovernorProposal
	RegisterProposalType        = types.RegisterProposalType
	RegisterProposalTypeCodec   = types.RegisterProposalTypeCodec
	ContentFromProposalType     = types.ContentFromProposalType
	IsValidProposalType         = types.IsValidProposalType
	NewTallyResult              = types.NewTallyResult
	NewTallyResultFromMap       = types.NewTallyResultFromMap
	EmptyTallyResult            = types.EmptyTallyResult
	NewVote                     = types.NewVote
	VoteOptionFromString        = types.VoteOptionFromString
	ValidVoteOption             = types.ValidVoteOption

	// variable aliases
	ModuleCdc                    = types.ModuleCdc
	ProposalsKeyPrefix           = types.ProposalsKeyPrefix
	ActiveProposalQueuePrefix    = types.ActiveProposalQueuePrefix
	ExpeditedProposalQueuePrefix = types.ExpeditedProposalQueuePrefix
	ProposalIDKey                = types.ProposalIDKey
	VotesKeyPrefix               = types.VotesKeyPrefix
	ParamStoreKeyVotingParams    = types.ParamStoreKeyVotingParams
	ParamStoreKeyTallyParams     = types.ParamStoreKeyTallyParams
)

Functions

func EndBlocker

func EndBlocker(ctx sdk.Context, keeper Keeper)

func InitGenesis

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

func NewGovernanceProposalHandler

func NewGovernanceProposalHandler(k Keeper) govtypes.Handler

func NewHandler

func NewHandler(keeper Keeper) sdk.Handler

Types

type AppModule

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

func NewAppModule

func NewAppModule(k Keeper, accountKeeper auth.AccountKeeper) AppModule

func (AppModule) BeginBlock

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

func (AppModule) EndBlock

func (AppModule) ExportGenesis

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

func (AppModule) InitGenesis

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

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

func (AppModule) QuerierRoute

func (am AppModule) QuerierRoute() string

func (AppModule) RegisterInvariants

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

func (AppModule) Route

func (am AppModule) Route() string

type AppModuleBasic

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

func NewAppModuleBasic

func NewAppModuleBasic(proposalHandlers ...client.ProposalHandler) AppModuleBasic

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

func (AppModuleBasic) GetQueryCmd

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

func (AppModuleBasic) GetTxCmd

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

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

func (AppModuleBasic) RegisterCodec

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

func (AppModuleBasic) RegisterRESTRoutes

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

func (AppModuleBasic) ValidateGenesis

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

type Content

type Content = gov.Content

type GenesisState

type GenesisState = types.GenesisState

func ExportGenesis

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

ExportGenesis - output genesis parameters

type Handler

type Handler = gov.Handler

type Keeper

type Keeper = keeper.Keeper

type MsgExpedite

type MsgExpedite = types.MsgExpedite

type MsgSubmitProposal

type MsgSubmitProposal = types.MsgSubmitProposal

type MsgVote

type MsgVote = types.MsgVote

type Params

type Params = types.Params

type Proposal

type Proposal = types.Proposal

type ProposalStatus

type ProposalStatus = types.ProposalStatus

type Proposals

type Proposals = types.Proposals

type TallyParams

type TallyParams = types.TallyParams

type TallyResult

type TallyResult = types.TallyResult

type TextProposal

type TextProposal = types.TextProposal

type Vote

type Vote = types.Vote

type VoteOption

type VoteOption = types.VoteOption

type Votes

type Votes = types.Votes

type VotingParams

type VotingParams = types.VotingParams

Directories

Path Synopsis
cli
internal

Jump to

Keyboard shortcuts

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