Versions in this module Expand all Collapse all v0 v0.1.3 Nov 25, 2021 Changes in this version type Deposit + func (d Deposit) Equals(comp Deposit) bool + 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 Vote + func (v Vote) Equals(comp Vote) bool v0.1.1 Nov 25, 2021 Changes in this version + const AttributeKeyOption + const AttributeKeyProposalID + const AttributeKeyProposalResult + const AttributeKeyProposalType + const AttributeKeyVotingPeriodStart + const AttributeValueCategory + const AttributeValueProposalDropped + const AttributeValueProposalFailed + const AttributeValueProposalPassed + const AttributeValueProposalRejected + const DefaultParamspace + const DefaultPeriod + const DefaultStartingProposalID + const EventTypeActiveProposal + const EventTypeInactiveProposal + const EventTypeProposalDeposit + const EventTypeProposalVote + const EventTypeSubmitProposal + const MaxDescriptionLength + const MaxTitleLength + const ModuleName + const ParamDeposit + const ParamTallying + const ParamVoting + const ProposalTypeText + const QuerierRoute + const QueryDeposit + const QueryDeposits + const QueryParams + const QueryProposal + const QueryProposals + const QueryTally + const QueryVote + const QueryVotes + const RouterKey + const StoreKey + const TypeMsgDeposit + const TypeMsgSubmitProposal + const TypeMsgVote + var ActiveProposalQueuePrefix = []byte + var DefaultMinDepositTokens = sdk.TokensFromConsensusPower(10) + var DefaultQuorum = sdk.NewDecWithPrec(334, 3) + var DefaultThreshold = sdk.NewDecWithPrec(5, 1) + var DefaultVeto = sdk.NewDecWithPrec(334, 3) + var DepositsKeyPrefix = []byte + var ErrAlreadyActiveProposal = sdkerrors.Register(ModuleName, 4, "proposal already active") + var ErrInactiveProposal = sdkerrors.Register(ModuleName, 3, "inactive proposal") + var ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + var ErrInvalidGenesis = sdkerrors.Register(ModuleName, 8, "invalid genesis state") + var ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidProposalContent = sdkerrors.Register(ModuleName, 5, "invalid proposal content") + var ErrInvalidProposalType = sdkerrors.Register(ModuleName, 6, "invalid proposal type") + var ErrInvalidVote = sdkerrors.Register(ModuleName, 7, "invalid vote option") + var ErrNoProposalHandlerExists = sdkerrors.Register(ModuleName, 9, "no handler exists for proposal type") + var ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") + var ErrUnknownProposal = sdkerrors.Register(ModuleName, 2, "unknown proposal") + var InactiveProposalQueuePrefix = []byte + var ModuleCdc = codec.NewHybridCodec(amino, types.NewInterfaceRegistry()) + var ParamStoreKeyDepositParams = []byte("depositparams") + var ParamStoreKeyTallyParams = []byte("tallyparams") + var ParamStoreKeyVotingParams = []byte("votingparams") + var ProposalIDKey = []byte + var ProposalStatus_name = map[int32]string + var ProposalStatus_value = map[string]int32 + var ProposalsKeyPrefix = []byte + var VoteOption_name = map[int32]string + var VoteOption_value = map[string]int32 + var VotesKeyPrefix = []byte + func ActiveProposalByTimeKey(endTime time.Time) []byte + func ActiveProposalQueueKey(proposalID uint64, endTime time.Time) []byte + func DepositKey(proposalID uint64, depositorAddr sdk.AccAddress) []byte + func DepositsKey(proposalID uint64) []byte + func GetProposalIDBytes(proposalID uint64) (proposalIDBz []byte) + func GetProposalIDFromBytes(bz []byte) (proposalID uint64) + func InactiveProposalByTimeKey(endTime time.Time) []byte + func InactiveProposalQueueKey(proposalID uint64, endTime time.Time) []byte + func IsValidProposalType(ty string) bool + func ParamKeyTable() paramtypes.KeyTable + func ProposalHandler(_ sdk.Context, c Content) error + func ProposalKey(proposalID uint64) []byte + func RegisterCodec(cdc *codec.Codec) + func RegisterInterfaces(registry types.InterfaceRegistry) + func RegisterProposalType(ty string) + func RegisterProposalTypeCodec(o interface{}, name string) + func SplitActiveProposalQueueKey(key []byte) (proposalID uint64, endTime time.Time) + func SplitInactiveProposalQueueKey(key []byte) (proposalID uint64, endTime time.Time) + 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 ValidProposalStatus(status ProposalStatus) bool + func ValidVoteOption(option VoteOption) bool + func ValidateAbstract(c Content) error + func ValidateGenesis(data GenesisState) error + func VoteKey(proposalID uint64, voterAddr sdk.AccAddress) []byte + func VotesKey(proposalID uint64) []byte + type AccountKeeper interface + GetAccount func(ctx sdk.Context, addr sdk.AccAddress) types.AccountI + GetModuleAccount func(ctx sdk.Context, name string) types.ModuleAccountI + GetModuleAddress func(name string) sdk.AccAddress + SetModuleAccount func(sdk.Context, types.ModuleAccountI) + type BankKeeper interface + BurnCoins func(ctx sdk.Context, name string, amt sdk.Coins) error + GetAllBalances func(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + GetBalance func(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin + LockedCoins func(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + SendCoinsFromAccountToModule func(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, ...) error + SendCoinsFromModuleToAccount func(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, ...) error + SetBalances func(ctx sdk.Context, addr sdk.AccAddress, balances sdk.Coins) error + SpendableCoins func(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + type Content interface + GetDescription func() string + GetTitle func() string + ProposalRoute func() string + ProposalType func() string + String func() string + ValidateBasic func() error + func ContentFromProposalType(title, desc, ty string) Content + func NewTextProposal(title, description string) Content + type Deposit struct + Amount github_com_cosmos_cosmos_sdk_types.Coins + Depositor github_com_cosmos_cosmos_sdk_types.AccAddress + ProposalID uint64 + func NewDeposit(proposalID uint64, depositor sdk.AccAddress, amount sdk.Coins) Deposit + func (*Deposit) Descriptor() ([]byte, []int) + func (*Deposit) ProtoMessage() + func (d Deposit) Empty() bool + func (d Deposit) String() string + func (m *Deposit) Marshal() (dAtA []byte, err error) + func (m *Deposit) MarshalTo(dAtA []byte) (int, error) + func (m *Deposit) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Deposit) Reset() + func (m *Deposit) Size() (n int) + func (m *Deposit) Unmarshal(dAtA []byte) error + func (m *Deposit) XXX_DiscardUnknown() + func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Deposit) XXX_Merge(src proto.Message) + func (m *Deposit) XXX_Size() int + func (m *Deposit) XXX_Unmarshal(b []byte) error + func (this *Deposit) Equal(that interface{}) bool + type DepositParams struct + MaxDepositPeriod time.Duration + MinDeposit sdk.Coins + func DefaultDepositParams() DepositParams + func NewDepositParams(minDeposit sdk.Coins, maxDepositPeriod time.Duration) DepositParams + func (dp DepositParams) Equal(dp2 DepositParams) bool + func (dp DepositParams) String() string + type Deposits []Deposit + func (d Deposits) Equal(other Deposits) bool + func (d Deposits) String() string + type GenesisState struct + DepositParams DepositParams + Deposits Deposits + Proposals Proposals + StartingProposalID uint64 + TallyParams TallyParams + Votes Votes + VotingParams VotingParams + func DefaultGenesisState() GenesisState + func NewGenesisState(startingProposalID uint64, dp DepositParams, vp VotingParams, tp TallyParams) GenesisState + func (data GenesisState) Equal(other GenesisState) bool + func (data GenesisState) IsEmpty() bool + func (data GenesisState) UnpackInterfaces(unpacker types.AnyUnpacker) error + type Handler func(ctx sdk.Context, content Content) error + type MsgDeposit struct + Amount github_com_cosmos_cosmos_sdk_types.Coins + Depositor github_com_cosmos_cosmos_sdk_types.AccAddress + ProposalID uint64 + func NewMsgDeposit(depositor sdk.AccAddress, proposalID uint64, amount sdk.Coins) MsgDeposit + func (*MsgDeposit) Descriptor() ([]byte, []int) + func (*MsgDeposit) ProtoMessage() + func (m *MsgDeposit) Marshal() (dAtA []byte, err error) + func (m *MsgDeposit) MarshalTo(dAtA []byte) (int, error) + func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *MsgDeposit) Reset() + func (m *MsgDeposit) Size() (n int) + func (m *MsgDeposit) Unmarshal(dAtA []byte) error + func (m *MsgDeposit) XXX_DiscardUnknown() + func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *MsgDeposit) XXX_Merge(src proto.Message) + func (m *MsgDeposit) XXX_Size() int + func (m *MsgDeposit) XXX_Unmarshal(b []byte) error + func (msg MsgDeposit) GetSignBytes() []byte + func (msg MsgDeposit) GetSigners() []sdk.AccAddress + func (msg MsgDeposit) Route() string + func (msg MsgDeposit) String() string + func (msg MsgDeposit) Type() string + func (msg MsgDeposit) ValidateBasic() error + func (this *MsgDeposit) Equal(that interface{}) bool + type MsgSubmitProposal struct + Content *types.Any + InitialDeposit github_com_cosmos_cosmos_sdk_types.Coins + Proposer github_com_cosmos_cosmos_sdk_types.AccAddress + func NewMsgSubmitProposal(content Content, initialDeposit sdk.Coins, proposer sdk.AccAddress) (*MsgSubmitProposal, error) + func (*MsgSubmitProposal) Descriptor() ([]byte, []int) + func (*MsgSubmitProposal) ProtoMessage() + func (m *MsgSubmitProposal) GetContent() Content + func (m *MsgSubmitProposal) GetInitialDeposit() sdk.Coins + func (m *MsgSubmitProposal) GetProposer() sdk.AccAddress + func (m *MsgSubmitProposal) Marshal() (dAtA []byte, err error) + func (m *MsgSubmitProposal) MarshalTo(dAtA []byte) (int, error) + func (m *MsgSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *MsgSubmitProposal) Reset() + func (m *MsgSubmitProposal) SetContent(content Content) error + func (m *MsgSubmitProposal) SetInitialDeposit(coins sdk.Coins) + func (m *MsgSubmitProposal) SetProposer(address sdk.AccAddress) + func (m *MsgSubmitProposal) Size() (n int) + func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error + func (m *MsgSubmitProposal) XXX_DiscardUnknown() + func (m *MsgSubmitProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *MsgSubmitProposal) XXX_Merge(src proto.Message) + func (m *MsgSubmitProposal) XXX_Size() int + func (m *MsgSubmitProposal) XXX_Unmarshal(b []byte) error + func (m MsgSubmitProposal) GetSignBytes() []byte + func (m MsgSubmitProposal) GetSigners() []sdk.AccAddress + func (m MsgSubmitProposal) Route() string + func (m MsgSubmitProposal) String() string + func (m MsgSubmitProposal) Type() string + func (m MsgSubmitProposal) UnpackInterfaces(unpacker types.AnyUnpacker) error + func (m MsgSubmitProposal) ValidateBasic() error + func (this *MsgSubmitProposal) Equal(that interface{}) bool + type MsgSubmitProposalI interface + GetContent func() Content + GetInitialDeposit func() sdk.Coins + GetProposer func() sdk.AccAddress + SetContent func(Content) error + SetInitialDeposit func(sdk.Coins) + SetProposer func(sdk.AccAddress) + type MsgVote struct + Option VoteOption + ProposalID uint64 + Voter github_com_cosmos_cosmos_sdk_types.AccAddress + func NewMsgVote(voter sdk.AccAddress, proposalID uint64, option VoteOption) MsgVote + func (*MsgVote) Descriptor() ([]byte, []int) + func (*MsgVote) ProtoMessage() + func (m *MsgVote) Marshal() (dAtA []byte, err error) + func (m *MsgVote) MarshalTo(dAtA []byte) (int, error) + func (m *MsgVote) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *MsgVote) Reset() + func (m *MsgVote) Size() (n int) + func (m *MsgVote) Unmarshal(dAtA []byte) error + func (m *MsgVote) XXX_DiscardUnknown() + func (m *MsgVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *MsgVote) XXX_Merge(src proto.Message) + func (m *MsgVote) XXX_Size() int + func (m *MsgVote) XXX_Unmarshal(b []byte) error + 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 + func (this *MsgVote) Equal(that interface{}) bool + type ParamSubspace interface + Get func(ctx sdk.Context, key []byte, ptr interface{}) + Set func(ctx sdk.Context, key []byte, param interface{}) + type Params struct + DepositParams DepositParams + TallyParams TallyParams + VotingParams VotingParams + func DefaultParams() Params + func NewParams(vp VotingParams, tp TallyParams, dp DepositParams) Params + func (gp Params) String() string + type Proposal struct + Content *types.Any + DepositEndTime time.Time + FinalTallyResult TallyResult + ProposalID uint64 + Status ProposalStatus + SubmitTime time.Time + TotalDeposit github_com_cosmos_cosmos_sdk_types.Coins + VotingEndTime time.Time + VotingStartTime time.Time + func NewProposal(content Content, id uint64, submitTime, depositEndTime time.Time) (Proposal, error) + func (*Proposal) Descriptor() ([]byte, []int) + func (*Proposal) ProtoMessage() + func (m *Proposal) Marshal() (dAtA []byte, err error) + func (m *Proposal) MarshalTo(dAtA []byte) (int, error) + func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Proposal) Reset() + func (m *Proposal) Size() (n int) + func (m *Proposal) Unmarshal(dAtA []byte) error + func (m *Proposal) XXX_DiscardUnknown() + func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Proposal) XXX_Merge(src proto.Message) + func (m *Proposal) XXX_Size() int + func (m *Proposal) XXX_Unmarshal(b []byte) error + func (p Proposal) GetContent() Content + func (p Proposal) GetTitle() string + func (p Proposal) ProposalRoute() string + func (p Proposal) ProposalType() string + func (p Proposal) String() string + func (p Proposal) UnpackInterfaces(unpacker types.AnyUnpacker) error + func (this *Proposal) Equal(that interface{}) bool + type ProposalQueue []uint64 + type ProposalStatus int32 + const StatusDepositPeriod + const StatusFailed + const StatusNil + const StatusPassed + const StatusRejected + const StatusVotingPeriod + func ProposalStatusFromString(str string) (ProposalStatus, error) + func (ProposalStatus) EnumDescriptor() ([]byte, []int) + 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) Equal(other Proposals) bool + func (p Proposals) String() string + func (p Proposals) UnpackInterfaces(unpacker types.AnyUnpacker) error + 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 StakingKeeper interface + IterateBondedValidatorsByPower func(sdk.Context, ...) + IterateDelegations func(ctx sdk.Context, delegator sdk.AccAddress, ...) + TotalBondedTokens func(sdk.Context) sdk.Int + type TallyParams struct + Quorum sdk.Dec + Threshold sdk.Dec + Veto sdk.Dec + func DefaultTallyParams() TallyParams + func NewTallyParams(quorum, threshold, veto sdk.Dec) TallyParams + func (tp TallyParams) Equal(other TallyParams) bool + func (tp TallyParams) String() string + type TallyResult struct + Abstain github_com_cosmos_cosmos_sdk_types.Int + No github_com_cosmos_cosmos_sdk_types.Int + NoWithVeto github_com_cosmos_cosmos_sdk_types.Int + Yes github_com_cosmos_cosmos_sdk_types.Int + func EmptyTallyResult() TallyResult + func NewTallyResult(yes, abstain, no, noWithVeto sdk.Int) TallyResult + func NewTallyResultFromMap(results map[VoteOption]sdk.Dec) TallyResult + func (*TallyResult) Descriptor() ([]byte, []int) + func (*TallyResult) ProtoMessage() + func (m *TallyResult) Marshal() (dAtA []byte, err error) + func (m *TallyResult) MarshalTo(dAtA []byte) (int, error) + func (m *TallyResult) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *TallyResult) Reset() + func (m *TallyResult) Size() (n int) + func (m *TallyResult) Unmarshal(dAtA []byte) error + func (m *TallyResult) XXX_DiscardUnknown() + func (m *TallyResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *TallyResult) XXX_Merge(src proto.Message) + func (m *TallyResult) XXX_Size() int + func (m *TallyResult) XXX_Unmarshal(b []byte) error + func (this *TallyResult) Equal(that interface{}) bool + func (tr TallyResult) Equals(comp TallyResult) bool + func (tr TallyResult) String() string + type TextProposal struct + Description string + Title string + func (*TextProposal) Descriptor() ([]byte, []int) + func (*TextProposal) ProtoMessage() + func (m *TextProposal) Marshal() (dAtA []byte, err error) + func (m *TextProposal) MarshalTo(dAtA []byte) (int, error) + func (m *TextProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *TextProposal) Reset() + func (m *TextProposal) Size() (n int) + func (m *TextProposal) Unmarshal(dAtA []byte) error + func (m *TextProposal) XXX_DiscardUnknown() + func (m *TextProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *TextProposal) XXX_Merge(src proto.Message) + func (m *TextProposal) XXX_Size() int + func (m *TextProposal) XXX_Unmarshal(b []byte) error + func (this *TextProposal) Equal(that interface{}) bool + func (tp *TextProposal) GetDescription() string + func (tp *TextProposal) GetTitle() string + func (tp *TextProposal) ProposalRoute() string + func (tp *TextProposal) ProposalType() string + func (tp *TextProposal) ValidateBasic() error + func (tp TextProposal) String() string + type ValidatorGovInfo struct + Address sdk.ValAddress + BondedTokens sdk.Int + DelegatorDeductions sdk.Dec + DelegatorShares sdk.Dec + Vote VoteOption + func NewValidatorGovInfo(address sdk.ValAddress, bondedTokens sdk.Int, ...) ValidatorGovInfo + type Vote struct + Option VoteOption + ProposalID uint64 + Voter github_com_cosmos_cosmos_sdk_types.AccAddress + func NewVote(proposalID uint64, voter sdk.AccAddress, option VoteOption) Vote + func (*Vote) Descriptor() ([]byte, []int) + func (*Vote) ProtoMessage() + func (m *Vote) Marshal() (dAtA []byte, err error) + func (m *Vote) MarshalTo(dAtA []byte) (int, error) + func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Vote) Reset() + func (m *Vote) Size() (n int) + func (m *Vote) Unmarshal(dAtA []byte) error + func (m *Vote) XXX_DiscardUnknown() + func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Vote) XXX_Merge(src proto.Message) + func (m *Vote) XXX_Size() int + func (m *Vote) XXX_Unmarshal(b []byte) error + func (this *Vote) Equal(that interface{}) bool + func (v Vote) Empty() bool + func (v Vote) String() string + type VoteOption int32 + const OptionAbstain + const OptionEmpty + const OptionNo + const OptionNoWithVeto + const OptionYes + func VoteOptionFromString(str string) (VoteOption, error) + func (VoteOption) EnumDescriptor() ([]byte, []int) + 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) Equal(other Votes) bool + func (v Votes) String() string + type VotingParams struct + VotingPeriod time.Duration + func DefaultVotingParams() VotingParams + func NewVotingParams(votingPeriod time.Duration) VotingParams + func (vp VotingParams) Equal(other VotingParams) bool + func (vp VotingParams) String() string