keeper

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: Apache-2.0 Imports: 16 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 ExpectedKeepers

type ExpectedKeepers struct {
	DVMKeeper types.DVMKeeper
}

ExpectedKeepers contains expected keepers parameter needed by NewKeeper

type Keeper

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

Keeper is the type for module properties

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey sdk.StoreKey,
	ps paramtypes.Subspace,
	expectedKeepers ExpectedKeepers,

) *Keeper

NewKeeper creates new keeper object

func (Keeper) AddExtraPayoutToEvent

func (k Keeper) AddExtraPayoutToEvent(ctx sdk.Context, sportEventUID string, amount sdk.Int) error

AddExtraPayoutToEvent update current total amount of payouts for a sport event

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetSportEvent

func (k Keeper) GetSportEvent(ctx sdk.Context, sportEventUID string) (val types.SportEvent, found bool)

GetSportEvent returns a specific sport event by its UID

func (Keeper) GetSportEventAll

func (k Keeper) GetSportEventAll(ctx sdk.Context) (list []types.SportEvent, err error)

GetSportEventAll returns all sport events

func (Keeper) Logger

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

Logger retuns the logger of the keeper

func (Keeper) Params

Params returns the params of the module

func (Keeper) RemoveSportEvent

func (k Keeper) RemoveSportEvent(ctx sdk.Context, sportEventUID string)

RemoveSportEvent removes a sport event from the store

func (Keeper) ResolveSportEvents

func (k Keeper) ResolveSportEvents(ctx sdk.Context, resolutionEvents []types.ResolutionEvent) error

ResolveSportEvents updates a sport event with its resolution

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetSportEvent

func (k Keeper) SetSportEvent(ctx sdk.Context, sportEvent types.SportEvent)

SetSportEvent sets a specific sport event in the store

func (Keeper) SportEvent

SportEvent returns a specific sport events by its UID

func (Keeper) SportEventAll

SportEventAll returns all the sport events

func (Keeper) SportEventExists

func (k Keeper) SportEventExists(ctx sdk.Context, sportEventUID string) bool

SportEventExists checks if a specific sport event exists or not

func (Keeper) SportEventListByUIDs

SportEventListByUIDs return success events and failed events id only back to the caller

Jump to

Keyboard shortcuts

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