keeper

package
v0.0.0-...-018c514 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Hooks

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

Hooks wrapper struct for incentives keeper.

func (Hooks) AfterEpochEnd

func (h Hooks) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64) error

func (Hooks) BeforeEpochStart

func (h Hooks) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64) error

epochs hooks.

type Keeper

type Keeper struct {
	IBCKeeper ibckeeper.Keeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.Codec,
	key storetypes.StoreKey,
	ibcKeeper ibckeeper.Keeper,
) Keeper

NewKeeper returns a new instance of participationrewards Keeper. This function will panic on failure.

func (Keeper) AfterEpochEnd

func (k Keeper) AfterEpochEnd(_ sdk.Context, _ string, _ int64) error

func (Keeper) AllClaims

func (k Keeper) AllClaims(ctx sdk.Context) []*types.Claim

AllClaims returns a slice containing all claims from the store.

func (Keeper) AllZoneClaims

func (k Keeper) AllZoneClaims(ctx sdk.Context, chainID string) []*types.Claim

func (Keeper) AllZoneLastEpochClaims

func (k Keeper) AllZoneLastEpochClaims(ctx sdk.Context, chainID string) []*types.Claim

func (Keeper) AllZoneLastEpochUserClaims

func (k Keeper) AllZoneLastEpochUserClaims(ctx sdk.Context, chainID, address string) []*types.Claim

func (Keeper) AllZoneUserClaims

func (k Keeper) AllZoneUserClaims(ctx sdk.Context, chainID, address string) []*types.Claim

func (Keeper) ArchiveAndGarbageCollectClaims

func (k Keeper) ArchiveAndGarbageCollectClaims(ctx sdk.Context, chainID string)

ArchiveAndGarbageCollectClaims deletes all the last epoch claims and moves the current epoch claims to the last epoch store.

func (Keeper) BeforeEpochStart

func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64) error

func (Keeper) BeginBlocker

func (k Keeper) BeginBlocker(_ sdk.Context)

BeginBlocker of claimsmanager module.

func (Keeper) Claims

func (Keeper) ClearClaims

func (k Keeper) ClearClaims(ctx sdk.Context, chainID string)

ClearClaims deletes all the current epoch claims of the given zone.

func (Keeper) ClearLastEpochClaims

func (k Keeper) ClearLastEpochClaims(ctx sdk.Context, chainID string)

ClearLastEpochClaims deletes all the last epoch claims of the given zone.

func (Keeper) DeleteClaim

func (k Keeper) DeleteClaim(ctx sdk.Context, claim *types.Claim)

DeleteClaim deletes claim.

func (Keeper) DeleteLastEpochClaim

func (k Keeper) DeleteLastEpochClaim(ctx sdk.Context, claim *types.Claim)

DeleteLastEpochClaim deletes claim for last epoch.

func (Keeper) DeleteSelfConsensusState

func (k Keeper) DeleteSelfConsensusState(ctx sdk.Context, key string)

DeleteSelfConsensusState deletes the self consensus state.

func (Keeper) GetClaim

func (k Keeper) GetClaim(ctx sdk.Context, chainID, address string, module types.ClaimType, srcChainID string) (types.Claim, bool)

GetClaim returns claim.

func (Keeper) GetLastEpochClaim

func (k Keeper) GetLastEpochClaim(ctx sdk.Context, chainID, address string, module types.ClaimType, srcChainID string) (types.Claim, bool)

GetLastEpochClaim returns claim from last epoch.

func (Keeper) GetSelfConsensusState

func (k Keeper) GetSelfConsensusState(ctx sdk.Context, key string) (ibctmtypes.ConsensusState, bool)

GetSelfConsensusState returns consensus state stored every epoch.

func (Keeper) Hooks

func (k Keeper) Hooks() Hooks

func (Keeper) IterateAllClaims

func (k Keeper) IterateAllClaims(ctx sdk.Context, fn func(index int64, key []byte, data types.Claim) (stop bool))

IterateAllClaims iterates through all claims.

func (Keeper) IterateAllLastEpochClaims

func (k Keeper) IterateAllLastEpochClaims(ctx sdk.Context, fn func(index int64, key []byte, data types.Claim) (stop bool))

IterateAllLastEpochClaims iterates through zone claims from last epoch for a given user.

func (Keeper) IterateClaims

func (k Keeper) IterateClaims(ctx sdk.Context, chainID string, fn func(index int64, data types.Claim) (stop bool))

IterateClaims iterates through zone claims.

func (Keeper) IterateLastEpochClaims

func (k Keeper) IterateLastEpochClaims(ctx sdk.Context, chainID string, fn func(index int64, data types.Claim) (stop bool))

IterateLastEpochClaims iterates through zone claims from last epoch.

func (Keeper) IterateLastEpochUserClaims

func (k Keeper) IterateLastEpochUserClaims(ctx sdk.Context, chainID, address string, fn func(index int64, data types.Claim) (stop bool))

IterateLastEpochUserClaims iterates through zone claims from last epoch for a given user.

func (Keeper) IterateUserClaims

func (k Keeper) IterateUserClaims(ctx sdk.Context, chainID, address string, fn func(index int64, data types.Claim) (stop bool))

IterateUserClaims iterates through zone claims for a given address.

func (Keeper) LastEpochClaims

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) NewClaim

func (k Keeper) NewClaim(address, chainID string, module types.ClaimType, srcChainID string, amount uint64) types.Claim

func (Keeper) SetClaim

func (k Keeper) SetClaim(ctx sdk.Context, claim *types.Claim)

SetClaim sets claim.

func (Keeper) SetLastEpochClaim

func (k Keeper) SetLastEpochClaim(ctx sdk.Context, claim *types.Claim)

SetLastEpochClaim sets claim for last epoch.

func (Keeper) SetSelfConsensusState

func (k Keeper) SetSelfConsensusState(ctx sdk.Context, key string, consState *ibctmtypes.ConsensusState)

SetSelfConsensusState sets the self consensus state.

func (Keeper) StoreSelfConsensusState

func (k Keeper) StoreSelfConsensusState(ctx sdk.Context, key string) error

func (Keeper) UserClaims

func (Keeper) UserLastEpochClaims

func (k Keeper) UserLastEpochClaims(c context.Context, q *types.QueryClaimsRequest) (*types.QueryClaimsResponse, error)

Jump to

Keyboard shortcuts

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