Documentation ¶
Index ¶
- Constants
- func NewQuerier(keeper Keeper) sdk.Querier
- type Keeper
- func (k Keeper) ActiveProposalQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator
- func (k Keeper) AddGovernor(ctx sdk.Context, address sdk.AccAddress)
- func (k Keeper) AddVote(ctx sdk.Context, proposalID uint64, voter sdk.AccAddress, ...) error
- func (k Keeper) CanBeExpedited(ctx sdk.Context, proposal types.Proposal) bool
- func (k Keeper) DeleteProposal(ctx sdk.Context, proposalID uint64)
- func (k Keeper) ExecuteProposal(ctx sdk.Context, proposal types.Proposal) (status types.ProposalStatus)
- func (k Keeper) ExpeditedProposalQueueIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetAllVotes(ctx sdk.Context) (votes types.Votes)
- func (k Keeper) GetGovernorCount(ctx sdk.Context) sdk.Int
- func (k Keeper) GetGovernorIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetGovernors(ctx sdk.Context) []sdk.AccAddress
- func (k Keeper) GetProposal(ctx sdk.Context, proposalID uint64) (types.Proposal, error)
- func (k Keeper) GetProposalID(ctx sdk.Context) (proposalID uint64, err error)
- func (k Keeper) GetProposals(ctx sdk.Context) (proposals types.Proposals)
- func (k Keeper) GetTallyParams(ctx sdk.Context) types.TallyParams
- func (k Keeper) GetVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress) (types.Vote, error)
- func (k Keeper) GetVotes(ctx sdk.Context, proposalID uint64) (votes types.Votes)
- func (k Keeper) GetVotingParams(ctx sdk.Context) types.VotingParams
- func (k Keeper) HandleAddGovernor(ctx sdk.Context, address sdk.AccAddress) error
- func (k Keeper) HandleExpedite(ctx sdk.Context, proposalId uint64) error
- func (k Keeper) HandleProposal(ctx sdk.Context, proposal types.Proposal, expedited bool)
- func (k Keeper) HandleRemoveGovernor(ctx sdk.Context, address sdk.AccAddress) error
- func (k Keeper) HasVoted(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress) bool
- func (k Keeper) InsertActiveProposalQueue(ctx sdk.Context, proposalID uint64, endTime time.Time)
- func (k Keeper) InsertExpeditedProposalQueue(ctx sdk.Context, proposalID uint64)
- func (k Keeper) IsGovernor(ctx sdk.Context, address sdk.AccAddress) bool
- func (k Keeper) IterateActiveProposalsQueue(ctx sdk.Context, endTime time.Time, ...)
- func (k Keeper) IterateAllVotes(ctx sdk.Context, cb func(vote types.Vote) (stop bool))
- func (k Keeper) IterateExpeditedProposalsQueue(ctx sdk.Context, cb func(proposal types.Proposal) (stop bool))
- func (k Keeper) IterateGovernors(ctx sdk.Context, cb func(address sdk.AccAddress) (stop bool))
- func (k Keeper) IterateProposals(ctx sdk.Context, cb func(proposal types.Proposal) (stop bool))
- func (k Keeper) IterateVotes(ctx sdk.Context, proposalID uint64, cb func(vote types.Vote) (stop bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) RemoveFromActiveProposalQueue(ctx sdk.Context, proposalID uint64, endTime time.Time)
- func (k Keeper) RemoveFromExpeditedProposalQueue(ctx sdk.Context, proposalID uint64)
- func (k Keeper) RemoveGovernor(ctx sdk.Context, address sdk.AccAddress)
- func (k Keeper) Router() gov.Router
- func (k Keeper) SetGovernorCount(ctx sdk.Context, count sdk.Int)
- func (k Keeper) SetProposal(ctx sdk.Context, proposal types.Proposal)
- func (k Keeper) SetProposalID(ctx sdk.Context, proposalID uint64)
- func (k Keeper) SetTallyParams(ctx sdk.Context, tallyParams types.TallyParams)
- func (k Keeper) SetVote(ctx sdk.Context, vote types.Vote)
- func (k Keeper) SetVotingParams(ctx sdk.Context, votingParams types.VotingParams)
- func (k Keeper) SubmitProposal(ctx sdk.Context, proposer sdk.AccAddress, content gov.Content) error
- func (k Keeper) Tally(ctx sdk.Context, proposal types.Proposal) (passes bool, tallyResults types.TallyResult)
Constants ¶
View Source
const ( QueryParams = "params" QueryProposals = "proposals" QueryProposal = "proposal" QueryVotes = "votes" QueryVote = "vote" QueryGovernors = "governors" ParamVoting = "voting" ParamTallying = "tallying" )
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
Types ¶
type Keeper ¶
type Keeper struct { AccountKeeper auth.AccountKeeper // contains filtered or unexported fields }
func (Keeper) ActiveProposalQueueIterator ¶
func (Keeper) AddGovernor ¶
func (k Keeper) AddGovernor(ctx sdk.Context, address sdk.AccAddress)
func (Keeper) AddVote ¶
func (k Keeper) AddVote(ctx sdk.Context, proposalID uint64, voter sdk.AccAddress, option types.VoteOption) error
func (Keeper) CanBeExpedited ¶
func (Keeper) ExecuteProposal ¶
func (Keeper) ExpeditedProposalQueueIterator ¶
func (Keeper) GetGovernorIterator ¶
func (Keeper) GetGovernors ¶
func (k Keeper) GetGovernors(ctx sdk.Context) []sdk.AccAddress
func (Keeper) GetProposal ¶
func (Keeper) GetProposalID ¶
func (Keeper) GetProposals ¶
func (Keeper) GetTallyParams ¶
func (k Keeper) GetTallyParams(ctx sdk.Context) types.TallyParams
func (Keeper) GetVotingParams ¶
func (k Keeper) GetVotingParams(ctx sdk.Context) types.VotingParams
func (Keeper) HandleAddGovernor ¶
func (Keeper) HandleExpedite ¶
func (Keeper) HandleProposal ¶
func (Keeper) HandleRemoveGovernor ¶
func (Keeper) InsertActiveProposalQueue ¶
func (Keeper) InsertExpeditedProposalQueue ¶
func (Keeper) IsGovernor ¶
func (Keeper) IterateActiveProposalsQueue ¶
func (Keeper) IterateAllVotes ¶
func (Keeper) IterateExpeditedProposalsQueue ¶
func (Keeper) IterateGovernors ¶
func (Keeper) IterateProposals ¶
func (Keeper) IterateVotes ¶
func (Keeper) RemoveFromActiveProposalQueue ¶
func (Keeper) RemoveFromExpeditedProposalQueue ¶
func (Keeper) RemoveGovernor ¶
func (k Keeper) RemoveGovernor(ctx sdk.Context, address sdk.AccAddress)
func (Keeper) SetTallyParams ¶
func (k Keeper) SetTallyParams(ctx sdk.Context, tallyParams types.TallyParams)
func (Keeper) SetVotingParams ¶
func (k Keeper) SetVotingParams(ctx sdk.Context, votingParams types.VotingParams)
func (Keeper) SubmitProposal ¶
Click to show internal directories.
Click to hide internal directories.