Versions in this module Expand all Collapse all v1 v1.4.0 Jul 14, 2022 v1.3.0 Jun 29, 2022 v1.2.15 Jun 9, 2022 v1.2.14 Jun 2, 2022 v1.2.13 Apr 29, 2022 v1.2.12 Mar 30, 2022 Changes in this version + var DonePrefix = []byte("gov/done") + var LegacyActiveProposalQueuePrefix = []byte + var LegacyDonePrefix = []byte + var LegacyInactiveProposalQueuePrefix = []byte + var LegacyMigrationKey = []byte("gov/migrated") + var LegacyPlanPrefix = []byte + var LegacyProposalIDKey = []byte + var LegacyProposalsKeyPrefix = []byte + var LegacyVotesKeyPrefix = []byte + func DoneKey() []byte v1.2.10 Feb 14, 2022 v1.2.9 Feb 4, 2022 v1.2.8 Jan 26, 2022 v1.2.7 Jan 21, 2022 v1.2.6 Jan 18, 2022 v1.2.5 Dec 14, 2021 v1.2.4 Dec 2, 2021 v1.2.3 Nov 15, 2021 v1.2.2 Nov 10, 2021 Changes in this version + const AttributeKeyUpgradeHeight v1.2.1 Oct 28, 2021 Changes in this version + const AddressForSoftwareUpgrade + const AttributeKeyOption + const AttributeKeyProposalDescription + const AttributeKeyProposalID + const AttributeKeyProposalResult + const AttributeKeyProposalTitle + const AttributeKeyProposalType + const AttributeKeyProposalVotingEndBlock + const AttributeKeyProposalVotingStartBlock + const AttributeKeyResultVoteAbstain + const AttributeKeyResultVoteNo + const AttributeKeyResultVoteYes + const AttributeKeyTotalVotingPower + const AttributeKeyVotingPeriodStart + const AttributeValueCategory + const AttributeValueProposalFailed + const AttributeValueProposalPassed + const AttributeValueProposalRejected + const CodeAlreadyActiveProposal + const CodeDurationTooLong + const CodeInactiveProposal + const CodeInvalidGenesis + const CodeInvalidProposalContent + const CodeInvalidProposalContentDescrBlank + const CodeInvalidProposalContentDescrLong + const CodeInvalidProposalContentTitleBlank + const CodeInvalidProposalContentTitleLong + const CodeInvalidProposalType + const CodeInvalidStartEndBlocks + const CodeInvalidVote + const CodeNoProposalHandlerExists + const CodeNotAllowed + const CodeStartBlock + const CodeSubmitProposal + const CodeUnknownProposal + const DefaultCodespace + const DefaultParamspace + const DefaultStartingProposalID + const DurationInBlocks + const DurationInMonth + const EventTypeActiveProposal + const EventTypeInactiveProposal + const EventTypeProposalVote + const EventTypeSubmitProposal + const KeyUpgradedClient + const KeyUpgradedConsState + const KeyUpgradedIBCState + const MaxDescriptionLength + const MaxTitleLength + const ModuleName + const ParamDeposit + const ParamTallying + const ParamVoting + const ProposalTypeSoftwareUpgrade + const QuerierRoute + const QueryDeposit + const QueryDeposits + const QueryParams + const QueryProposal + const QueryProposals + const QueryTally + const QueryVote + const QueryVotes + const RouterKey + const StoreKey + const TypeMsgSoftwareUpgrade + const TypeMsgSubmitProposal + const TypeMsgVote + var ActiveProposalQueuePrefix = []byte + var AllowedAddresses = []string + var DefaultQuorum = sdk.NewDecWithPrec(667, 3) + var DefaultThreshold = sdk.NewDecWithPrec(5, 1) + var DoneByte = []byte + var InactiveProposalQueuePrefix = []byte + var ModuleCdc = codec.New() + var ParamStoreKeyTallyParams = []byte("tallyparams") + var PlanPrefix = []byte + var ProposalIDKey = []byte + var ProposalsKeyPrefix = []byte + var VotesKeyPrefix = []byte + func ActiveProposalByTimeKey(endBlock uint64) []byte + func ActiveProposalQueueKey(proposalID uint64, endBlock uint64) []byte + func CheckProposalAddress(address sdk.AccAddress) bool + func ErrAlreadyActiveProposal() *sdkerrors.Error + func ErrDurationTooLong() *sdkerrors.Error + func ErrInactiveProposal(proposalID string) *sdkerrors.Error + func ErrInvalidGenesis() *sdkerrors.Error + func ErrInvalidProposalContent() *sdkerrors.Error + func ErrInvalidProposalContentDescrBlank() *sdkerrors.Error + func ErrInvalidProposalContentDescrLong(MaxDescriptionLength string) *sdkerrors.Error + func ErrInvalidProposalContentTitleBlank() *sdkerrors.Error + func ErrInvalidProposalContentTitleLong(MaxTitleLength string) *sdkerrors.Error + func ErrInvalidProposalType(ProposalType string) *sdkerrors.Error + func ErrInvalidStartEndBlocks(StartBlock string, EndBlock string) *sdkerrors.Error + func ErrInvalidVote(option string) *sdkerrors.Error + func ErrNoProposalHandlerExists() *sdkerrors.Error + func ErrNotAllowed() *sdkerrors.Error + func ErrStartBlock() *sdkerrors.Error + func ErrSubmitProposal(error string) *sdkerrors.Error + func ErrUnknownProposal(proposalID string) *sdkerrors.Error + func GetBytesFromUint64(i uint64) []byte + func GetProposalIDBytes(proposalID uint64) (proposalIDBz []byte) + func GetProposalIDFromBytes(bz []byte) (proposalID uint64) + func GetUint64FromBytes(b []byte) uint64 + func InactiveProposalByTimeKey(endBlock uint64) []byte + func InactiveProposalQueueKey(proposalID uint64, endBlock uint64) []byte + func ParamKeyTable() params.KeyTable + func PlanKey() []byte + func ProposalKey(proposalID uint64) []byte + func RegisterCodec(cdc *codec.Codec) + func RegisterProposalTypeCodec(o interface{}, name string) + func SplitActiveProposalQueueKey(key []byte) (proposalID uint64, endBlock uint64) + func SplitInactiveProposalQueueKey(key []byte) (proposalID uint64, endBlock uint64) + func SplitKeyDeposit(key []byte) (proposalID uint64, depositorAddr sdk.AccAddress) + func SplitKeyVote(key []byte) (proposalID uint64, voterAddr sdk.AccAddress) + func SplitProposalKey(key []byte) (proposalID uint64) + func UpgradedClientKey(height int64) []byte + func UpgradedConsStateKey(height int64) []byte + func ValidProposalStatus(status ProposalStatus) bool + func ValidVoteOption(option VoteOption) bool + func Validate(c Content) error + func ValidateGenesis(data GenesisState) error + func VoteKey(proposalID uint64, voterAddr sdk.ValAddress) []byte + func VotesKey(proposalID uint64) []byte + type AccountKeeper interface + GetAccount func(ctx sdk.Context, addr sdk.AccAddress) authexported.Account + type CodeType = uint32 + type Content struct + Description string + Title string + func (c *Content) GetDescription() string + func (c *Content) GetTitle() string + type GenesisState struct + Proposals Proposals + StartingProposalID uint64 + TallyParams TallyParams + Votes Votes + func DefaultGenesisState() GenesisState + func NewGenesisState(startingProposalID uint64, tp TallyParams) GenesisState + func (data GenesisState) Equal(data2 GenesisState) bool + func (data GenesisState) IsEmpty() bool + type Handler func(ctx sdk.Context, content Content) error + type MsgSoftwareUpgradeProposal struct + Description string + Plan Plan + Proposer sdk.AccAddress + Title string + func NewSoftwareUpgradeProposal(title, description string, plan Plan, proposer sdk.AccAddress) MsgSoftwareUpgradeProposal + func (msg MsgSoftwareUpgradeProposal) GetSignBytes() []byte + func (msg MsgSoftwareUpgradeProposal) GetSigners() []sdk.AccAddress + func (msg MsgSoftwareUpgradeProposal) Route() string + func (msg MsgSoftwareUpgradeProposal) String() string + func (msg MsgSoftwareUpgradeProposal) Type() string + func (msg MsgSoftwareUpgradeProposal) ValidateBasic() error + type MsgSubmitProposal struct + Content Content + Proposer sdk.AccAddress + VotingEndBlock uint64 + VotingStartBlock uint64 + func NewMsgSubmitProposal(content Content, proposer sdk.AccAddress, ...) MsgSubmitProposal + func (msg MsgSubmitProposal) GetSignBytes() []byte + func (msg MsgSubmitProposal) GetSigners() []sdk.AccAddress + func (msg MsgSubmitProposal) Route() string + func (msg MsgSubmitProposal) String() string + func (msg MsgSubmitProposal) Type() string + func (msg MsgSubmitProposal) ValidateBasic() error + type MsgVote struct + Option VoteOption + ProposalID uint64 + Voter sdk.ValAddress + func NewMsgVote(voter sdk.ValAddress, proposalID uint64, option VoteOption) MsgVote + func (msg MsgVote) GetSignBytes() []byte + func (msg MsgVote) GetSigners() []sdk.AccAddress + func (msg MsgVote) Route() string + func (msg MsgVote) String() string + func (msg MsgVote) Type() string + func (msg MsgVote) ValidateBasic() error + type ParamSubspace interface + Get func(ctx sdk.Context, key []byte, ptr interface{}) + Set func(ctx sdk.Context, key []byte, param interface{}) + type Params struct + TallyParams TallyParams + func DefaultParams() Params + func NewParams(tp TallyParams) Params + func (gp Params) String() string + type Plan struct + Height int64 + Info string + Name string + Time time.Time + ToDownload int64 + func (p Plan) DueAt() string + func (p Plan) Mapping() map[string][]string + func (p Plan) ShouldExecute(ctx sdk.Context) bool + func (p Plan) String() string + func (p Plan) ValidateBasic() error + type Proposal struct + FinalTallyResult TallyResult + ProposalID uint64 + Status ProposalStatus + VotingEndBlock uint64 + VotingStartBlock uint64 + func NewProposal(content Content, id, votingStartBlock, VotingEndBlock uint64) Proposal + func (p Proposal) String() string + type ProposalQueue []uint64 + type ProposalStatus byte + const StatusFailed + const StatusNil + const StatusPassed + const StatusRejected + const StatusVotingPeriod + const StatusWaiting + func ProposalStatusFromString(str string) (ProposalStatus, error) + func (status *ProposalStatus) Unmarshal(data []byte) error + func (status *ProposalStatus) UnmarshalJSON(data []byte) error + func (status ProposalStatus) Format(s fmt.State, verb rune) + func (status ProposalStatus) Marshal() ([]byte, error) + func (status ProposalStatus) MarshalJSON() ([]byte, error) + func (status ProposalStatus) String() string + type Proposals []Proposal + func (p Proposals) String() string + type QueryDepositParams struct + Depositor sdk.AccAddress + ProposalID uint64 + func NewQueryDepositParams(proposalID uint64, depositor sdk.AccAddress) QueryDepositParams + type QueryProposalParams struct + ProposalID uint64 + func NewQueryProposalParams(proposalID uint64) QueryProposalParams + type QueryProposalVotesParams struct + Limit int + Page int + ProposalID uint64 + func NewQueryProposalVotesParams(proposalID uint64, page, limit int) QueryProposalVotesParams + type QueryProposalsParams struct + Depositor sdk.AccAddress + Limit int + Page int + ProposalStatus ProposalStatus + Voter sdk.AccAddress + func NewQueryProposalsParams(page, limit int, status ProposalStatus, voter, depositor sdk.AccAddress) QueryProposalsParams + type QueryVoteParams struct + ProposalID uint64 + Voter sdk.AccAddress + func NewQueryVoteParams(proposalID uint64, voter sdk.AccAddress) QueryVoteParams + type Router interface + AddRoute func(r string, h Handler) (rtr Router) + GetRoute func(path string) (h Handler) + HasRoute func(r string) bool + Seal func() + func NewRouter() Router + type SupplyKeeper interface + BurnCoins func(ctx sdk.Context, name string, amt sdk.Coins) error + GetModuleAccount func(ctx sdk.Context, name string) supplyexported.ModuleAccountI + GetModuleAddress func(name string) sdk.AccAddress + SendCoinsFromAccountToModule func(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, ...) error + SendCoinsFromModuleToAccount func(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, ...) error + SetModuleAccount func(sdk.Context, supplyexported.ModuleAccountI) + type TallyParams struct + Quorum sdk.Dec + Threshold sdk.Dec + func DefaultTallyParams() TallyParams + func NewTallyParams(quorum, threshold sdk.Dec) TallyParams + func (tp TallyParams) String() string + type TallyResult struct + Abstain sdk.Int + No sdk.Int + Yes sdk.Int + func EmptyTallyResult() TallyResult + func NewTallyResult(yes, abstain, no sdk.Int) TallyResult + func NewTallyResultFromMap(results map[VoteOption]sdk.Dec) TallyResult + func (tr TallyResult) Equals(comp TallyResult) bool + func (tr TallyResult) String() string + type UpgradeConfig struct + Binaries map[string]string + type ValidatorGovInfo struct + Address sdk.ValAddress + BondedTokens sdk.Int + Vote VoteOption + func NewValidatorGovInfo(address sdk.ValAddress, bondedTokens sdk.Int, vote VoteOption) ValidatorGovInfo + type ValidatorKeeper interface + HasValidator func(sdk.Context, sdk.ValAddress) bool + IterateBondedValidatorsByPower func(sdk.Context, func(index int64, validator valexported.ValidatorI) (stop bool)) + IterateDelegations func(ctx sdk.Context, delegator sdk.AccAddress, ...) + TotalBondedTokens func(sdk.Context) sdk.Int + type Vote struct + Option VoteOption + ProposalID uint64 + Voter sdk.ValAddress + func NewVote(proposalID uint64, voter sdk.ValAddress, option VoteOption) Vote + func (v Vote) Empty() bool + func (v Vote) Equals(comp Vote) bool + func (v Vote) String() string + type VoteOption byte + const OptionAbstain + const OptionEmpty + const OptionNo + const OptionYes + func VoteOptionFromString(str string) (VoteOption, error) + func (vo *VoteOption) Unmarshal(data []byte) error + func (vo *VoteOption) UnmarshalJSON(data []byte) error + func (vo VoteOption) Format(s fmt.State, verb rune) + func (vo VoteOption) Marshal() ([]byte, error) + func (vo VoteOption) MarshalJSON() ([]byte, error) + func (vo VoteOption) String() string + type Votes []Vote + func (v Votes) String() string