keeper

package
v0.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QProxy      = "proxy"
	QOperator   = "operator"
	QInfo       = "info"
	QValidators = "validators"
)

Query labels

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper, nexus types.Nexus) types.MsgServiceServer

NewMsgServerImpl returns an implementation of the snapshot MsgServiceServer interface for the provided Keeper.

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

NewQuerier returns a new querier for the evm module

func QueryValidators

func QueryValidators(ctx sdk.Context, k Keeper) ([]byte, error)

QueryValidators returns validators' tss information

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) 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) DeactivateProxy

func (k Keeper) DeactivateProxy(ctx sdk.Context, operator sdk.ValAddress) error

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) GetLatestSnapshot

func (k Keeper) GetLatestSnapshot(ctx sdk.Context) (exported.Snapshot, bool)

GetLatestSnapshot retrieves the last created snapshot

func (Keeper) GetMinProxyBalance

func (k Keeper) GetMinProxyBalance(ctx sdk.Context) sdk.Int

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) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams gets the module's parameters

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) GetSnapshot

func (k Keeper) GetSnapshot(ctx sdk.Context, counter int64) (exported.Snapshot, bool)

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) 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.

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns the logger

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, set types.Params)

SetParams sets the module's parameters

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL