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) 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) 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 (k 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) PlaceBet(ctx sdk.Context, bet *types.Bet) 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) SetDVMKeeper(dvmKeeper types.DVMKeeper)
- func (k *Keeper) SetMarketKeeper(marketKeeper types.MarketKeeper)
- 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) SetSRKeeper(srKeeper types.SRKeeper)
- func (k Keeper) SetSettledBet(ctx sdk.Context, settledBet *types.SettledBet, id uint64, blockHeight int64)
- func (k Keeper) SettleBet(ctx sdk.Context, bettorAddressStr, betUID string) error
- func (k Keeper) SettledBetsOfHeight(c context.Context, req *types.QuerySettledBetsOfHeightRequest) (*types.QuerySettledBetsOfHeightResponse, 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 sdk.StoreKey, ps paramtypes.Subspace, ) *Keeper
NewKeeper creates new keeper object
func (Keeper) BatchMarketSettlements ¶
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 ¶
func (k Keeper) Bets(c context.Context, req *types.QueryBetsRequest) (*types.QueryBetsResponse, error)
Bets returns all bets
func (Keeper) BetsByCreator ¶
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 ¶
func (k Keeper) BetsByUIDs(c context.Context, req *types.QueryBetsByUIDsRequest) (*types.QueryBetsByUIDsResponse, error)
BetsByUIDs returns bets with selected uids
func (Keeper) GetBetStats ¶
GetBetStats returns bet stats
func (Keeper) GetPendingBets ¶
GetPendingBets returns list of the pending bets
func (Keeper) GetSettledBets ¶
GetSettledBets returns list of the pending bets
func (Keeper) IsAnyPendingBetForMarket ¶
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 ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params returns the params of the module
func (Keeper) PendingBets ¶
func (k Keeper) PendingBets(c context.Context, req *types.QueryPendingBetsRequest) (*types.QueryPendingBetsResponse, error)
PendingBets returns pending bets of a market
func (Keeper) RemovePendingBet ¶
RemovePendingBet removes an pending bet
func (Keeper) SetBetStats ¶
SetBetStats sets bet statistics in the store
func (*Keeper) SetDVMKeeper ¶
SetDVMKeeper sets dvm keeper to the bet keeper.
func (*Keeper) SetMarketKeeper ¶
func (k *Keeper) SetMarketKeeper(marketKeeper types.MarketKeeper)
SetMarketKeeper sets market keeper to the bet keeper.
func (Keeper) SetPendingBet ¶
func (k Keeper) SetPendingBet(ctx sdk.Context, pendingBet *types.PendingBet, id uint64, marketUID string)
SetPendingBet sets an pending bet
func (*Keeper) SetSRKeeper ¶
SetSRKeeper sets sr keeper to the bet keeper.
func (Keeper) SetSettledBet ¶
func (k Keeper) SetSettledBet(ctx sdk.Context, settledBet *types.SettledBet, id uint64, blockHeight int64)
SetSettledBet sets a settled bet
func (Keeper) SettledBetsOfHeight ¶
func (k Keeper) SettledBetsOfHeight(c context.Context, req *types.QuerySettledBetsOfHeightRequest) (*types.QuerySettledBetsOfHeightResponse, error)
SettledBetsOfHeight returns settled bets of a certain height