Documentation ¶
Index ¶
- func NewQuerier(keeper Keeper) sdk.Querier
- type Keeper
- func (keeper Keeper) AddPullerReward(ctx sdk.Context, ethAddress string, amount sdk.Int)
- func (keeper Keeper) ApplyChange(ctx sdk.Context, change types.Change) bool
- func (keeper Keeper) ApproveChange(ctx sdk.Context, changeID uint64, voterAddr sdk.AccAddress) error
- func (keeper Keeper) ConfirmParamProposal(ctx sdk.Context, change types.Change) (bool, error)
- func (keeper Keeper) GetActiveChanges(ctx sdk.Context) (changes types.Changes)
- func (keeper Keeper) GetBondedValidators(ctx sdk.Context) []staking.Validator
- func (keeper Keeper) GetChange(ctx sdk.Context, changeID uint64) (change types.Change, ok bool)
- func (keeper Keeper) GetChangeID(ctx sdk.Context) (changeID uint64, err error)
- func (keeper Keeper) GetChanges(ctx sdk.Context) (changes types.Changes)
- func (keeper Keeper) GetChangesFiltered(ctx sdk.Context, params types.QueryChangesParams) []types.Change
- func (keeper Keeper) GetTallyParams(ctx sdk.Context) types.TallyParams
- func (keeper Keeper) GetVotingParams(ctx sdk.Context) types.VotingParams
- func (keeper Keeper) GuardProof(ctx sdk.Context, change types.Change) (bool, error)
- func (keeper Keeper) GuardTrigger(ctx sdk.Context, change types.Change) (bool, error)
- func (keeper Keeper) InitGuardRequest(ctx sdk.Context, change types.Change) (bool, error)
- func (keeper Keeper) InsertActiveChangeQueue(ctx sdk.Context, changeID uint64)
- func (keeper Keeper) IterateChanges(ctx sdk.Context, cb func(change types.Change) (stop bool))
- func (keeper Keeper) PullerReward(ctx sdk.Context) sdk.Int
- func (keeper Keeper) RemoveFromActiveChangeQueue(ctx sdk.Context, changeID uint64)
- func (keeper Keeper) SetChange(ctx sdk.Context, change types.Change)
- func (keeper Keeper) SetChangeID(ctx sdk.Context, changeID uint64)
- func (keeper Keeper) SetTallyParams(ctx sdk.Context, tallyParams types.TallyParams)
- func (keeper Keeper) SetVotingParams(ctx sdk.Context, votingParams types.VotingParams)
- func (keeper Keeper) SubmitChange(ctx sdk.Context, changeType string, data []byte, blockNum uint64, ...) (types.Change, error)
- func (keeper Keeper) Subscribe(ctx sdk.Context, change types.Change) (bool, error)
- func (keeper Keeper) SyncDelegator(ctx sdk.Context, change types.Change) (bool, error)
- func (keeper Keeper) SyncValidator(ctx sdk.Context, change types.Change) (bool, error)
- func (keeper Keeper) UpdateSidechainAddr(ctx sdk.Context, change types.Change) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
NewQuerier creates a new sync Querier instance
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the sync module Keeper
func NewKeeper ¶
func NewKeeper( cdc *codec.Codec, key sdk.StoreKey, paramSpace types.ParamSubspace, paramsKeeper params.Keeper, slashKeeper slash.Keeper, stakingKeeper staking.Keeper, guardKeeper guard.Keeper, validatorKeeper validator.Keeper, ) Keeper
NewKeeper returns a sync keeper. It handles: - submitting sync changes - depositing funds into changes, and activating upon sufficient funds being deposited - users voting on changes, with weight proportional to stake in the system - and tallying the result of the vote.
CONTRACT: the parameter Subspace must have the param key table already initialized
func (Keeper) AddPullerReward ¶ added in v0.2.4
func (Keeper) ApplyChange ¶
func (Keeper) ApproveChange ¶
func (keeper Keeper) ApproveChange(ctx sdk.Context, changeID uint64, voterAddr sdk.AccAddress) error
ApproveChange adds a vote on a specific change
func (Keeper) ConfirmParamProposal ¶
func (Keeper) GetActiveChanges ¶
GetActiveChanges get all the active changes
func (Keeper) GetBondedValidators ¶ added in v0.2.4
func (Keeper) GetChangeID ¶
GetChangeID gets the highest change ID
func (Keeper) GetChanges ¶
GetChanges returns all the changes from store
func (Keeper) GetChangesFiltered ¶
func (keeper Keeper) GetChangesFiltered(ctx sdk.Context, params types.QueryChangesParams) []types.Change
GetChangesFiltered retrieves changes filtered by a given set of params which include pagination parameters along with voter and depositor addresses and a change status. The voter address will filter changes by whether or not that address has voted on changes. The depositor address will filter changes by whether or not that address has deposited to them. Finally, status will filter changes by status.
NOTE: If no filters are provided, all changes will be returned in paginated form.
func (Keeper) GetTallyParams ¶
func (keeper Keeper) GetTallyParams(ctx sdk.Context) types.TallyParams
GetTallyParams returns the current TallyParam from the sync param store
func (Keeper) GetVotingParams ¶
func (keeper Keeper) GetVotingParams(ctx sdk.Context) types.VotingParams
GetVotingParams returns the current VotingParams from the sync param store
func (Keeper) GuardProof ¶
func (Keeper) GuardTrigger ¶
func (Keeper) InitGuardRequest ¶
func (Keeper) InsertActiveChangeQueue ¶
InsertActiveChangeQueue inserts a ID into the active change queue
func (Keeper) IterateChanges ¶
IterateChanges iterates over the all the changes and performs a callback function
func (Keeper) RemoveFromActiveChangeQueue ¶
RemoveFromActiveChangeQueue removes a changeID from the Active Change Queue
func (Keeper) SetChangeID ¶
SetChangeID sets the new change ID to the store
func (Keeper) SetTallyParams ¶
func (keeper Keeper) SetTallyParams(ctx sdk.Context, tallyParams types.TallyParams)
SetTallyParams sets TallyParams to the sync param store
func (Keeper) SetVotingParams ¶
func (keeper Keeper) SetVotingParams(ctx sdk.Context, votingParams types.VotingParams)
SetVotingParams sets VotingParams to the sync param store
func (Keeper) SubmitChange ¶
func (keeper Keeper) SubmitChange(ctx sdk.Context, changeType string, data []byte, blockNum uint64, initiatorAddr sdk.AccAddress) (types.Change, error)
SubmitChange create new change given a content