Versions in this module Expand all Collapse all v0 v0.0.5 Mar 13, 2019 Changes in this version + const QuerierRoute + const QueryActiveList + const QueryCandidateList + const QueryParams + const QueryProgram + const QueryVotes + const RouterKey + const StoreKey + var DefaultParamspace = "budget" + var KeyDelimiter = []byte(":") + var KeyNextProgramID = []byte("new-program-id") + var ParamStoreKeyParams = []byte("params") + var PrefixCandidateQueue = []byte("candidate-queue") + var PrefixProgram = []byte("program") + var PrefixVote = []byte("vote") + func EndBlocker(ctx sdk.Context, k Keeper) (claims map[string]sdk.Int, resTags sdk.Tags) + func ErrDepositDenom() sdk.Error + func ErrEmptyProgramQueue() sdk.Error + func ErrInvalidDescription() sdk.Error + func ErrInvalidOption(msg string) sdk.Error + func ErrInvalidProgramID(msg string) sdk.Error + func ErrInvalidSubmitter(submitter sdk.AccAddress) sdk.Error + func ErrInvalidTitle() sdk.Error + func ErrInvalidVotingWindow(msg string) sdk.Error + func ErrMinimumDeposit() sdk.Error + func ErrProgramNotFound(ProgramID uint64) sdk.Error + func ErrProgramQueueNotFound() sdk.Error + func ErrVoteNotFound() sdk.Error + func ErrVotingPeriodClosed() sdk.Error + func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState) + func KeyCandidate(endTime time.Time, programID uint64) []byte + func KeyProgram(programID uint64) []byte + func KeyVote(programID uint64, voterAddr sdk.AccAddress) []byte + func NewHandler(k Keeper) sdk.Handler + func NewQuerier(keeper Keeper) sdk.Querier + func ParamKeyTable() params.KeyTable + func PrefixCandidateQueueTime(endTime time.Time) []byte + func PrefixVoteForProgram(programID uint64) []byte + func RegisterCodec(cdc *codec.Codec) + func ValidateGenesis(data GenesisState) error + type CodeType = sdk.CodeType + const CodeEmptyProgramQueue + const CodeInvalidDeposit + const CodeInvalidDescription + const CodeInvalidOption + const CodeInvalidProgramID + const CodeInvalidSubmitter + const CodeInvalidTitle + const CodeInvalidVotingWindow + const CodeProgramNotFound + const CodeProgramQueueNotFound + const CodeVoteNotFound + const CodeVotingPeriodClosed + const DefaultCodespace + type GenesisState struct + Params Params + func DefaultGenesisState() GenesisState + func ExportGenesis(ctx sdk.Context, keeper Keeper) GenesisState + func NewGenesisState(params Params) GenesisState + type Keeper struct + func NewKeeper(key sdk.StoreKey, cdc *codec.Codec, bk bank.Keeper, ...) Keeper + func (k Keeper) CandidateQueueHas(ctx sdk.Context, program Program, programID uint64) (res bool) + func (k Keeper) CandidateQueueInsert(ctx sdk.Context, program Program, programID uint64) + func (k Keeper) CandidateQueueRemove(ctx sdk.Context, program Program, programID uint64) + func (k Keeper) ClearVotesForProgram(ctx sdk.Context, programID uint64) + func (k Keeper) DeleteProgram(ctx sdk.Context, programID uint64) + func (k Keeper) GetParams(ctx sdk.Context) Params + func (k Keeper) GetProgram(ctx sdk.Context, programID uint64) (res Program, err sdk.Error) + func (k Keeper) GetVote(ctx sdk.Context, programID uint64, voter sdk.AccAddress) (res bool, err sdk.Error) + func (k Keeper) IterateActivePrograms(ctx sdk.Context, handler func(uint64, Program) (stop bool)) + func (k Keeper) IterateMatureCandidates(ctx sdk.Context, endTime time.Time, handler func(uint64, Program) (stop bool)) + func (k Keeper) NewProgramID(ctx sdk.Context) (programID uint64) + func (k Keeper) RefundDeposit(ctx sdk.Context, programID uint64) (err sdk.Error) + func (k Keeper) SetParams(ctx sdk.Context, params Params) + func (k Keeper) SetProgram(ctx sdk.Context, programID uint64, program Program) + func (k Keeper) SetVote(ctx sdk.Context, programID uint64, voter sdk.AccAddress, option bool) + type Params struct + ActiveThreshold sdk.Dec + LegacyThreshold sdk.Dec + MinDeposit sdk.Coin + VotePeriod time.Duration + func DefaultParams() Params + func NewParams(activeThreshold sdk.Dec, legacyThreshold sdk.Dec, votePeriod time.Duration, ...) Params + func (params Params) String() string + type Program struct + Deposit sdk.Coin + Description string + Executor sdk.AccAddress + SubmitTime time.Time + Submitter sdk.AccAddress + Tally sdk.Int + Title string + func NewProgram(title string, description string, submitter sdk.AccAddress, ...) Program + func (p Program) String() string + type QueryVotesParams struct + ProgramID uint64 + Voter sdk.AccAddress + func NewQueryVotesParams(voter sdk.AccAddress, programID uint64) QueryVotesParams + type SubmitProgramMsg struct + Deposit sdk.Coin + Description string + Executor sdk.AccAddress + Submitter sdk.AccAddress + Title string + func NewSubmitProgramMsg(title string, description string, deposit sdk.Coin, submitter sdk.AccAddress, ...) SubmitProgramMsg + func (msg SubmitProgramMsg) GetSignBytes() []byte + func (msg SubmitProgramMsg) GetSigners() []sdk.AccAddress + func (msg SubmitProgramMsg) Route() string + func (msg SubmitProgramMsg) String() string + func (msg SubmitProgramMsg) Type() string + func (msg SubmitProgramMsg) ValidateBasic() sdk.Error + type VoteMsg struct + Option bool + ProgramID uint64 + Voter sdk.AccAddress + func NewVoteMsg(programID uint64, option bool, voter sdk.AccAddress) VoteMsg + func (msg VoteMsg) GetSignBytes() []byte + func (msg VoteMsg) GetSigners() []sdk.AccAddress + func (msg VoteMsg) Route() string + func (msg VoteMsg) String() string + func (msg VoteMsg) Type() string + func (msg VoteMsg) ValidateBasic() sdk.Error + type WithdrawProgramMsg struct + ProgramID uint64 + Submitter sdk.AccAddress + func NewWithdrawProgramMsg(programID uint64, submitter sdk.AccAddress) WithdrawProgramMsg + func (msg WithdrawProgramMsg) GetSignBytes() []byte + func (msg WithdrawProgramMsg) GetSigners() []sdk.AccAddress + func (msg WithdrawProgramMsg) Route() string + func (msg WithdrawProgramMsg) String() string + func (msg WithdrawProgramMsg) Type() string + func (msg WithdrawProgramMsg) ValidateBasic() sdk.Error