Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) ActiveBets(c context.Context, req *types.QueryActiveBetsRequest) (*types.QueryActiveBetsResponse, error)
- func (k Keeper) BatchSportEventSettlements(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) GetActiveBets(ctx sdk.Context) (list []types.ActiveBet, err 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) GetSettledBets(ctx sdk.Context) (list []types.SettledBet, err error)
- func (k Keeper) IsAnyActiveBetForSportEvent(ctx sdk.Context, sportEventUID 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) PlaceBet(ctx sdk.Context, bet *types.Bet) error
- func (k Keeper) RemoveActiveBet(ctx sdk.Context, sportEventUID string, betID uint64)
- func (k Keeper) SetActiveBet(ctx sdk.Context, activeBet *types.ActiveBet, id uint64, sportEventUID string)
- 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) SetOrderBookKeeper(orderBookKeeper types.OrderBookKeeper)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetSettledBet(ctx sdk.Context, settledBet *types.SettledBet, id uint64, blockHeight int64)
- func (k *Keeper) SetSportEventKeeper(sportEventKeeper types.SportEventKeeper)
- 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) ActiveBets ¶
func (k Keeper) ActiveBets(c context.Context, req *types.QueryActiveBetsRequest) (*types.QueryActiveBetsResponse, error)
ActiveBets returns active bets of a sport-event
func (Keeper) BatchSportEventSettlements ¶
BatchSportEventSettlements settles bets of resolved sport-events in batch. The sport-events get into account according in FIFO.
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)
Bets 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)
Bets returns bets with selected uids
func (Keeper) GetActiveBets ¶
GetActiveBets returns list of the active bets
func (Keeper) GetBetStats ¶
GetBet returns bet stats
func (Keeper) GetSettledBets ¶
GetSettledBets returns list of the active bets
func (Keeper) IsAnyActiveBetForSportEvent ¶
func (k Keeper) IsAnyActiveBetForSportEvent(ctx sdk.Context, sportEventUID string) (thereIs bool, err error)
IsAnyActiveBetForSportEvent checks if there is any active bet for the sport-event
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) RemoveActiveBet ¶
RemoveActiveBet removes an active bet
func (Keeper) SetActiveBet ¶
func (k Keeper) SetActiveBet(ctx sdk.Context, activeBet *types.ActiveBet, id uint64, sportEventUID string)
SetActiveBet sets an active bet
func (Keeper) SetBetStats ¶
SetBetStats sets bet statistics in the store
func (*Keeper) SetDVMKeeper ¶
SetDVMKeeper sets dvm keeper to the bet keeper.
func (*Keeper) SetOrderBookKeeper ¶
func (k *Keeper) SetOrderBookKeeper(orderBookKeeper types.OrderBookKeeper)
SetOrderBookKeeper sets order book 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) SetSportEventKeeper ¶
func (k *Keeper) SetSportEventKeeper(sportEventKeeper types.SportEventKeeper)
SetSportEventKeeper sets sport-event keeper to the bet keeper.
func (Keeper) SettledBetsOfHeight ¶
func (k Keeper) SettledBetsOfHeight(c context.Context, req *types.QuerySettledBetsOfHeightRequest) (*types.QuerySettledBetsOfHeightResponse, error)
SettledBetsOfHeight returns settled bets of a certain height