keeper

package
v1.7.5-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 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 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 storetypes.StoreKey,
	ps paramtypes.Subspace,
	authority string,
) *Keeper

NewKeeper creates new keeper object

func (Keeper) GetAuthority added in v1.4.5

func (k Keeper) GetAuthority() string

GetAuthority returns the x/market module's authority.

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 (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) Resolve added in v1.0.1

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

Resolve updates a market with its resolution

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) SetOVMKeeper

func (k *Keeper) SetOVMKeeper(ovmKeeper types.OVMKeeper)

SetOVMKeeper sets the ovm module keeper to the market keeper.

func (*Keeper) SetOrderbookKeeper added in v0.0.8

func (k *Keeper) SetOrderbookKeeper(orderBookKeeper types.OrderbookKeeper)

SetOrderbookKeeper sets the orderbook module keeper to the market keeper.

func (Keeper) SetParams

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

SetParams set the params

Jump to

Keyboard shortcuts

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