keeper

package
v0.0.0-...-325c2d7 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KycValidation

func KycValidation(address string,
	ticket *types.BetPlacementTicketPayload) bool

KycValidation checks whether the kyc data is valid for a particular bettor if the kyc is required

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 {
	SporteventKeeper       types.SporteventKeeper
	StrategicreserveKeeper types.StrategicreserveKeeper
	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) Bet

Bet returns a specific bet by its UID

func (Keeper) Bets

Bets returns all bets

func (Keeper) GetBet

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

GetBet returns a bet by its UID

func (Keeper) GetBets

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

GetBets returns list of bets

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) Logger

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

Logger returns the logger of the keeper

func (Keeper) PlaceBet

func (k Keeper) PlaceBet(ctx sdk.Context, bet *types.Bet) error

PlaceBet stores a new bet in KVStore

func (Keeper) SetBet

func (k Keeper) SetBet(ctx sdk.Context, bet types.Bet)

SetBet sets a specific bet in the store

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SettleBet

func (k Keeper) SettleBet(ctx sdk.Context, betUID string) error

SettleBet settles a single bet and updates it in KVStore

Jump to

Keyboard shortcuts

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