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 context.Context, operatorID uint32) error
- func (k *Keeper) AfterOperatorInactivatingStarted(ctx context.Context, operatorID uint32) error
- func (k *Keeper) AfterOperatorReactivated(ctx context.Context, operatorID uint32) error
- func (k *Keeper) AfterOperatorRegistered(ctx context.Context, operatorID uint32) error
- func (k *Keeper) BeforeOperatorDeleted(ctx context.Context, operatorID uint32) error
- func (k *Keeper) CompleteOperatorInactivation(ctx context.Context, operator types.Operator) error
- func (k *Keeper) CreateOperator(ctx context.Context, operator types.Operator) error
- func (k *Keeper) DeleteOperator(ctx context.Context, operator types.Operator) error
- func (k *Keeper) DeleteOperatorParams(ctx context.Context, operatorID uint32) error
- func (k *Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k *Keeper) GetAllOperatorParamsRecords(ctx context.Context) ([]types.OperatorParamsRecord, error)
- func (k *Keeper) GetInactivatingOperators(ctx context.Context) ([]types.UnbondingOperator, error)
- func (k *Keeper) GetNextOperatorID(ctx context.Context) (operatorID uint32, err error)
- func (k *Keeper) GetOperator(ctx context.Context, operatorID uint32) (operator types.Operator, found bool, err error)
- func (k *Keeper) GetOperatorParams(ctx context.Context, operatorID uint32) (types.OperatorParams, error)
- func (k *Keeper) GetOperators(ctx context.Context) ([]types.Operator, error)
- func (k *Keeper) GetParams(ctx context.Context) (types.Params, error)
- func (k *Keeper) InitGenesis(ctx sdk.Context, state *types.GenesisState) error
- func (k *Keeper) IsOperatorAddress(ctx context.Context, address string) (bool, error)
- func (k *Keeper) IterateInactivatingOperatorQueue(ctx context.Context, endTime time.Time, ...) error
- func (k *Keeper) IterateOperators(ctx context.Context, cb func(operator types.Operator) (stop bool, err error)) error
- func (k *Keeper) Logger(ctx context.Context) log.Logger
- func (k *Keeper) Operator(ctx context.Context, request *types.QueryOperatorRequest) (*types.QueryOperatorResponse, error)
- func (k *Keeper) OperatorParams(ctx context.Context, request *types.QueryOperatorParamsRequest) (*types.QueryOperatorParamsResponse, 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) ReactivateInactiveOperator(ctx context.Context, operator types.Operator) error
- func (k *Keeper) SaveOperator(ctx context.Context, operator types.Operator) error
- func (k *Keeper) SaveOperatorParams(ctx context.Context, operatorID uint32, params types.OperatorParams) error
- func (k *Keeper) SetHooks(rs types.OperatorsHooks) *Keeper
- func (k *Keeper) SetNextOperatorID(ctx context.Context, operatorID uint32) error
- func (k *Keeper) SetParams(ctx context.Context, params types.Params) error
- func (k *Keeper) StartOperatorInactivation(ctx context.Context, operator types.Operator) error
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 { Schema collections.Schema // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService corestoretypes.KVStoreService, accountKeeper types.AccountKeeper, poolKeeper types.CommunityPoolKeeper, authority string, ) *Keeper
func (*Keeper) AfterOperatorInactivatingCompleted ¶
AfterOperatorInactivatingCompleted implements OperatorsHooks
func (*Keeper) AfterOperatorInactivatingStarted ¶
AfterOperatorInactivatingStarted implements OperatorsHooks
func (*Keeper) AfterOperatorReactivated ¶
AfterOperatorReactivated implements OperatorsHooks
func (*Keeper) AfterOperatorRegistered ¶
AfterOperatorRegistered implements OperatorsHooks
func (*Keeper) BeforeOperatorDeleted ¶
BeforeOperatorDeleted implements OperatorsHooks
func (*Keeper) CompleteOperatorInactivation ¶
CompleteOperatorInactivation completes the inactivation process for the operator with the given ID
func (*Keeper) CreateOperator ¶
CreateOperator creates a new Operator and stores it in the KVStore
func (*Keeper) DeleteOperator ¶
DeleteOperator deletes the operator with the given ID
func (*Keeper) DeleteOperatorParams ¶
DeleteOperatorParams the operator params associated to the operator with the provided ID. If we don't have params associated to the provided operator ID no action will be performed.
func (*Keeper) ExportGenesis ¶
func (k *Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the GenesisState associated with the given context
func (*Keeper) GetAllOperatorParamsRecords ¶
func (k *Keeper) GetAllOperatorParamsRecords(ctx context.Context) ([]types.OperatorParamsRecord, error)
GetAllOperatorParamsRecords returns all the operator params records
func (*Keeper) GetInactivatingOperators ¶
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 context.Context, operatorID uint32) (operator types.Operator, found bool, err error)
GetOperator returns the operator with the given ID. If the operator does not exist, false is returned.
func (*Keeper) GetOperatorParams ¶
func (k *Keeper) GetOperatorParams(ctx context.Context, operatorID uint32) (types.OperatorParams, error)
GetOperatorParams returns the operator params
func (*Keeper) GetOperators ¶
GetOperators returns the operators stored in the KVStore
func (*Keeper) InitGenesis ¶
InitGenesis initializes the state from a GenesisState
func (*Keeper) IsOperatorAddress ¶
IsOperatorAddress returns true if the provided address is the address where the users' asset are kept when they restake toward an operator.
func (*Keeper) IterateInactivatingOperatorQueue ¶
func (k *Keeper) IterateInactivatingOperatorQueue(ctx context.Context, endTime time.Time, fn func(operator types.Operator) (stop bool, err error)) error
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 context.Context, cb func(operator types.Operator) (stop bool, err error)) error
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) OperatorParams ¶
func (k *Keeper) OperatorParams(ctx context.Context, request *types.QueryOperatorParamsRequest) (*types.QueryOperatorParamsResponse, error)
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) ReactivateInactiveOperator ¶
ReactivateInactiveOperator reactivates an inactive operator
func (*Keeper) SaveOperator ¶
SaveOperator stores the given operator in the KVStore
func (*Keeper) SaveOperatorParams ¶
func (k *Keeper) SaveOperatorParams(ctx context.Context, operatorID uint32, params types.OperatorParams) error
SaveOperatorParams stores the given operator params
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