Documentation ¶
Index ¶
- func NewMsgServer(k *Keeper) types.MsgServer
- func RegisterInvariants(ir sdk.InvariantRegistry, keeper *Keeper)
- func ValidServicesInvariant(k *Keeper) sdk.Invariant
- type Keeper
- func (k *Keeper) ActivateService(ctx context.Context, serviceID uint32) error
- func (k *Keeper) AfterServiceAccreditationModified(ctx context.Context, serviceID uint32) error
- func (k *Keeper) AfterServiceActivated(ctx context.Context, serviceID uint32) error
- func (k *Keeper) AfterServiceCreated(ctx context.Context, serviceID uint32) error
- func (k *Keeper) AfterServiceDeactivated(ctx context.Context, serviceID uint32) error
- func (k *Keeper) BeforeServiceDeleted(ctx context.Context, serviceID uint32) error
- func (k *Keeper) CreateService(ctx context.Context, service types.Service) error
- func (k *Keeper) DeactivateService(ctx context.Context, serviceID uint32) error
- func (k *Keeper) DeleteService(ctx context.Context, serviceID uint32) error
- func (k *Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k *Keeper) GetAllServicesParams(ctx context.Context) ([]types.ServiceParamsRecord, error)
- func (k *Keeper) GetNextServiceID(ctx context.Context) (serviceID uint32, err error)
- func (k *Keeper) GetParams(ctx context.Context) (types.Params, error)
- func (k *Keeper) GetService(ctx context.Context, serviceID uint32) (service types.Service, found bool, err error)
- func (k *Keeper) GetServiceParams(ctx context.Context, serviceID uint32) (types.ServiceParams, error)
- func (k *Keeper) GetServices(ctx context.Context) ([]types.Service, error)
- func (k *Keeper) HasService(ctx context.Context, serviceID uint32) (bool, error)
- func (k *Keeper) InitGenesis(ctx sdk.Context, state *types.GenesisState) error
- func (k *Keeper) IsServiceAddress(ctx context.Context, address string) (bool, error)
- func (k *Keeper) IterateServices(ctx context.Context, cb func(service types.Service) (stop bool, err error)) error
- func (k *Keeper) Logger(ctx context.Context) log.Logger
- func (k *Keeper) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k *Keeper) SaveService(ctx context.Context, service types.Service) error
- func (k *Keeper) Service(ctx context.Context, request *types.QueryServiceRequest) (*types.QueryServiceResponse, error)
- func (k *Keeper) ServiceParams(ctx context.Context, request *types.QueryServiceParamsRequest) (*types.QueryServiceParamsResponse, error)
- func (k *Keeper) Services(ctx context.Context, request *types.QueryServicesRequest) (*types.QueryServicesResponse, error)
- func (k *Keeper) SetHooks(rs types.ServicesHooks) *Keeper
- func (k *Keeper) SetNextServiceID(ctx context.Context, serviceID uint32) error
- func (k *Keeper) SetParams(ctx context.Context, params types.Params) error
- func (k *Keeper) SetServiceAccredited(ctx context.Context, serviceID uint32, accredited bool) error
- func (k *Keeper) SetServiceParams(ctx context.Context, serviceID uint32, params types.ServiceParams) 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 services module invariants
func ValidServicesInvariant ¶
ValidServicesInvariant checks that all the services 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
NewKeeper creates a new keeper
func (*Keeper) ActivateService ¶
ActivateService activates the service with the given ID
func (*Keeper) AfterServiceAccreditationModified ¶
AfterServiceAccreditationModified implements ServicesHooks
func (*Keeper) AfterServiceActivated ¶
AfterServiceActivated implements ServicesHooks
func (*Keeper) AfterServiceCreated ¶
AfterServiceCreated implements ServicesHooks
func (*Keeper) AfterServiceDeactivated ¶
AfterServiceDeactivated implements ServicesHooks
func (*Keeper) BeforeServiceDeleted ¶
BeforeServiceDeleted implements ServicesHooks
func (*Keeper) CreateService ¶
CreateService creates a new Service and stores it in the KVStore
func (*Keeper) DeactivateService ¶
DeactivateService deactivates the service with the given ID
func (*Keeper) DeleteService ¶
DeleteService deletes the service 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) GetAllServicesParams ¶
GetAllServicesParams returns the parameters that have been configured for all services.
func (*Keeper) GetNextServiceID ¶
GetNextServiceID returns the next service ID to be used when registering a new Service
func (*Keeper) GetService ¶
func (k *Keeper) GetService(ctx context.Context, serviceID uint32) (service types.Service, found bool, err error)
GetService returns an Service from the KVStore
func (*Keeper) GetServiceParams ¶
func (k *Keeper) GetServiceParams(ctx context.Context, serviceID uint32) (types.ServiceParams, error)
GetServiceParams returns the params for the service with the given ID
func (*Keeper) GetServices ¶
GetServices returns the services stored in the KVStore
func (*Keeper) HasService ¶
HasService checks if a Service with the given ID exists in the KVStore
func (*Keeper) InitGenesis ¶
InitGenesis initializes the state from a GenesisState
func (*Keeper) IsServiceAddress ¶
IsServiceAddress returns true if the provided address is the address where the users' asset are kept when they restake toward a service.
func (*Keeper) IterateServices ¶
func (k *Keeper) IterateServices(ctx context.Context, cb func(service types.Service) (stop bool, err error)) error
IterateServices iterates over the services in the store and performs a callback function
func (*Keeper) Params ¶
func (k *Keeper) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params implements the Query/Params gRPC method
func (*Keeper) SaveService ¶
SaveService stores a Service in the KVStore
func (*Keeper) Service ¶
func (k *Keeper) Service(ctx context.Context, request *types.QueryServiceRequest) (*types.QueryServiceResponse, error)
Service implements the Query/Service gRPC method
func (*Keeper) ServiceParams ¶
func (k *Keeper) ServiceParams(ctx context.Context, request *types.QueryServiceParamsRequest) (*types.QueryServiceParamsResponse, error)
ServiceParams implements the Query/ServiceParams gRPC method
func (*Keeper) Services ¶
func (k *Keeper) Services(ctx context.Context, request *types.QueryServicesRequest) (*types.QueryServicesResponse, error)
Services implements the Query/Services gRPC method
func (*Keeper) SetHooks ¶
func (k *Keeper) SetHooks(rs types.ServicesHooks) *Keeper
SetHooks allows to set the reactions hooks
func (*Keeper) SetNextServiceID ¶
SetNextServiceID sets the next service ID to be used when registering a new Service
func (*Keeper) SetServiceAccredited ¶
SetServiceAccredited sets the accreditation of the service with the given ID
func (*Keeper) SetServiceParams ¶
func (k *Keeper) SetServiceParams(ctx context.Context, serviceID uint32, params types.ServiceParams) error
SetServiceParams sets the params for the service with the given ID