Documentation ¶
Index ¶
- Constants
- func NewMsgServerImpl(keeper Keeper) types.MsgServiceServer
- func NewQuerier(k Keeper) sdk.Querier
- func QueryValidators(ctx sdk.Context, k Keeper) ([]byte, error)
- type Keeper
- func (k Keeper) DeactivateProxy(ctx sdk.Context, operator sdk.ValAddress) error
- func (k Keeper) GetLatestCounter(ctx sdk.Context) int64
- func (k Keeper) GetLatestSnapshot(ctx sdk.Context) (exported.Snapshot, bool)
- 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, principal sdk.ValAddress) (addr sdk.AccAddress, active bool)
- func (k Keeper) GetSnapshot(ctx sdk.Context, counter int64) (exported.Snapshot, bool)
- func (k Keeper) GetValidatorIllegibility(ctx sdk.Context, validator exported.SDKValidator) (exported.ValidatorIllegibility, error)
- func (k Keeper) IsProxyReady(ctx sdk.Context, operator sdk.ValAddress) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) RegisterProxy(ctx sdk.Context, operator sdk.ValAddress, proxy sdk.AccAddress) error
- func (k Keeper) SetParams(ctx sdk.Context, set types.Params)
- func (k Keeper) TakeSnapshot(ctx sdk.Context, keyRequirement tss.KeyRequirement) (exported.Snapshot, error)
Constants ¶
const ( QProxy = "proxy" QOperator = "operator" QInfo = "info" QValidators = "validators" )
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 exported.Slasher, tss exported.Tss) Keeper
NewKeeper creates a new keeper for the staking module
func (Keeper) DeactivateProxy ¶
DeactivateProxy deactivates the proxy address for a given operator
func (Keeper) GetLatestCounter ¶
GetLatestCounter returns the latest snapshot counter
func (Keeper) GetLatestSnapshot ¶
GetLatestSnapshot retrieves the last created snapshot
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 proxy address for a given principal address. Returns nil if not set.
func (Keeper) GetProxy ¶
func (k Keeper) GetProxy(ctx sdk.Context, principal sdk.ValAddress) (addr sdk.AccAddress, active bool)
GetProxy returns the proxy address for a given principal 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) GetSnapshot ¶
GetSnapshot retrieves a snapshot by counter, if it exists
func (Keeper) GetValidatorIllegibility ¶
func (k Keeper) GetValidatorIllegibility(ctx sdk.Context, validator exported.SDKValidator) (exported.ValidatorIllegibility, error)
GetValidatorIllegibility returns the illegibility of the given validator
func (Keeper) IsProxyReady ¶
IsProxyReady returns true if a register-proxy message has already been issue for the given operator address
func (Keeper) RegisterProxy ¶
func (k Keeper) RegisterProxy(ctx sdk.Context, operator sdk.ValAddress, proxy sdk.AccAddress) error
RegisterProxy 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) TakeSnapshot ¶
func (k Keeper) TakeSnapshot(ctx sdk.Context, keyRequirement tss.KeyRequirement) (exported.Snapshot, error)
TakeSnapshot attempts to create a new snapshot based on the given key requirment