keeper

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 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 Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,
	betKeeper types.BetKeeper,
	ovmKeeper types.OVMKeeper,
	subaccountKeeper types.SubAccountKeeper,
	expectedKeepers SdkExpectedKeepers,
) *Keeper

func (Keeper) Campaign

func (Keeper) Campaigns

func (Keeper) DistributeRewards

func (k Keeper) DistributeRewards(ctx sdk.Context, receiver types.Receiver) (uint64, error)

DistributeRewards distributes the rewards according to the input distribution list.

func (Keeper) GetAllCampaign

func (k Keeper) GetAllCampaign(ctx sdk.Context) (list []types.Campaign)

GetAllCampaign returns all campaign

func (Keeper) GetAllRewards

func (k Keeper) GetAllRewards(ctx sdk.Context) (list []types.Reward)

GetAllRewards returns all reward

func (Keeper) GetAllRewardsByCampaign

func (k Keeper) GetAllRewardsByCampaign(ctx sdk.Context) (list []types.RewardByCampaign)

GetAllRewardsByCampaign returns all rewards by campaign

func (Keeper) GetAllRewardsByReceiverAndCategory

func (k Keeper) GetAllRewardsByReceiverAndCategory(ctx sdk.Context) (list []types.RewardByCategory)

GetAllRewardsByReceiverAndCategory returns all rewards by receiver and category

func (Keeper) GetCampaign

func (k Keeper) GetCampaign(
	ctx sdk.Context,
	uid string,
) (val types.Campaign, found bool)

GetCampaign returns a campaign from its index

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) types.Params

GetParams get all parameters as types.Params

func (Keeper) GetReward

func (k Keeper) GetReward(
	ctx sdk.Context,
	uid string,
) (val types.Reward, found bool)

GetReward returns a reward from its index

func (Keeper) GetRewardsByAddressAndCategory

func (k Keeper) GetRewardsByAddressAndCategory(
	ctx sdk.Context,
	address string,
	category types.RewardCategory,
) (list []types.RewardByCategory, err error)

GetRewardsByAddressAndCategory returns all rewards by address and category.

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) RemoveCampaign

func (k Keeper) RemoveCampaign(
	ctx sdk.Context,
	uid string,
)

RemoveCampaign removes a campaign from the store

func (Keeper) RemoveReward

func (k Keeper) RemoveReward(
	ctx sdk.Context,
	uid string,
)

RemoveReward removes a reward from the store

func (Keeper) Reward

func (Keeper) Rewards

func (Keeper) SetCampaign

func (k Keeper) SetCampaign(ctx sdk.Context, campaign types.Campaign)

SetCampaign set a specific campaign in the store from its index

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetReward

func (k Keeper) SetReward(ctx sdk.Context, reward types.Reward)

SetReward set a specific reward in the store from its index

func (Keeper) SetRewardByCampaign

func (k Keeper) SetRewardByCampaign(ctx sdk.Context, rewByCampaign types.RewardByCampaign)

func (Keeper) SetRewardByReceiver

func (k Keeper) SetRewardByReceiver(ctx sdk.Context, rByCategory types.RewardByCategory)

func (Keeper) UpdateCampaignPool

func (k Keeper) UpdateCampaignPool(ctx sdk.Context, campaign types.Campaign, receiver types.Receiver)

type SdkExpectedKeepers

type SdkExpectedKeepers struct {
	AuthzKeeper   types.AuthzKeeper
	BankKeeper    types.BankKeeper
	AccountKeeper types.AccountKeeper
}

SdkExpectedKeepers contains expected keepers parameter needed by NewKeeper

Jump to

Keyboard shortcuts

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