keeper

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

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

func NewQuerier(keeper Keeper) sdk.Querier

Types

type Keeper

type Keeper struct {
	AccountKeeper auth.AccountKeeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, paramSpace params.Subspace, router gov.Router, accountKeeper auth.AccountKeeper) Keeper

func (Keeper) ActiveProposalQueueIterator

func (k Keeper) ActiveProposalQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator

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 (k Keeper) CanBeExpedited(ctx sdk.Context, proposal types.Proposal) bool

func (Keeper) DeleteProposal

func (k Keeper) DeleteProposal(ctx sdk.Context, proposalID uint64)

func (Keeper) ExecuteProposal

func (k Keeper) ExecuteProposal(ctx sdk.Context, proposal types.Proposal) (status types.ProposalStatus)

func (Keeper) ExpeditedProposalQueueIterator

func (k Keeper) ExpeditedProposalQueueIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) GetAllVotes

func (k Keeper) GetAllVotes(ctx sdk.Context) (votes types.Votes)

func (Keeper) GetGovernorCount

func (k Keeper) GetGovernorCount(ctx sdk.Context) sdk.Int

func (Keeper) GetGovernorIterator

func (k Keeper) GetGovernorIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) GetGovernors

func (k Keeper) GetGovernors(ctx sdk.Context) []sdk.AccAddress

func (Keeper) GetProposal

func (k Keeper) GetProposal(ctx sdk.Context, proposalID uint64) (types.Proposal, error)

func (Keeper) GetProposalID

func (k Keeper) GetProposalID(ctx sdk.Context) (proposalID uint64, err error)

func (Keeper) GetProposals

func (k Keeper) GetProposals(ctx sdk.Context) (proposals types.Proposals)

func (Keeper) GetTallyParams

func (k Keeper) GetTallyParams(ctx sdk.Context) types.TallyParams

func (Keeper) GetVote

func (k Keeper) GetVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress) (types.Vote, error)

func (Keeper) GetVotes

func (k Keeper) GetVotes(ctx sdk.Context, proposalID uint64) (votes types.Votes)

func (Keeper) GetVotingParams

func (k Keeper) GetVotingParams(ctx sdk.Context) types.VotingParams

func (Keeper) HandleAddGovernor

func (k Keeper) HandleAddGovernor(ctx sdk.Context, address sdk.AccAddress) error

func (Keeper) HandleExpedite

func (k Keeper) HandleExpedite(ctx sdk.Context, proposalId uint64) error

func (Keeper) HandleProposal

func (k Keeper) HandleProposal(ctx sdk.Context, proposal types.Proposal, expedited bool)

func (Keeper) HandleRemoveGovernor

func (k Keeper) HandleRemoveGovernor(ctx sdk.Context, address sdk.AccAddress) error

func (Keeper) HasVoted

func (k Keeper) HasVoted(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress) bool

func (Keeper) InsertActiveProposalQueue

func (k Keeper) InsertActiveProposalQueue(ctx sdk.Context, proposalID uint64, endTime time.Time)

func (Keeper) InsertExpeditedProposalQueue

func (k Keeper) InsertExpeditedProposalQueue(ctx sdk.Context, proposalID uint64)

func (Keeper) IsGovernor

func (k Keeper) IsGovernor(ctx sdk.Context, address sdk.AccAddress) bool

func (Keeper) IterateActiveProposalsQueue

func (k Keeper) IterateActiveProposalsQueue(ctx sdk.Context, endTime time.Time, cb func(proposal types.Proposal) (stop bool))

func (Keeper) IterateAllVotes

func (k Keeper) IterateAllVotes(ctx sdk.Context, cb func(vote types.Vote) (stop bool))

func (Keeper) IterateExpeditedProposalsQueue

func (k Keeper) IterateExpeditedProposalsQueue(ctx sdk.Context, cb func(proposal types.Proposal) (stop bool))

func (Keeper) IterateGovernors

func (k Keeper) IterateGovernors(ctx sdk.Context, cb func(address sdk.AccAddress) (stop bool))

func (Keeper) IterateProposals

func (k Keeper) IterateProposals(ctx sdk.Context, cb func(proposal types.Proposal) (stop bool))

func (Keeper) IterateVotes

func (k Keeper) IterateVotes(ctx sdk.Context, proposalID uint64, cb func(vote types.Vote) (stop bool))

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) RemoveFromActiveProposalQueue

func (k Keeper) RemoveFromActiveProposalQueue(ctx sdk.Context, proposalID uint64, endTime time.Time)

func (Keeper) RemoveFromExpeditedProposalQueue

func (k Keeper) RemoveFromExpeditedProposalQueue(ctx sdk.Context, proposalID uint64)

func (Keeper) RemoveGovernor

func (k Keeper) RemoveGovernor(ctx sdk.Context, address sdk.AccAddress)

func (Keeper) Router

func (k Keeper) Router() gov.Router

func (Keeper) SetGovernorCount

func (k Keeper) SetGovernorCount(ctx sdk.Context, count sdk.Int)

func (Keeper) SetProposal

func (k Keeper) SetProposal(ctx sdk.Context, proposal types.Proposal)

func (Keeper) SetProposalID

func (k Keeper) SetProposalID(ctx sdk.Context, proposalID uint64)

func (Keeper) SetTallyParams

func (k Keeper) SetTallyParams(ctx sdk.Context, tallyParams types.TallyParams)

func (Keeper) SetVote

func (k Keeper) SetVote(ctx sdk.Context, vote types.Vote)

func (Keeper) SetVotingParams

func (k Keeper) SetVotingParams(ctx sdk.Context, votingParams types.VotingParams)

func (Keeper) SubmitProposal

func (k Keeper) SubmitProposal(ctx sdk.Context, proposer sdk.AccAddress, content gov.Content) error

func (Keeper) Tally

func (k Keeper) Tally(ctx sdk.Context, proposal types.Proposal) (passes bool, tallyResults types.TallyResult)

Jump to

Keyboard shortcuts

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