keeper

package
v1.1.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServer

func NewMsgServer(k *Keeper) types.MsgServer

func RegisterInvariants

func RegisterInvariants(ir sdk.InvariantRegistry, keeper *Keeper)

RegisterInvariants registers all operators module invariants

func ValidOperatorsInvariant

func ValidOperatorsInvariant(k *Keeper) sdk.Invariant

ValidOperatorsInvariant checks that all the operators are valid

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	accountKeeper types.AccountKeeper,
	poolKeeper types.CommunityPoolKeeper,
	authority string,
) *Keeper

func (*Keeper) AfterOperatorInactivatingCompleted

func (k *Keeper) AfterOperatorInactivatingCompleted(ctx sdk.Context, operatorID uint32)

AfterOperatorInactivatingCompleted implements OperatorsHooks

func (*Keeper) AfterOperatorInactivatingStarted

func (k *Keeper) AfterOperatorInactivatingStarted(ctx sdk.Context, operatorID uint32)

AfterOperatorInactivatingStarted implements OperatorsHooks

func (*Keeper) AfterOperatorRegistered

func (k *Keeper) AfterOperatorRegistered(ctx sdk.Context, operatorID uint32)

AfterOperatorRegistered implements OperatorsHooks

func (*Keeper) CompleteOperatorInactivation

func (k *Keeper) CompleteOperatorInactivation(ctx sdk.Context, operator types.Operator)

CompleteOperatorInactivation completes the inactivation process for the operator with the given ID

func (*Keeper) ExportGenesis

func (k *Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState

ExportGenesis returns the GenesisState associated with the given context

func (*Keeper) GetInactivatingOperators

func (k *Keeper) GetInactivatingOperators(ctx sdk.Context) []types.UnbondingOperator

GetInactivatingOperators returns the inactivating operators stored in the KVStore

func (*Keeper) GetNextOperatorID

func (k *Keeper) GetNextOperatorID(ctx sdk.Context) (operatorID uint32, err error)

GetNextOperatorID returns the next operator ID to be used when registering a new Operator

func (*Keeper) GetOperator

func (k *Keeper) GetOperator(ctx sdk.Context, operatorID uint32) (operator types.Operator, found bool)

GetOperator returns the operator with the given ID. If the operator does not exist, false is returned.

func (*Keeper) GetOperators

func (k *Keeper) GetOperators(ctx sdk.Context) []types.Operator

GetOperators returns the operators stored in the KVStore

func (*Keeper) GetParams

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

GetParams returns the module parameters

func (*Keeper) InitGenesis

func (k *Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState)

InitGenesis initializes the state from a GenesisState

func (*Keeper) IterateInactivatingOperatorQueue

func (k *Keeper) IterateInactivatingOperatorQueue(ctx sdk.Context, endTime time.Time, fn func(operator types.Operator) (stop bool))

IterateInactivatingOperatorQueue iterates over all the operators that are set to be inactivated by the given time and calls the given function.

func (*Keeper) IterateOperators

func (k *Keeper) IterateOperators(ctx sdk.Context, cb func(operator types.Operator) (stop bool))

IterateOperators iterates over the operators in the store and performs a callback function

func (*Keeper) Logger

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

Logger returns a module-specific logger.

func (*Keeper) Operator

Operator implements the Query/Operator gRPC method

func (*Keeper) Operators

Operators implements the Query/Operators gRPC method

func (*Keeper) Params

Params implements the Query/Params gRPC method

func (*Keeper) RegisterOperator

func (k *Keeper) RegisterOperator(ctx sdk.Context, operator types.Operator) error

RegisterOperator creates a new Operator and stores it in the KVStore

func (*Keeper) SaveOperator

func (k *Keeper) SaveOperator(ctx sdk.Context, operator types.Operator)

SaveOperator stores the given operator in the KVStore

func (*Keeper) SetHooks

func (k *Keeper) SetHooks(rs types.OperatorsHooks) *Keeper

SetHooks allows to set the operators hooks

func (*Keeper) SetNextOperatorID

func (k *Keeper) SetNextOperatorID(ctx sdk.Context, operatorID uint32)

SetNextOperatorID sets the next operator ID to be used when registering a new Operator

func (*Keeper) SetParams

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

SetParams sets module parameters

func (*Keeper) StartOperatorInactivation

func (k *Keeper) StartOperatorInactivation(ctx sdk.Context, operator types.Operator)

StartOperatorInactivation starts the inactivation process for the operator with the given ID

Jump to

Keyboard shortcuts

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