Documentation
¶
Index ¶
- func NewMsgServer(k *Keeper) types.MsgServer
- func RegisterInvariants(ir sdk.InvariantRegistry, keeper *Keeper)
- func ValidOperatorsInvariant(k *Keeper) sdk.Invariant
- type Keeper
- func (k *Keeper) AfterOperatorInactivatingCompleted(ctx sdk.Context, operatorID uint32)
- func (k *Keeper) AfterOperatorInactivatingStarted(ctx sdk.Context, operatorID uint32)
- func (k *Keeper) AfterOperatorRegistered(ctx sdk.Context, operatorID uint32)
- func (k *Keeper) CompleteOperatorInactivation(ctx sdk.Context, operator types.Operator)
- func (k *Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k *Keeper) GetInactivatingOperators(ctx sdk.Context) []types.UnbondingOperator
- func (k *Keeper) GetNextOperatorID(ctx sdk.Context) (operatorID uint32, err error)
- func (k *Keeper) GetOperator(ctx sdk.Context, operatorID uint32) (operator types.Operator, found bool)
- func (k *Keeper) GetOperators(ctx sdk.Context) []types.Operator
- func (k *Keeper) GetParams(ctx sdk.Context) (p types.Params)
- func (k *Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState)
- func (k *Keeper) IterateInactivatingOperatorQueue(ctx sdk.Context, endTime time.Time, ...)
- func (k *Keeper) IterateOperators(ctx sdk.Context, cb func(operator types.Operator) (stop bool))
- func (k *Keeper) Logger(ctx sdk.Context) log.Logger
- func (k *Keeper) Operator(ctx context.Context, request *types.QueryOperatorRequest) (*types.QueryOperatorResponse, error)
- func (k *Keeper) Operators(ctx context.Context, request *types.QueryOperatorsRequest) (*types.QueryOperatorsResponse, error)
- func (k *Keeper) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k *Keeper) RegisterOperator(ctx sdk.Context, operator types.Operator) error
- func (k *Keeper) SaveOperator(ctx sdk.Context, operator types.Operator)
- func (k *Keeper) SetHooks(rs types.OperatorsHooks) *Keeper
- func (k *Keeper) SetNextOperatorID(ctx sdk.Context, operatorID uint32)
- func (k *Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k *Keeper) StartOperatorInactivation(ctx sdk.Context, operator types.Operator)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServer ¶
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, keeper *Keeper)
RegisterInvariants registers all operators module invariants
func ValidOperatorsInvariant ¶
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 ¶
AfterOperatorInactivatingCompleted implements OperatorsHooks
func (*Keeper) AfterOperatorInactivatingStarted ¶
AfterOperatorInactivatingStarted implements OperatorsHooks
func (*Keeper) AfterOperatorRegistered ¶
AfterOperatorRegistered implements OperatorsHooks
func (*Keeper) CompleteOperatorInactivation ¶
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 ¶
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 ¶
GetOperators returns the operators stored in the KVStore
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 ¶
IterateOperators iterates over the operators in the store and performs a callback function
func (*Keeper) Operator ¶
func (k *Keeper) Operator(ctx context.Context, request *types.QueryOperatorRequest) (*types.QueryOperatorResponse, error)
Operator implements the Query/Operator gRPC method
func (*Keeper) Operators ¶
func (k *Keeper) Operators(ctx context.Context, request *types.QueryOperatorsRequest) (*types.QueryOperatorsResponse, error)
Operators implements the Query/Operators gRPC method
func (*Keeper) Params ¶
func (k *Keeper) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params implements the Query/Params gRPC method
func (*Keeper) RegisterOperator ¶
RegisterOperator creates a new Operator and stores it in the KVStore
func (*Keeper) SaveOperator ¶
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 ¶
SetNextOperatorID sets the next operator ID to be used when registering a new Operator