keeper

package
v0.0.0-...-3ec3047 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 14 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
}

Keeper is the type for module properties

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey sdk.StoreKey,
	ps paramtypes.Subspace,
) *Keeper

NewKeeper creates new keeper object

func (Keeper) GetDefaultBetConstraints

func (k Keeper) GetDefaultBetConstraints(ctx sdk.Context) (params *types.MarketBetConstraints)

GetDefaultBetConstraints get bet constraint values of the bet constraints

func (Keeper) GetFirstUnsettledResolvedMarket

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

GetFirstUnsettledResolvedMarket returns first element of resolved markets that have active bets

func (Keeper) GetMarket

func (k Keeper) GetMarket(ctx sdk.Context, marketUID string) (val types.Market, found bool)

GetMarket returns a specific market by its UID

func (Keeper) GetMarketStats

func (k Keeper) GetMarketStats(ctx sdk.Context) (val types.MarketStats)

GetMarketStats returns market stats

func (Keeper) GetMarkets

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

GetMarkets returns all markets

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params 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) Market

Market returns a specific markets by its UID

func (Keeper) MarketExists

func (k Keeper) MarketExists(ctx sdk.Context, marketUID string) bool

MarketExists checks if a specific market exists or not

func (Keeper) Markets

Markets returns all the markets

func (Keeper) MarketsByUIDs

MarketsByUIDs return success markets and failed markets by uids back to the caller

func (Keeper) Params

Params returns the params of the module

func (Keeper) RemoveUnsettledResolvedMarket

func (k Keeper) RemoveUnsettledResolvedMarket(ctx sdk.Context, marketUID string)

RemoveUnsettledResolvedMarket removes resolved market from the statistics

func (Keeper) ResolveMarket

func (k Keeper) ResolveMarket(ctx sdk.Context, storedMarket types.Market, resolutionMarket *types.MarketResolutionTicketPayload) *types.Market

ResolveMarket updates a market with its resolution

func (*Keeper) SetDVMKeeper

func (k *Keeper) SetDVMKeeper(dvmKeeper types.DVMKeeper)

SetDVMKeeper sets the dvm module keeper to the market keeper.

func (Keeper) SetMarket

func (k Keeper) SetMarket(ctx sdk.Context, market types.Market)

SetMarket sets a specific market in the store

func (Keeper) SetMarketStats

func (k Keeper) SetMarketStats(ctx sdk.Context, stats types.MarketStats)

SetMarketStats sets market statistics in the store

func (Keeper) SetParams

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

SetParams set the params

func (*Keeper) SetSRKeeper

func (k *Keeper) SetSRKeeper(srKeeper types.SRKeeper)

SetSRKeeper sets the sr module keeper to the market keeper.

Jump to

Keyboard shortcuts

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