Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) BatchMarketSettlements(ctx sdk.Context) error
- func (k Keeper) Bet(c context.Context, req *types.QueryBetRequest) (*types.QueryBetResponse, error)
- func (k Keeper) Bets(c context.Context, req *types.QueryBetsRequest) (*types.QueryBetsResponse, error)
- func (k Keeper) BetsByCreator(c context.Context, req *types.QueryBetsByCreatorRequest) (*types.QueryBetsByCreatorResponse, error)
- func (k Keeper) BetsByUIDs(c context.Context, req *types.QueryBetsByUIDsRequest) (*types.QueryBetsByUIDsResponse, error)
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetBet(ctx sdk.Context, creator string, id uint64) (val types.Bet, found bool)
- func (k Keeper) GetBetID(ctx sdk.Context, uid string) (val types.UID2ID, found bool)
- func (k Keeper) GetBetIDs(ctx sdk.Context) (list []types.UID2ID, err error)
- func (k Keeper) GetBetStats(ctx sdk.Context) (val types.BetStats)
- func (k Keeper) GetBets(ctx sdk.Context) (list []types.Bet, err error)
- func (k Keeper) GetConstraints(ctx sdk.Context) (params types.Constraints)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPendingBets(ctx sdk.Context) (list []types.PendingBet, err error)
- func (k Keeper) GetSettledBets(ctx sdk.Context) (list []types.SettledBet, err error)
- func (k Keeper) IsAnyPendingBetForMarket(ctx sdk.Context, marketUID string) (thereIs bool, err error)
- func (Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PendingBets(c context.Context, req *types.QueryPendingBetsRequest) (*types.QueryPendingBetsResponse, error)
- func (k Keeper) PrepareBetObject(ctx sdk.Context, creator string, props *types.WagerProps) (*types.Bet, map[string]*types.BetOddsCompact, error)
- func (k Keeper) RemovePendingBet(ctx sdk.Context, marketUID string, betID uint64)
- func (k Keeper) SetBet(ctx sdk.Context, bet types.Bet, id uint64)
- func (k Keeper) SetBetID(ctx sdk.Context, uid2ID types.UID2ID)
- func (k Keeper) SetBetStats(ctx sdk.Context, stats types.BetStats)
- func (k *Keeper) SetMarketKeeper(marketKeeper types.MarketKeeper)
- func (k *Keeper) SetOVMKeeper(ovmKeeper types.OVMKeeper)
- func (k *Keeper) SetOrderbookKeeper(orderbookKeeper types.OrderbookKeeper)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPendingBet(ctx sdk.Context, pendingBet *types.PendingBet, id uint64, marketUID string)
- func (k Keeper) SetSettledBet(ctx sdk.Context, settledBet *types.SettledBet, id uint64, blockHeight int64)
- func (k Keeper) Settle(ctx sdk.Context, bettorAddressStr, betUID string) error
- func (k Keeper) SettledBetsOfHeight(c context.Context, req *types.QuerySettledBetsOfHeightRequest) (*types.QuerySettledBetsOfHeightResponse, error)
- func (k Keeper) Wager(ctx sdk.Context, bet *types.Bet, betOdds map[string]*types.BetOddsCompact) error
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
}
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) BatchMarketSettlements ¶ added in v0.0.6
BatchMarketSettlements settles bets of resolved markets in batch. The markets get into account in FIFO manner.
func (Keeper) Bet ¶
func (k Keeper) Bet(c context.Context, req *types.QueryBetRequest) (*types.QueryBetResponse, error)
Bet returns a specific bet by its UID
func (Keeper) Bets ¶ added in v0.0.3
func (k Keeper) Bets(c context.Context, req *types.QueryBetsRequest) (*types.QueryBetsResponse, error)
Bets returns all bets
func (Keeper) BetsByCreator ¶ added in v0.0.4
func (k Keeper) BetsByCreator( c context.Context, req *types.QueryBetsByCreatorRequest, ) (*types.QueryBetsByCreatorResponse, error)
BetsByCreator returns all bets of certain creator sort-able by pagination attributes
func (Keeper) BetsByUIDs ¶ added in v0.0.4
func (k Keeper) BetsByUIDs( c context.Context, req *types.QueryBetsByUIDsRequest, ) (*types.QueryBetsByUIDsResponse, error)
BetsByUIDs returns bets with selected uids
func (Keeper) GetAuthority ¶ added in v1.4.5
GetAuthority returns the x/bet module's authority.
func (Keeper) GetBetStats ¶ added in v0.0.4
GetBetStats returns bet stats
func (Keeper) GetConstraints ¶ added in v1.0.0
func (k Keeper) GetConstraints(ctx sdk.Context) (params types.Constraints)
GetConstraints get bet constraint values of the bet wager constraints
func (Keeper) GetPendingBets ¶ added in v0.0.6
GetPendingBets returns list of the pending bets
func (Keeper) GetSettledBets ¶ added in v0.0.5
GetSettledBets returns list of the pending bets
func (Keeper) IsAnyPendingBetForMarket ¶ added in v0.0.6
func (k Keeper) IsAnyPendingBetForMarket(ctx sdk.Context, marketUID string) (thereIs bool, err error)
IsAnyPendingBetForMarket checks if there is any pending bet for the market
func (Keeper) Params ¶ added in v0.0.5
func (k Keeper) Params( c context.Context, req *types.QueryParamsRequest, ) (*types.QueryParamsResponse, error)
Params returns the params of the module
func (Keeper) PendingBets ¶ added in v0.0.6
func (k Keeper) PendingBets( c context.Context, req *types.QueryPendingBetsRequest, ) (*types.QueryPendingBetsResponse, error)
PendingBets returns pending bets of a market
func (Keeper) PrepareBetObject ¶ added in v1.3.0
func (Keeper) RemovePendingBet ¶ added in v0.0.6
RemovePendingBet removes an pending bet
func (Keeper) SetBetStats ¶ added in v0.0.4
SetBetStats sets bet statistics in the store
func (*Keeper) SetMarketKeeper ¶ added in v0.0.6
func (k *Keeper) SetMarketKeeper(marketKeeper types.MarketKeeper)
SetMarketKeeper sets market keeper to the bet keeper.
func (*Keeper) SetOVMKeeper ¶ added in v0.0.6
SetOVMKeeper sets ovm keeper to the bet keeper.
func (*Keeper) SetOrderbookKeeper ¶ added in v0.0.8
func (k *Keeper) SetOrderbookKeeper(orderbookKeeper types.OrderbookKeeper)
SetOrderbookKeeper sets orderbook keeper to the bet keeper.
func (Keeper) SetPendingBet ¶ added in v0.0.6
func (k Keeper) SetPendingBet( ctx sdk.Context, pendingBet *types.PendingBet, id uint64, marketUID string, )
SetPendingBet sets an pending bet
func (Keeper) SetSettledBet ¶ added in v0.0.5
func (k Keeper) SetSettledBet( ctx sdk.Context, settledBet *types.SettledBet, id uint64, blockHeight int64, )
SetSettledBet sets a settled bet
func (Keeper) SettledBetsOfHeight ¶ added in v0.0.5
func (k Keeper) SettledBetsOfHeight( c context.Context, req *types.QuerySettledBetsOfHeightRequest, ) (*types.QuerySettledBetsOfHeightResponse, error)
SettledBetsOfHeight returns settled bets of a certain height