Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) AddGovernor(ctx sdk.Context, gov sdk.AccAddress) error
- func (k Keeper) AddProposalHistoryRecord(ctx sdk.Context, record types.ProposalHistoryRecord)
- func (k Keeper) Answer(ctx sdk.Context, acc string, yes bool) error
- func (k Keeper) BeginBlock(ctx sdk.Context) error
- func (k Keeper) EndPoll(ctx sdk.Context)
- func (k Keeper) EndPollHandler(ctx sdk.Context, _ []byte, _ time.Time)
- func (k Keeper) EndProposal(ctx sdk.Context, proposal types.Proposal, agreed bool)
- func (k Keeper) GetAgreed(ctx sdk.Context) (gov types.Government)
- func (k Keeper) GetCurrentPoll(ctx sdk.Context) (poll types.Poll, ok bool)
- func (k Keeper) GetCurrentProposal(ctx sdk.Context) *types.Proposal
- func (k Keeper) GetDisagreed(ctx sdk.Context) (gov types.Government)
- func (k Keeper) GetGovernment(ctx sdk.Context) types.Government
- func (k Keeper) GetHistory(ctx sdk.Context, limit int32, page int32) []types.ProposalHistoryRecord
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPollHistory(ctx sdk.Context, limit int32, page int32) []types.PollHistoryItem
- func (k Keeper) GetPollHistoryAll(ctx sdk.Context) []types.PollHistoryItem
- func (k Keeper) GetPollStatus(ctx sdk.Context) (yes, no uint64)
- func (k Keeper) GetStartBlock(ctx sdk.Context) int64
- func (k Keeper) IterateThroughCurrentPollAnswers(ctx sdk.Context, callback func(acc string, ans bool) (stop bool)) (err error)
- func (k Keeper) LoadPolls(ctx sdk.Context, state types.GenesisState)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Propose(ctx sdk.Context, msg types.MsgPropose) error
- func (k Keeper) RemoveGovernor(ctx sdk.Context, gov sdk.AccAddress) error
- func (k Keeper) Router() baseapp.MessageRouter
- func (k Keeper) SaveProposalToHistory(ctx sdk.Context, store corestore.KVStore)
- func (k Keeper) SetAgreed(ctx sdk.Context, agreed types.Government)
- func (k Keeper) SetCurrentProposal(ctx sdk.Context, proposal types.Proposal)
- func (k Keeper) SetDisagreed(ctx sdk.Context, disagreed types.Government)
- func (k Keeper) SetGovernment(ctx sdk.Context, gov types.Government)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetStartBlock(ctx sdk.Context)
- func (k Keeper) StartPoll(ctx sdk.Context, poll types.Poll) error
- func (k Keeper) Validate(gov types.Government, aGov types.Government, dGov types.Government) (complete bool, agreed bool)
- func (k Keeper) Vote(ctx sdk.Context, voter sdk.AccAddress, agree bool) error
- type MsgServer
- func (ms MsgServer) AddGovernor(ctx context.Context, msg *types.MsgAddGovernor) (*types.MsgAddGovernorResponse, error)
- func (ms MsgServer) AnswerPoll(ctx context.Context, msg *types.MsgAnswerPoll) (*types.MsgAnswerPollResponse, error)
- func (ms MsgServer) Propose(ctx context.Context, msg *types.MsgPropose) (*types.MsgProposeResponse, error)
- func (ms MsgServer) RemoveGovernor(ctx context.Context, msg *types.MsgRemoveGovernor) (*types.MsgRemoveGovernorResponse, error)
- func (ms MsgServer) StartPoll(ctx context.Context, msg *types.MsgStartPoll) (*types.MsgStartPollResponse, error)
- func (ms MsgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)
- func (ms MsgServer) Vote(ctx context.Context, msg *types.MsgVote) (*types.MsgVoteResponse, error)
- type QueryServer
- func (qs QueryServer) Current(ctx context.Context, _ *types.CurrentRequest) (*types.CurrentResponse, error)
- func (qs QueryServer) Government(ctx context.Context, _ *types.GovernmentRequest) (*types.GovernmentResponse, error)
- func (qs QueryServer) History(ctx context.Context, req *types.HistoryRequest) (*types.HistoryResponse, error)
- func (qs QueryServer) Params(ctx context.Context, _ *types.ParamsRequest) (*types.ParamsResponse, error)
- func (qs QueryServer) Poll(ctx context.Context, _ *types.PollRequest) (*types.PollResponse, error)
- func (qs QueryServer) PollHistory(ctx context.Context, req *types.PollHistoryRequest) (*types.PollHistoryResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct { Params collections.Item[types.Params] // contains filtered or unexported fields }
Keeper of the vote store
func NewKeeper ¶
func NewKeeper( cdc codec.Codec, storeService corestore.KVStoreService, referralKeeper types.ReferralKeeper, authority sdk.AccAddress, router baseapp.MessageRouter, accountKeeper types.AccountKeeper, ) Keeper
NewKeeper creates a vote keeper
func (Keeper) AddGovernor ¶
func (Keeper) AddProposalHistoryRecord ¶
func (k Keeper) AddProposalHistoryRecord(ctx sdk.Context, record types.ProposalHistoryRecord)
func (Keeper) EndPollHandler ¶
func (Keeper) EndProposal ¶
func (Keeper) GetCurrentPoll ¶
func (Keeper) GetCurrentProposal ¶
func (Keeper) GetDisagreed ¶
func (k Keeper) GetDisagreed(ctx sdk.Context) (gov types.Government)
func (Keeper) GetGovernment ¶
func (k Keeper) GetGovernment(ctx sdk.Context) types.Government
func (Keeper) GetHistory ¶
func (Keeper) GetPollHistory ¶
func (Keeper) GetPollHistoryAll ¶
func (k Keeper) GetPollHistoryAll(ctx sdk.Context) []types.PollHistoryItem
func (Keeper) IterateThroughCurrentPollAnswers ¶
func (Keeper) RemoveGovernor ¶
func (Keeper) Router ¶
func (k Keeper) Router() baseapp.MessageRouter
func (Keeper) SaveProposalToHistory ¶
func (Keeper) SetCurrentProposal ¶
func (Keeper) SetDisagreed ¶
func (k Keeper) SetDisagreed(ctx sdk.Context, disagreed types.Government)
func (Keeper) SetGovernment ¶
func (k Keeper) SetGovernment(ctx sdk.Context, gov types.Government)
func (Keeper) SetStartBlock ¶
func (Keeper) Validate ¶
func (k Keeper) Validate(gov types.Government, aGov types.Government, dGov types.Government, ) (complete bool, agreed bool)
type MsgServer ¶
type MsgServer Keeper
func (MsgServer) AddGovernor ¶
func (ms MsgServer) AddGovernor(ctx context.Context, msg *types.MsgAddGovernor) (*types.MsgAddGovernorResponse, error)
func (MsgServer) AnswerPoll ¶
func (ms MsgServer) AnswerPoll(ctx context.Context, msg *types.MsgAnswerPoll) (*types.MsgAnswerPollResponse, error)
func (MsgServer) Propose ¶
func (ms MsgServer) Propose(ctx context.Context, msg *types.MsgPropose) (*types.MsgProposeResponse, error)
func (MsgServer) RemoveGovernor ¶
func (ms MsgServer) RemoveGovernor(ctx context.Context, msg *types.MsgRemoveGovernor) (*types.MsgRemoveGovernorResponse, error)
func (MsgServer) StartPoll ¶
func (ms MsgServer) StartPoll(ctx context.Context, msg *types.MsgStartPoll) (*types.MsgStartPollResponse, error)
func (MsgServer) UpdateParams ¶
func (ms MsgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)
type QueryServer ¶
type QueryServer struct {
Keeper
}
func (QueryServer) Current ¶
func (qs QueryServer) Current(ctx context.Context, _ *types.CurrentRequest) (*types.CurrentResponse, error)
func (QueryServer) Government ¶
func (qs QueryServer) Government(ctx context.Context, _ *types.GovernmentRequest) (*types.GovernmentResponse, error)
func (QueryServer) History ¶
func (qs QueryServer) History(ctx context.Context, req *types.HistoryRequest) (*types.HistoryResponse, error)
func (QueryServer) Params ¶
func (qs QueryServer) Params(ctx context.Context, _ *types.ParamsRequest) (*types.ParamsResponse, error)
func (QueryServer) Poll ¶
func (qs QueryServer) Poll(ctx context.Context, _ *types.PollRequest) (*types.PollResponse, error)
func (QueryServer) PollHistory ¶
func (qs QueryServer) PollHistory(ctx context.Context, req *types.PollHistoryRequest) (*types.PollHistoryResponse, error)
Click to show internal directories.
Click to hide internal directories.