keeper

package
v12.0.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

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

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, router *baseapp.MsgServiceRouter, authority string) Keeper

func (*Keeper) DeleteActiveProvider

func (k *Keeper) DeleteActiveProvider(ctx sdk.Context, addr base.ProvAddress)

DeleteActiveProvider removes an active provider from the module's KVStore based on the provider address.

func (*Keeper) DeleteInactiveProvider

func (k *Keeper) DeleteInactiveProvider(ctx sdk.Context, addr base.ProvAddress)

DeleteInactiveProvider removes an inactive provider from the module's KVStore based on the provider address.

func (*Keeper) Deposit

func (k *Keeper) Deposit(ctx sdk.Context) sdk.Coin

Deposit returns the deposit parameter from the module's parameters.

func (*Keeper) ExportGenesis

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

func (*Keeper) FundCommunityPool

func (k *Keeper) FundCommunityPool(ctx sdk.Context, fromAddr sdk.AccAddress, coin sdk.Coin) error

func (*Keeper) GetActiveProvider

func (k *Keeper) GetActiveProvider(ctx sdk.Context, addr base.ProvAddress) (v v2.Provider, found bool)

GetActiveProvider retrieves an active provider from the module's KVStore based on the provider address. If the provider exists, it returns the provider and 'found' as true; otherwise, it returns 'found' as false.

func (*Keeper) GetInactiveProvider

func (k *Keeper) GetInactiveProvider(ctx sdk.Context, addr base.ProvAddress) (v v2.Provider, found bool)

GetInactiveProvider retrieves an inactive provider from the module's KVStore based on the provider address. If the provider exists, it returns the provider and 'found' as true; otherwise, it returns 'found' as false.

func (*Keeper) GetParams

func (k *Keeper) GetParams(ctx sdk.Context) (v v2.Params)

GetParams retrieves the parameters from the module's KVStore.

func (*Keeper) GetProvider

func (k *Keeper) GetProvider(ctx sdk.Context, addr base.ProvAddress) (provider v2.Provider, found bool)

GetProvider retrieves a provider from the module's KVStore based on the provider address. If the provider exists, it returns the provider and 'found' as true; otherwise, it returns 'found' as false.

func (*Keeper) GetProviders

func (k *Keeper) GetProviders(ctx sdk.Context) (items v2.Providers)

GetProviders retrieves all providers from the module's KVStore.

func (*Keeper) HandleMsgRegisterProvider

func (k *Keeper) HandleMsgRegisterProvider(ctx sdk.Context, msg *v3.MsgRegisterProviderRequest) (*v3.MsgRegisterProviderResponse, error)

func (*Keeper) HandleMsgUpdateParams

func (k *Keeper) HandleMsgUpdateParams(ctx sdk.Context, msg *v3.MsgUpdateParamsRequest) (*v3.MsgUpdateParamsResponse, error)

func (*Keeper) HandleMsgUpdateProviderDetails

func (k *Keeper) HandleMsgUpdateProviderDetails(ctx sdk.Context, msg *v3.MsgUpdateProviderDetailsRequest) (*v3.MsgUpdateProviderDetailsResponse, error)

func (*Keeper) HandleMsgUpdateProviderStatus

func (k *Keeper) HandleMsgUpdateProviderStatus(ctx sdk.Context, msg *v3.MsgUpdateProviderStatusRequest) (*v3.MsgUpdateProviderStatusResponse, error)

func (*Keeper) HandleQueryParams

func (k *Keeper) HandleQueryParams(ctx sdk.Context, _ *v2.QueryParamsRequest) (*v2.QueryParamsResponse, error)

func (*Keeper) HandleQueryProvider

func (k *Keeper) HandleQueryProvider(ctx sdk.Context, req *v2.QueryProviderRequest) (*v2.QueryProviderResponse, error)

func (*Keeper) HandleQueryProviders

func (k *Keeper) HandleQueryProviders(ctx sdk.Context, req *v2.QueryProvidersRequest) (*v2.QueryProvidersResponse, error)

func (*Keeper) HasActiveProvider

func (k *Keeper) HasActiveProvider(ctx sdk.Context, addr base.ProvAddress) bool

HasActiveProvider checks if an active provider exists in the module's KVStore based on the provider address.

func (*Keeper) HasInactiveProvider

func (k *Keeper) HasInactiveProvider(ctx sdk.Context, addr base.ProvAddress) bool

HasInactiveProvider checks if an inactive provider exists in the module's KVStore based on the provider address.

func (*Keeper) HasProvider

func (k *Keeper) HasProvider(ctx sdk.Context, addr base.ProvAddress) bool

HasProvider checks if a provider exists in the module's KVStore based on the provider address.

func (*Keeper) InitGenesis

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

func (*Keeper) IterateProviders

func (k *Keeper) IterateProviders(ctx sdk.Context, fn func(index int, item v2.Provider) (stop bool))

IterateProviders iterates over all providers in the module's KVStore and performs the specified action.

func (*Keeper) Logger

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

func (*Keeper) ProviderInactivePreHook

func (k *Keeper) ProviderInactivePreHook(ctx sdk.Context, addr base.ProvAddress) error

func (*Keeper) SetActiveProvider

func (k *Keeper) SetActiveProvider(ctx sdk.Context, v v2.Provider)

SetActiveProvider stores an active provider in the module's KVStore.

func (*Keeper) SetInactiveProvider

func (k *Keeper) SetInactiveProvider(ctx sdk.Context, v v2.Provider)

SetInactiveProvider stores an inactive provider in the module's KVStore.

func (*Keeper) SetParams

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

SetParams stores the parameters for the module in the KVStore.

func (*Keeper) SetProvider

func (k *Keeper) SetProvider(ctx sdk.Context, provider v2.Provider)

SetProvider stores a provider in the module's KVStore based on its status.

func (*Keeper) StakingShare

func (k *Keeper) StakingShare(ctx sdk.Context) sdkmath.LegacyDec

StakingShare returns the staking share parameter from the module's parameters.

func (*Keeper) Store

func (k *Keeper) Store(ctx sdk.Context) sdk.KVStore

func (*Keeper) WithDistributionKeeper

func (k *Keeper) WithDistributionKeeper(keeper expected.DistributionKeeper)

func (*Keeper) WithLeaseKeeper

func (k *Keeper) WithLeaseKeeper(keeper expected.LeaseKeeper)

func (*Keeper) WithPlanKeeper

func (k *Keeper) WithPlanKeeper(keeper expected.PlanKeeper)

Jump to

Keyboard shortcuts

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