Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) Campaign(goCtx context.Context, req *types.QueryCampaignRequest) (*types.QueryCampaignResponse, error)
- func (k Keeper) Campaigns(goCtx context.Context, req *types.QueryCampaignsRequest) (*types.QueryCampaignsResponse, error)
- func (k Keeper) DistributeRewards(ctx sdk.Context, receiver types.Receiver) (uint64, error)
- func (k Keeper) GetAllCampaign(ctx sdk.Context) (list []types.Campaign)
- func (k Keeper) GetAllPromoter(ctx sdk.Context) (list []types.Promoter)
- func (k Keeper) GetAllRewards(ctx sdk.Context) (list []types.Reward)
- func (k Keeper) GetAllRewardsByCampaign(ctx sdk.Context) (list []types.RewardByCampaign)
- func (k Keeper) GetAllRewardsByReceiverAndCategory(ctx sdk.Context) (list []types.RewardByCategory)
- func (k Keeper) GetAllRewardsOfReceiverByPromoterAndCategory(ctx sdk.Context) (list []types.RewardByCategory)
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetCampaign(ctx sdk.Context, uid string) (val types.Campaign, found bool)
- func (k Keeper) GetParams(_ sdk.Context) types.Params
- func (k Keeper) GetPromoter(ctx sdk.Context, uid string) (val types.Promoter, found bool)
- func (k Keeper) GetPromoterByAddress(ctx sdk.Context, address string) (val types.PromoterByAddress, found bool)
- func (k Keeper) GetReward(ctx sdk.Context, uid string) (val types.Reward, found bool)
- func (k Keeper) GetRewardGrantsStats(ctx sdk.Context, campaignUID, accAddr string) (val uint64, found bool)
- func (k Keeper) GetRewardsOfReceiverByPromoterAndCategory(ctx sdk.Context, promoterUID, addr string, category types.RewardCategory) (list []types.RewardByCategory, err error)
- func (k Keeper) HasRewardOfReceiverByPromoter(ctx sdk.Context, promoterUID, addr string, category types.RewardCategory) bool
- func (k Keeper) IsPromoter(ctx sdk.Context, address string) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PromoterByAddress(goCtx context.Context, req *types.QueryPromoterByAddressRequest) (*types.QueryPromoterByAddressResponse, error)
- func (k Keeper) Promoters(goCtx context.Context, req *types.QueryPromotersRequest) (*types.QueryPromotersResponse, error)
- func (k Keeper) RemoveCampaign(ctx sdk.Context, uid string)
- func (k Keeper) RemoveReward(ctx sdk.Context, uid string)
- func (k Keeper) RemoveRewardOfReceiverByPromoterAndCategory(ctx sdk.Context, promoterUID string, rByCategory types.RewardByCategory)
- func (k Keeper) Reward(goCtx context.Context, req *types.QueryRewardRequest) (*types.QueryRewardResponse, error)
- func (k Keeper) Rewards(goCtx context.Context, req *types.QueryRewardsRequest) (*types.QueryRewardsResponse, error)
- func (k Keeper) RewardsByAddress(goCtx context.Context, req *types.QueryRewardsByAddressRequest) (*types.QueryRewardsByAddressResponse, error)
- func (k Keeper) RewardsByAddressAndCategory(goCtx context.Context, req *types.QueryRewardsByAddressAndCategoryRequest) (*types.QueryRewardsByAddressAndCategoryResponse, error)
- func (k Keeper) RewardsByCampaign(goCtx context.Context, req *types.QueryRewardsByCampaignRequest) (*types.QueryRewardsByCampaignResponse, error)
- func (k Keeper) SetCampaign(ctx sdk.Context, campaign types.Campaign)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPromoter(ctx sdk.Context, promoter types.Promoter)
- func (k Keeper) SetPromoterByAddress(ctx sdk.Context, promoterByAddress types.PromoterByAddress)
- func (k Keeper) SetReward(ctx sdk.Context, reward types.Reward)
- func (k Keeper) SetRewardByCampaign(ctx sdk.Context, rewByCampaign types.RewardByCampaign)
- func (k Keeper) SetRewardGrantsStats(ctx sdk.Context, campaignUID, accAddr string, count uint64)
- func (k Keeper) SetRewardOfReceiverByPromoterAndCategory(ctx sdk.Context, promoterUID string, rByCategory types.RewardByCategory)
- func (k Keeper) UpdateCampaignPool(ctx sdk.Context, campaign types.Campaign, receiver types.Receiver)
- type SdkExpectedKeepers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
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, authority string, ) *Keeper
func (Keeper) Campaign ¶
func (k Keeper) Campaign(goCtx context.Context, req *types.QueryCampaignRequest) (*types.QueryCampaignResponse, error)
func (Keeper) Campaigns ¶
func (k Keeper) Campaigns(goCtx context.Context, req *types.QueryCampaignsRequest) (*types.QueryCampaignsResponse, error)
func (Keeper) DistributeRewards ¶
DistributeRewards distributes the rewards according to the input distribution list.
func (Keeper) GetAllCampaign ¶
GetAllCampaign returns all campaign
func (Keeper) GetAllPromoter ¶ added in v1.4.5
GetAllPromoter returns all promoters
func (Keeper) GetAllRewards ¶
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) GetAllRewardsOfReceiverByPromoterAndCategory ¶ added in v1.4.5
func (k Keeper) GetAllRewardsOfReceiverByPromoterAndCategory(ctx sdk.Context) (list []types.RewardByCategory)
GetAllRewardsOfReceiverByPromoterAndCategory returns all reward by promoter and category
func (Keeper) GetAuthority ¶ added in v1.4.5
GetAuthority returns the x/reward module's authority.
func (Keeper) GetCampaign ¶
GetCampaign returns a campaign from its index
func (Keeper) GetPromoter ¶ added in v1.4.5
GetPromoter returns a promoter,
func (Keeper) GetPromoterByAddress ¶ added in v1.4.5
func (k Keeper) GetPromoterByAddress(ctx sdk.Context, address string) (val types.PromoterByAddress, found bool)
GetPromoter returns a promoter,
func (Keeper) GetRewardGrantsStats ¶ added in v1.4.5
func (Keeper) GetRewardsOfReceiverByPromoterAndCategory ¶ added in v1.4.5
func (k Keeper) GetRewardsOfReceiverByPromoterAndCategory( ctx sdk.Context, promoterUID, addr string, category types.RewardCategory, ) (list []types.RewardByCategory, err error)
GetRewardsOfReceiverByPromoterAndCategory returns all rewards by address and category.
func (Keeper) HasRewardOfReceiverByPromoter ¶ added in v1.4.5
func (k Keeper) HasRewardOfReceiverByPromoter(ctx sdk.Context, promoterUID, addr string, category types.RewardCategory) bool
HasRewardByReceiver returns true if there is a record for the category and reward receiver
func (Keeper) IsPromoter ¶ added in v1.4.5
IsPromoter returns true if there is a promoter with address
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) PromoterByAddress ¶ added in v1.4.5
func (k Keeper) PromoterByAddress(goCtx context.Context, req *types.QueryPromoterByAddressRequest) (*types.QueryPromoterByAddressResponse, error)
func (Keeper) Promoters ¶ added in v1.4.5
func (k Keeper) Promoters(goCtx context.Context, req *types.QueryPromotersRequest) (*types.QueryPromotersResponse, error)
func (Keeper) RemoveCampaign ¶
RemoveCampaign removes a campaign from the store
func (Keeper) RemoveReward ¶
RemoveReward removes a reward from the store
func (Keeper) RemoveRewardOfReceiverByPromoterAndCategory ¶ added in v1.4.5
func (Keeper) Reward ¶
func (k Keeper) Reward(goCtx context.Context, req *types.QueryRewardRequest) (*types.QueryRewardResponse, error)
func (Keeper) Rewards ¶
func (k Keeper) Rewards(goCtx context.Context, req *types.QueryRewardsRequest) (*types.QueryRewardsResponse, error)
func (Keeper) RewardsByAddress ¶
func (k Keeper) RewardsByAddress(goCtx context.Context, req *types.QueryRewardsByAddressRequest) (*types.QueryRewardsByAddressResponse, error)
func (Keeper) RewardsByAddressAndCategory ¶
func (k Keeper) RewardsByAddressAndCategory(goCtx context.Context, req *types.QueryRewardsByAddressAndCategoryRequest) (*types.QueryRewardsByAddressAndCategoryResponse, error)
func (Keeper) RewardsByCampaign ¶
func (k Keeper) RewardsByCampaign(goCtx context.Context, req *types.QueryRewardsByCampaignRequest) (*types.QueryRewardsByCampaignResponse, error)
func (Keeper) SetCampaign ¶
SetCampaign set a specific campaign in the store from its index
func (Keeper) SetPromoter ¶ added in v1.4.5
SetPromoter set a specific promoter in the store from its index
func (Keeper) SetPromoterByAddress ¶ added in v1.4.5
func (k Keeper) SetPromoterByAddress(ctx sdk.Context, promoterByAddress types.PromoterByAddress)
SetPromoterByAddress set a specific promoter in the store from its address
func (Keeper) SetRewardByCampaign ¶
func (k Keeper) SetRewardByCampaign(ctx sdk.Context, rewByCampaign types.RewardByCampaign)
func (Keeper) SetRewardGrantsStats ¶ added in v1.4.5
func (Keeper) SetRewardOfReceiverByPromoterAndCategory ¶ added in v1.4.5
type SdkExpectedKeepers ¶
type SdkExpectedKeepers struct { AuthzKeeper types.AuthzKeeper BankKeeper types.BankKeeper AccountKeeper types.AccountKeeper }
SdkExpectedKeepers contains expected keepers parameter needed by NewKeeper