Documentation ¶
Index ¶
- func MakeCodec() *amino.Codec
- func SetupMultiStore() (sdk.MultiStore, *sdk.KVStoreKey, *sdk.KVStoreKey, *sdk.KVStoreKey)
- type BallotKeeper
- func (bk BallotKeeper) ActivateBallot(ctx sdk.Context, accountKeeper bank.Keeper, owner sdk.Address, ...) sdk.Error
- func (bk BallotKeeper) AddBallot(ctx sdk.Context, identifier string, owner sdk.Address, applyLen int64, ...) sdk.Error
- func (bk BallotKeeper) AddListing(ctx sdk.Context, identifier string, votes int64)
- func (bk BallotKeeper) CommitBallot(ctx sdk.Context, owner sdk.Address, identifier string, commitment []byte)
- func (bk BallotKeeper) DeactivateBallot(ctx sdk.Context, identifier string)
- func (bk BallotKeeper) DeleteBallot(ctx sdk.Context, identifier string)
- func (bk BallotKeeper) DeleteCommitment(ctx sdk.Context, owner sdk.Address, identifier string)
- func (bk BallotKeeper) DeleteListing(ctx sdk.Context, identifier string)
- func (bk BallotKeeper) DeleteVote(ctx sdk.Context, owner sdk.Address, identifier string)
- func (bk BallotKeeper) GetBallot(ctx sdk.Context, identifier string) tcr.Ballot
- func (bk BallotKeeper) GetCommitment(ctx sdk.Context, owner sdk.Address, identifier string) []byte
- func (bk BallotKeeper) GetListing(ctx sdk.Context, identifier string) tcr.Listing
- func (bk BallotKeeper) GetVote(ctx sdk.Context, owner sdk.Address, identifier string) tcr.Vote
- func (bk BallotKeeper) ProposalQueueContains(ctx sdk.Context, identifier string) bool
- func (bk BallotKeeper) ProposalQueueGetPriority(ctx sdk.Context, identifier string) int
- func (bk BallotKeeper) ProposalQueueHead(ctx sdk.Context) tcr.Ballot
- func (bk BallotKeeper) ProposalQueuePop(ctx sdk.Context) tcr.Ballot
- func (bk BallotKeeper) ProposalQueuePush(ctx sdk.Context, identifier string, blockNum int64)
- func (bk BallotKeeper) ProposalQueueUpdate(ctx sdk.Context, identifier string, newBlockNum int64) sdk.Error
- func (bk BallotKeeper) VoteBallot(ctx sdk.Context, owner sdk.Address, identifier string, vote bool, power int64) sdk.Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupMultiStore ¶
func SetupMultiStore() (sdk.MultiStore, *sdk.KVStoreKey, *sdk.KVStoreKey, *sdk.KVStoreKey)
Types ¶
type BallotKeeper ¶
func NewBallotKeeper ¶
func NewBallotKeeper(listingKey sdk.StoreKey, ballotkey sdk.StoreKey, _cdc *amino.Codec) BallotKeeper
func (BallotKeeper) ActivateBallot ¶
func (BallotKeeper) AddListing ¶
func (bk BallotKeeper) AddListing(ctx sdk.Context, identifier string, votes int64)
func (BallotKeeper) CommitBallot ¶
func (BallotKeeper) DeactivateBallot ¶
func (bk BallotKeeper) DeactivateBallot(ctx sdk.Context, identifier string)
func (BallotKeeper) DeleteBallot ¶
func (bk BallotKeeper) DeleteBallot(ctx sdk.Context, identifier string)
func (BallotKeeper) DeleteCommitment ¶
func (BallotKeeper) DeleteListing ¶
func (bk BallotKeeper) DeleteListing(ctx sdk.Context, identifier string)
func (BallotKeeper) DeleteVote ¶
func (BallotKeeper) GetBallot ¶
Will get Ballot using unique identifier. Do not need to specify status
func (BallotKeeper) GetCommitment ¶
func (BallotKeeper) GetListing ¶
func (BallotKeeper) ProposalQueueContains ¶
func (bk BallotKeeper) ProposalQueueContains(ctx sdk.Context, identifier string) bool
func (BallotKeeper) ProposalQueueGetPriority ¶
func (bk BallotKeeper) ProposalQueueGetPriority(ctx sdk.Context, identifier string) int
func (BallotKeeper) ProposalQueueHead ¶
func (bk BallotKeeper) ProposalQueueHead(ctx sdk.Context) tcr.Ballot
ProposalQueueHead returns the head of the PriorityQueue
func (BallotKeeper) ProposalQueuePop ¶
func (bk BallotKeeper) ProposalQueuePop(ctx sdk.Context) tcr.Ballot
ProposalQueuePop pops the head from the Proposal queue
func (BallotKeeper) ProposalQueuePush ¶
func (bk BallotKeeper) ProposalQueuePush(ctx sdk.Context, identifier string, blockNum int64)
ProposalQueuePush pushes a candidate to Priority Queue
func (BallotKeeper) ProposalQueueUpdate ¶
func (bk BallotKeeper) ProposalQueueUpdate(ctx sdk.Context, identifier string, newBlockNum int64) sdk.Error
ProposalQueueUpdate updates a candidate with new priority
Click to show internal directories.
Click to hide internal directories.