Documentation ¶
Index ¶
- Constants
- func NewMsgServerImpl(keeper Keeper) types.MsgServiceServer
- func NewQuerier(k Keeper) sdk.Querier
- type Keeper
- func (k Keeper) ActivateProxy(ctx sdk.Context, operator sdk.ValAddress, proxy sdk.AccAddress) error
- func (k Keeper) CreateSnapshot(ctx sdk.Context, candidates []sdk.ValAddress, ...) (exported.Snapshot, error)
- func (k Keeper) DeactivateProxy(ctx sdk.Context, operator sdk.ValAddress) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetMinProxyBalance(ctx sdk.Context) sdk.Int
- func (k Keeper) GetOperator(ctx sdk.Context, proxy sdk.AccAddress) sdk.ValAddress
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetProxy(ctx sdk.Context, operator sdk.ValAddress) (addr sdk.AccAddress, active bool)
- func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) SetParams(ctx sdk.Context, set types.Params)
- type Querier
Constants ¶
const ( QProxy = "proxy" QOperator = "operator" )
Query labels
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
func NewMsgServerImpl(keeper Keeper) types.MsgServiceServer
NewMsgServerImpl returns an implementation of the snapshot MsgServiceServer interface for the provided Keeper.
func NewQuerier ¶
NewQuerier returns a new querier for the evm module
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper represents the snapshot keeper
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace params.Subspace, staking types.StakingKeeper, bank types.BankKeeper, slasher types.Slasher) Keeper
NewKeeper creates a new keeper for the staking module
func (Keeper) ActivateProxy ¶ added in v0.9.0
func (k Keeper) ActivateProxy(ctx sdk.Context, operator sdk.ValAddress, proxy sdk.AccAddress) error
ActivateProxy registers a proxy address for a given operator, which can broadcast messages in the principal's name The proxy will be marked as active and to be included in the next snapshot by default
func (Keeper) CreateSnapshot ¶ added in v0.21.0
func (k Keeper) CreateSnapshot( ctx sdk.Context, candidates []sdk.ValAddress, filterFunc func(exported.ValidatorI) bool, weightFunc func(consensusPower sdk.Uint) sdk.Uint, threshold utils.Threshold, ) (exported.Snapshot, error)
CreateSnapshot returns a new snapshot giving each candidate its proper weight, or returns an error if the threshold cannot be met given the total weight of all validators in the system; candidates are excluded if the given filterFunc is evaluated to false or their weight is zero (NOTE: snapshot itself does not keep track of the threshold)
func (Keeper) DeactivateProxy ¶
DeactivateProxy deactivates the proxy address for a given operator
func (Keeper) ExportGenesis ¶ added in v0.9.0
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the reward module's genesis state.
func (Keeper) GetMinProxyBalance ¶
GetMinProxyBalance returns the minimum balance proxies must hold
func (Keeper) GetOperator ¶
func (k Keeper) GetOperator(ctx sdk.Context, proxy sdk.AccAddress) sdk.ValAddress
GetOperator returns the principal address for a given proxy address. Returns nil if not set.
func (Keeper) GetProxy ¶
func (k Keeper) GetProxy(ctx sdk.Context, operator sdk.ValAddress) (addr sdk.AccAddress, active bool)
GetProxy returns the proxy address for a given operator address. Returns nil if not set. The bool value denotes wether or not the proxy is active and to be included in the next snapshot
func (Keeper) InitGenesis ¶ added in v0.9.0
func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)
InitGenesis initializes the reward module's state from a given genesis state.
type Querier ¶ added in v0.34.0
type Querier struct {
// contains filtered or unexported fields
}
Querier implements the grpc queries for the nexus module
func NewGRPCQuerier ¶ added in v0.34.0
NewGRPCQuerier creates a new nexus Querier
func (Querier) Params ¶ added in v0.34.0
func (q Querier) Params(c context.Context, req *types.ParamsRequest) (*types.ParamsResponse, error)
Params returns the reward module params