Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func ActiveBeOfSportEventKey(sportEventID string, id uint64) []byte
- func ActiveBetListOfSportEventPrefix(sportEventID string) []byte
- func BetFieldsValidation(bet *PlaceBetFields) error
- func BetIDKey(creator string, id uint64) []byte
- func BetListByCreatorPrefix(creator string) []byte
- func CalculateBetAmount(oddsType OddsType, oddsVal string, payoutProfit sdk.Dec) (sdk.Dec, error)
- func CalculatePayoutProfit(oddsType OddsType, oddsVal string, amount sdk.Int) (sdk.Dec, error)
- func IsValidUID(uid string) bool
- func ParamKeyTable() paramtypes.KeyTable
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func SettledBeOfSportEventKey(blockHeight int64, id uint64) []byte
- func SettledBetListOfBlockHeightPrefix(blockHeight int64) []byte
- type AccountKeeper
- type ActiveBet
- func (*ActiveBet) Descriptor() ([]byte, []int)
- func (m *ActiveBet) GetCreator() string
- func (m *ActiveBet) GetUID() string
- func (m *ActiveBet) Marshal() (dAtA []byte, err error)
- func (m *ActiveBet) MarshalTo(dAtA []byte) (int, error)
- func (m *ActiveBet) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ActiveBet) ProtoMessage()
- func (m *ActiveBet) Reset()
- func (m *ActiveBet) Size() (n int)
- func (m *ActiveBet) String() string
- func (m *ActiveBet) Unmarshal(dAtA []byte) error
- func (m *ActiveBet) XXX_DiscardUnknown()
- func (m *ActiveBet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ActiveBet) XXX_Merge(src proto.Message)
- func (m *ActiveBet) XXX_Size() int
- func (m *ActiveBet) XXX_Unmarshal(b []byte) error
- type BankKeeper
- type Bet
- func (*Bet) Descriptor() ([]byte, []int)
- func (m *Bet) GetBetFulfillment() []*BetFulfillment
- func (m *Bet) GetCreatedAt() int64
- func (m *Bet) GetCreator() string
- func (m *Bet) GetOddsType() OddsType
- func (m *Bet) GetOddsUID() string
- func (m *Bet) GetOddsValue() string
- func (m *Bet) GetResult() Bet_Result
- func (m *Bet) GetSettlementHeight() int64
- func (m *Bet) GetSportEventUID() string
- func (m *Bet) GetStatus() Bet_Status
- func (m *Bet) GetUID() string
- func (m *Bet) Marshal() (dAtA []byte, err error)
- func (m *Bet) MarshalTo(dAtA []byte) (int, error)
- func (m *Bet) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Bet) ProtoMessage()
- func (m *Bet) Reset()
- func (m *Bet) Size() (n int)
- func (m *Bet) String() string
- func (m *Bet) Unmarshal(dAtA []byte) error
- func (m *Bet) XXX_DiscardUnknown()
- func (m *Bet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Bet) XXX_Merge(src proto.Message)
- func (m *Bet) XXX_Size() int
- func (m *Bet) XXX_Unmarshal(b []byte) error
- type BetFulfillment
- func (*BetFulfillment) Descriptor() ([]byte, []int)
- func (m *BetFulfillment) GetParticipantAddress() string
- func (m *BetFulfillment) GetParticipationIndex() uint64
- func (m *BetFulfillment) Marshal() (dAtA []byte, err error)
- func (m *BetFulfillment) MarshalTo(dAtA []byte) (int, error)
- func (m *BetFulfillment) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BetFulfillment) ProtoMessage()
- func (m *BetFulfillment) Reset()
- func (m *BetFulfillment) Size() (n int)
- func (m *BetFulfillment) String() string
- func (m *BetFulfillment) Unmarshal(dAtA []byte) error
- func (m *BetFulfillment) XXX_DiscardUnknown()
- func (m *BetFulfillment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BetFulfillment) XXX_Merge(src proto.Message)
- func (m *BetFulfillment) XXX_Size() int
- func (m *BetFulfillment) XXX_Unmarshal(b []byte) error
- type BetOdds
- func (*BetOdds) Descriptor() ([]byte, []int)
- func (m *BetOdds) GetSportEventUID() string
- func (m *BetOdds) GetUID() string
- func (m *BetOdds) GetValue() string
- func (m *BetOdds) Marshal() (dAtA []byte, err error)
- func (m *BetOdds) MarshalTo(dAtA []byte) (int, error)
- func (m *BetOdds) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BetOdds) ProtoMessage()
- func (m *BetOdds) Reset()
- func (m *BetOdds) Size() (n int)
- func (m *BetOdds) String() string
- func (m *BetOdds) Unmarshal(dAtA []byte) error
- func (m *BetOdds) XXX_DiscardUnknown()
- func (m *BetOdds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BetOdds) XXX_Merge(src proto.Message)
- func (m *BetOdds) XXX_Size() int
- func (m *BetOdds) XXX_Unmarshal(b []byte) error
- type BetPlacementTicketPayload
- func (*BetPlacementTicketPayload) Descriptor() ([]byte, []int)
- func (m *BetPlacementTicketPayload) GetKycData() KycDataPayload
- func (m *BetPlacementTicketPayload) GetOddsType() OddsType
- func (m *BetPlacementTicketPayload) GetSelectedOdds() *BetOdds
- func (m *BetPlacementTicketPayload) Marshal() (dAtA []byte, err error)
- func (m *BetPlacementTicketPayload) MarshalTo(dAtA []byte) (int, error)
- func (m *BetPlacementTicketPayload) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BetPlacementTicketPayload) ProtoMessage()
- func (m *BetPlacementTicketPayload) Reset()
- func (m *BetPlacementTicketPayload) Size() (n int)
- func (m *BetPlacementTicketPayload) String() string
- func (m *BetPlacementTicketPayload) Unmarshal(dAtA []byte) error
- func (ticketData *BetPlacementTicketPayload) Validate(creator string) error
- func (m *BetPlacementTicketPayload) XXX_DiscardUnknown()
- func (m *BetPlacementTicketPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BetPlacementTicketPayload) XXX_Merge(src proto.Message)
- func (m *BetPlacementTicketPayload) XXX_Size() int
- func (m *BetPlacementTicketPayload) XXX_Unmarshal(b []byte) error
- type BetStats
- func (*BetStats) Descriptor() ([]byte, []int)
- func (m *BetStats) GetCount() uint64
- func (m *BetStats) Marshal() (dAtA []byte, err error)
- func (m *BetStats) MarshalTo(dAtA []byte) (int, error)
- func (m *BetStats) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BetStats) ProtoMessage()
- func (m *BetStats) Reset()
- func (m *BetStats) Size() (n int)
- func (m *BetStats) String() string
- func (m *BetStats) Unmarshal(dAtA []byte) error
- func (m *BetStats) XXX_DiscardUnknown()
- func (m *BetStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BetStats) XXX_Merge(src proto.Message)
- func (m *BetStats) XXX_Size() int
- func (m *BetStats) XXX_Unmarshal(b []byte) error
- type Bet_Result
- type Bet_Status
- type DVMKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetActiveBetList() []ActiveBet
- func (m *GenesisState) GetBetList() []Bet
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetSettledBetList() []SettledBet
- func (m *GenesisState) GetStats() BetStats
- func (m *GenesisState) GetUid2IdList() []UID2ID
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type KycDataPayload
- func (*KycDataPayload) Descriptor() ([]byte, []int)
- func (m *KycDataPayload) GetApproved() bool
- func (m *KycDataPayload) GetID() string
- func (m *KycDataPayload) GetIgnore() bool
- func (m *KycDataPayload) Marshal() (dAtA []byte, err error)
- func (m *KycDataPayload) MarshalTo(dAtA []byte) (int, error)
- func (m *KycDataPayload) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*KycDataPayload) ProtoMessage()
- func (m *KycDataPayload) Reset()
- func (m *KycDataPayload) Size() (n int)
- func (m *KycDataPayload) String() string
- func (m *KycDataPayload) Unmarshal(dAtA []byte) error
- func (m *KycDataPayload) XXX_DiscardUnknown()
- func (m *KycDataPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *KycDataPayload) XXX_Merge(src proto.Message)
- func (m *KycDataPayload) XXX_Size() int
- func (m *KycDataPayload) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgPlaceBet
- func (*MsgPlaceBet) Descriptor() ([]byte, []int)
- func (m *MsgPlaceBet) GetBet() *PlaceBetFields
- func (m *MsgPlaceBet) GetCreator() string
- func (msg *MsgPlaceBet) GetSignBytes() []byte
- func (msg *MsgPlaceBet) GetSigners() []sdk.AccAddress
- func (m *MsgPlaceBet) Marshal() (dAtA []byte, err error)
- func (m *MsgPlaceBet) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgPlaceBet) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgPlaceBet) ProtoMessage()
- func (m *MsgPlaceBet) Reset()
- func (msg *MsgPlaceBet) Route() string
- func (m *MsgPlaceBet) Size() (n int)
- func (m *MsgPlaceBet) String() string
- func (msg *MsgPlaceBet) Type() string
- func (m *MsgPlaceBet) Unmarshal(dAtA []byte) error
- func (msg *MsgPlaceBet) ValidateBasic() error
- func (m *MsgPlaceBet) XXX_DiscardUnknown()
- func (m *MsgPlaceBet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgPlaceBet) XXX_Merge(src proto.Message)
- func (m *MsgPlaceBet) XXX_Size() int
- func (m *MsgPlaceBet) XXX_Unmarshal(b []byte) error
- type MsgPlaceBetResponse
- func (*MsgPlaceBetResponse) Descriptor() ([]byte, []int)
- func (m *MsgPlaceBetResponse) GetBet() *PlaceBetFields
- func (m *MsgPlaceBetResponse) GetError() string
- func (m *MsgPlaceBetResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgPlaceBetResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgPlaceBetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgPlaceBetResponse) ProtoMessage()
- func (m *MsgPlaceBetResponse) Reset()
- func (m *MsgPlaceBetResponse) Size() (n int)
- func (m *MsgPlaceBetResponse) String() string
- func (m *MsgPlaceBetResponse) Unmarshal(dAtA []byte) error
- func (m *MsgPlaceBetResponse) XXX_DiscardUnknown()
- func (m *MsgPlaceBetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgPlaceBetResponse) XXX_Merge(src proto.Message)
- func (m *MsgPlaceBetResponse) XXX_Size() int
- func (m *MsgPlaceBetResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type OddsType
- type OddsTypeI
- type OrderBookKeeper
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetBatchSettlementCount() uint32
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type PlaceBetFields
- func (*PlaceBetFields) Descriptor() ([]byte, []int)
- func (m *PlaceBetFields) GetTicket() string
- func (m *PlaceBetFields) GetUID() string
- func (m *PlaceBetFields) Marshal() (dAtA []byte, err error)
- func (m *PlaceBetFields) MarshalTo(dAtA []byte) (int, error)
- func (m *PlaceBetFields) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PlaceBetFields) ProtoMessage()
- func (m *PlaceBetFields) Reset()
- func (m *PlaceBetFields) Size() (n int)
- func (m *PlaceBetFields) String() string
- func (m *PlaceBetFields) Unmarshal(dAtA []byte) error
- func (m *PlaceBetFields) XXX_DiscardUnknown()
- func (m *PlaceBetFields) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PlaceBetFields) XXX_Merge(src proto.Message)
- func (m *PlaceBetFields) XXX_Size() int
- func (m *PlaceBetFields) XXX_Unmarshal(b []byte) error
- type QueryActiveBetsRequest
- func (*QueryActiveBetsRequest) Descriptor() ([]byte, []int)
- func (m *QueryActiveBetsRequest) GetPagination() *query.PageRequest
- func (m *QueryActiveBetsRequest) GetSportEventUid() string
- func (m *QueryActiveBetsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryActiveBetsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryActiveBetsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryActiveBetsRequest) ProtoMessage()
- func (m *QueryActiveBetsRequest) Reset()
- func (m *QueryActiveBetsRequest) Size() (n int)
- func (m *QueryActiveBetsRequest) String() string
- func (m *QueryActiveBetsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryActiveBetsRequest) XXX_DiscardUnknown()
- func (m *QueryActiveBetsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryActiveBetsRequest) XXX_Merge(src proto.Message)
- func (m *QueryActiveBetsRequest) XXX_Size() int
- func (m *QueryActiveBetsRequest) XXX_Unmarshal(b []byte) error
- type QueryActiveBetsResponse
- func (*QueryActiveBetsResponse) Descriptor() ([]byte, []int)
- func (m *QueryActiveBetsResponse) GetBet() []Bet
- func (m *QueryActiveBetsResponse) GetPagination() *query.PageResponse
- func (m *QueryActiveBetsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryActiveBetsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryActiveBetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryActiveBetsResponse) ProtoMessage()
- func (m *QueryActiveBetsResponse) Reset()
- func (m *QueryActiveBetsResponse) Size() (n int)
- func (m *QueryActiveBetsResponse) String() string
- func (m *QueryActiveBetsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryActiveBetsResponse) XXX_DiscardUnknown()
- func (m *QueryActiveBetsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryActiveBetsResponse) XXX_Merge(src proto.Message)
- func (m *QueryActiveBetsResponse) XXX_Size() int
- func (m *QueryActiveBetsResponse) XXX_Unmarshal(b []byte) error
- type QueryBetRequest
- func (*QueryBetRequest) Descriptor() ([]byte, []int)
- func (m *QueryBetRequest) GetCreator() string
- func (m *QueryBetRequest) GetUid() string
- func (m *QueryBetRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryBetRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBetRequest) ProtoMessage()
- func (m *QueryBetRequest) Reset()
- func (m *QueryBetRequest) Size() (n int)
- func (m *QueryBetRequest) String() string
- func (m *QueryBetRequest) Unmarshal(dAtA []byte) error
- func (m *QueryBetRequest) XXX_DiscardUnknown()
- func (m *QueryBetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBetRequest) XXX_Merge(src proto.Message)
- func (m *QueryBetRequest) XXX_Size() int
- func (m *QueryBetRequest) XXX_Unmarshal(b []byte) error
- type QueryBetResponse
- func (*QueryBetResponse) Descriptor() ([]byte, []int)
- func (m *QueryBetResponse) GetBet() Bet
- func (m *QueryBetResponse) GetSportEvent() types.SportEvent
- func (m *QueryBetResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryBetResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBetResponse) ProtoMessage()
- func (m *QueryBetResponse) Reset()
- func (m *QueryBetResponse) Size() (n int)
- func (m *QueryBetResponse) String() string
- func (m *QueryBetResponse) Unmarshal(dAtA []byte) error
- func (m *QueryBetResponse) XXX_DiscardUnknown()
- func (m *QueryBetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBetResponse) XXX_Merge(src proto.Message)
- func (m *QueryBetResponse) XXX_Size() int
- func (m *QueryBetResponse) XXX_Unmarshal(b []byte) error
- type QueryBetsByCreatorRequest
- func (*QueryBetsByCreatorRequest) Descriptor() ([]byte, []int)
- func (m *QueryBetsByCreatorRequest) GetCreator() string
- func (m *QueryBetsByCreatorRequest) GetPagination() *query.PageRequest
- func (m *QueryBetsByCreatorRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryBetsByCreatorRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBetsByCreatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBetsByCreatorRequest) ProtoMessage()
- func (m *QueryBetsByCreatorRequest) Reset()
- func (m *QueryBetsByCreatorRequest) Size() (n int)
- func (m *QueryBetsByCreatorRequest) String() string
- func (m *QueryBetsByCreatorRequest) Unmarshal(dAtA []byte) error
- func (m *QueryBetsByCreatorRequest) XXX_DiscardUnknown()
- func (m *QueryBetsByCreatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBetsByCreatorRequest) XXX_Merge(src proto.Message)
- func (m *QueryBetsByCreatorRequest) XXX_Size() int
- func (m *QueryBetsByCreatorRequest) XXX_Unmarshal(b []byte) error
- type QueryBetsByCreatorResponse
- func (*QueryBetsByCreatorResponse) Descriptor() ([]byte, []int)
- func (m *QueryBetsByCreatorResponse) GetBet() []Bet
- func (m *QueryBetsByCreatorResponse) GetPagination() *query.PageResponse
- func (m *QueryBetsByCreatorResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryBetsByCreatorResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBetsByCreatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBetsByCreatorResponse) ProtoMessage()
- func (m *QueryBetsByCreatorResponse) Reset()
- func (m *QueryBetsByCreatorResponse) Size() (n int)
- func (m *QueryBetsByCreatorResponse) String() string
- func (m *QueryBetsByCreatorResponse) Unmarshal(dAtA []byte) error
- func (m *QueryBetsByCreatorResponse) XXX_DiscardUnknown()
- func (m *QueryBetsByCreatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBetsByCreatorResponse) XXX_Merge(src proto.Message)
- func (m *QueryBetsByCreatorResponse) XXX_Size() int
- func (m *QueryBetsByCreatorResponse) XXX_Unmarshal(b []byte) error
- type QueryBetsByUIDsRequest
- func (*QueryBetsByUIDsRequest) Descriptor() ([]byte, []int)
- func (m *QueryBetsByUIDsRequest) GetItems() []*QueryBetRequest
- func (m *QueryBetsByUIDsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryBetsByUIDsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBetsByUIDsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBetsByUIDsRequest) ProtoMessage()
- func (m *QueryBetsByUIDsRequest) Reset()
- func (m *QueryBetsByUIDsRequest) Size() (n int)
- func (m *QueryBetsByUIDsRequest) String() string
- func (m *QueryBetsByUIDsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryBetsByUIDsRequest) XXX_DiscardUnknown()
- func (m *QueryBetsByUIDsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBetsByUIDsRequest) XXX_Merge(src proto.Message)
- func (m *QueryBetsByUIDsRequest) XXX_Size() int
- func (m *QueryBetsByUIDsRequest) XXX_Unmarshal(b []byte) error
- type QueryBetsByUIDsResponse
- func (*QueryBetsByUIDsResponse) Descriptor() ([]byte, []int)
- func (m *QueryBetsByUIDsResponse) GetBets() []Bet
- func (m *QueryBetsByUIDsResponse) GetNotFoundEvents() []string
- func (m *QueryBetsByUIDsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryBetsByUIDsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBetsByUIDsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBetsByUIDsResponse) ProtoMessage()
- func (m *QueryBetsByUIDsResponse) Reset()
- func (m *QueryBetsByUIDsResponse) Size() (n int)
- func (m *QueryBetsByUIDsResponse) String() string
- func (m *QueryBetsByUIDsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryBetsByUIDsResponse) XXX_DiscardUnknown()
- func (m *QueryBetsByUIDsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBetsByUIDsResponse) XXX_Merge(src proto.Message)
- func (m *QueryBetsByUIDsResponse) XXX_Size() int
- func (m *QueryBetsByUIDsResponse) XXX_Unmarshal(b []byte) error
- type QueryBetsRequest
- func (*QueryBetsRequest) Descriptor() ([]byte, []int)
- func (m *QueryBetsRequest) GetPagination() *query.PageRequest
- func (m *QueryBetsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryBetsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBetsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBetsRequest) ProtoMessage()
- func (m *QueryBetsRequest) Reset()
- func (m *QueryBetsRequest) Size() (n int)
- func (m *QueryBetsRequest) String() string
- func (m *QueryBetsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryBetsRequest) XXX_DiscardUnknown()
- func (m *QueryBetsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBetsRequest) XXX_Merge(src proto.Message)
- func (m *QueryBetsRequest) XXX_Size() int
- func (m *QueryBetsRequest) XXX_Unmarshal(b []byte) error
- type QueryBetsResponse
- func (*QueryBetsResponse) Descriptor() ([]byte, []int)
- func (m *QueryBetsResponse) GetBet() []Bet
- func (m *QueryBetsResponse) GetPagination() *query.PageResponse
- func (m *QueryBetsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryBetsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBetsResponse) ProtoMessage()
- func (m *QueryBetsResponse) Reset()
- func (m *QueryBetsResponse) Size() (n int)
- func (m *QueryBetsResponse) String() string
- func (m *QueryBetsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryBetsResponse) XXX_DiscardUnknown()
- func (m *QueryBetsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBetsResponse) XXX_Merge(src proto.Message)
- func (m *QueryBetsResponse) XXX_Size() int
- func (m *QueryBetsResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type QuerySettledBetsOfHeightRequest
- func (*QuerySettledBetsOfHeightRequest) Descriptor() ([]byte, []int)
- func (m *QuerySettledBetsOfHeightRequest) GetBlockHeight() int64
- func (m *QuerySettledBetsOfHeightRequest) GetPagination() *query.PageRequest
- func (m *QuerySettledBetsOfHeightRequest) Marshal() (dAtA []byte, err error)
- func (m *QuerySettledBetsOfHeightRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QuerySettledBetsOfHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuerySettledBetsOfHeightRequest) ProtoMessage()
- func (m *QuerySettledBetsOfHeightRequest) Reset()
- func (m *QuerySettledBetsOfHeightRequest) Size() (n int)
- func (m *QuerySettledBetsOfHeightRequest) String() string
- func (m *QuerySettledBetsOfHeightRequest) Unmarshal(dAtA []byte) error
- func (m *QuerySettledBetsOfHeightRequest) XXX_DiscardUnknown()
- func (m *QuerySettledBetsOfHeightRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuerySettledBetsOfHeightRequest) XXX_Merge(src proto.Message)
- func (m *QuerySettledBetsOfHeightRequest) XXX_Size() int
- func (m *QuerySettledBetsOfHeightRequest) XXX_Unmarshal(b []byte) error
- type QuerySettledBetsOfHeightResponse
- func (*QuerySettledBetsOfHeightResponse) Descriptor() ([]byte, []int)
- func (m *QuerySettledBetsOfHeightResponse) GetBet() []Bet
- func (m *QuerySettledBetsOfHeightResponse) GetPagination() *query.PageResponse
- func (m *QuerySettledBetsOfHeightResponse) Marshal() (dAtA []byte, err error)
- func (m *QuerySettledBetsOfHeightResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QuerySettledBetsOfHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuerySettledBetsOfHeightResponse) ProtoMessage()
- func (m *QuerySettledBetsOfHeightResponse) Reset()
- func (m *QuerySettledBetsOfHeightResponse) Size() (n int)
- func (m *QuerySettledBetsOfHeightResponse) String() string
- func (m *QuerySettledBetsOfHeightResponse) Unmarshal(dAtA []byte) error
- func (m *QuerySettledBetsOfHeightResponse) XXX_DiscardUnknown()
- func (m *QuerySettledBetsOfHeightResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuerySettledBetsOfHeightResponse) XXX_Merge(src proto.Message)
- func (m *QuerySettledBetsOfHeightResponse) XXX_Size() int
- func (m *QuerySettledBetsOfHeightResponse) XXX_Unmarshal(b []byte) error
- type SettledBet
- func (*SettledBet) Descriptor() ([]byte, []int)
- func (m *SettledBet) GetBettorAddress() string
- func (m *SettledBet) GetUID() string
- func (m *SettledBet) Marshal() (dAtA []byte, err error)
- func (m *SettledBet) MarshalTo(dAtA []byte) (int, error)
- func (m *SettledBet) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SettledBet) ProtoMessage()
- func (m *SettledBet) Reset()
- func (m *SettledBet) Size() (n int)
- func (m *SettledBet) String() string
- func (m *SettledBet) Unmarshal(dAtA []byte) error
- func (m *SettledBet) XXX_DiscardUnknown()
- func (m *SettledBet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SettledBet) XXX_Merge(src proto.Message)
- func (m *SettledBet) XXX_Size() int
- func (m *SettledBet) XXX_Unmarshal(b []byte) error
- type SportEventKeeper
- type UID2ID
- func (*UID2ID) Descriptor() ([]byte, []int)
- func (m *UID2ID) GetID() uint64
- func (m *UID2ID) GetUID() string
- func (m *UID2ID) Marshal() (dAtA []byte, err error)
- func (m *UID2ID) MarshalTo(dAtA []byte) (int, error)
- func (m *UID2ID) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*UID2ID) ProtoMessage()
- func (m *UID2ID) Reset()
- func (m *UID2ID) Size() (n int)
- func (m *UID2ID) String() string
- func (m *UID2ID) Unmarshal(dAtA []byte) error
- func (m *UID2ID) XXX_DiscardUnknown()
- func (m *UID2ID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UID2ID) XXX_Merge(src proto.Message)
- func (m *UID2ID) XXX_Size() int
- func (m *UID2ID) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) ActiveBets(ctx context.Context, req *QueryActiveBetsRequest) (*QueryActiveBetsResponse, error)
- func (*UnimplementedQueryServer) Bet(ctx context.Context, req *QueryBetRequest) (*QueryBetResponse, error)
- func (*UnimplementedQueryServer) Bets(ctx context.Context, req *QueryBetsRequest) (*QueryBetsResponse, error)
- func (*UnimplementedQueryServer) BetsByCreator(ctx context.Context, req *QueryBetsByCreatorRequest) (*QueryBetsByCreatorResponse, error)
- func (*UnimplementedQueryServer) BetsByUIDs(ctx context.Context, req *QueryBetsByUIDsRequest) (*QueryBetsByUIDsResponse, error)
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- func (*UnimplementedQueryServer) SettledBetsOfHeight(ctx context.Context, req *QuerySettledBetsOfHeightRequest) (*QuerySettledBetsOfHeightResponse, error)
Constants ¶
const ( ErrTextInvalidParamType = "invalid parameter type: %T" ErrTextBatchSettlementCountMustBePositive = "batch settlement count should be a positive number %d" ErrTextInvalidCreator = "invalid creator address (%s)" ErrTextInitGenesisFailedBecauseOfMissingBetID = "no bet id found for the bet with uuid (%s)" ErrTextInitGenesisFailedBecauseOfNotEqualStats = "bet list items count (%d) is not equal to stats count (%d)" ErrTextInitGenesisFailedBetCountNotEqualActiveAndSettled = "sum of active and settled list items count (%d) is not equal to bet list items count (%d)" ErrTextInitGenesisFailedNotActiveOrSettled = "bet is not active nor settled with uuid (%s)" ErrTextInitGenesisFailedSettlementHeightIsZero = "settlement height can not be zero for the settled bet with uuid (%s)" ErrTextInitGenesisFailedSettlementHeightIsZeroForList = "settlement height can not be zero for a bet in the settled bet list with uuid (%s)" ErrTextInitGenesisFailedSettlementHeightIsNotZero = "settlement height should be zero for the active bet with uuid (%s)" )
x/bet module sentinel error text
const ( // AttributeKeyBetCreator is the event attribute for bet creator AttributeKeyBetCreator = "bet_creator" // AttributeKeyBetUID is the event attribute for bet unique identifier AttributeKeyBetUID = "bet_uid" // AttributeKeySportEventUID is the event attribute for sport-event unique identifier AttributeKeySportEventUID = "sport_event_uid" // AttributeValueCategory is the event attribute for category as module name AttributeValueCategory = ModuleName )
bet module event data
const ( // ModuleName defines the module name ModuleName = "bet" // StoreKey defines the primary module store key StoreKey = ModuleName // RouterKey is the message route for slashing RouterKey = ModuleName // QuerierRoute defines the module's query routing key QuerierRoute = ModuleName // MemStoreKey defines the in-memory store key MemStoreKey = "mem_bet" )
const ( // TypeMsgPlaceBet is type of message MsgPlaceBet TypeMsgPlaceBet = "place_bet" // TypeMsgSettleBet is type of message MsgSettleBet TypeMsgSettleBet = "settle_bet" // SettlementUIDsThreshold is the threshold for the number of UIDs in bulk settlement tx SettlementUIDsThreshold = 10 // BetPlacementThreshold is the threshold for the number bets in bulk placement tx BetPlacementThreshold = 10 )
const DefaultUID uint64 = 1
DefaultUID is the default global uid
const ( // MaxQueriableBetsCount is maximum allowed count of bets that // can be filtered by uid list MaxAllowedQueryBetsCount = 10 )
Variables ¶
var ( ErrInvalidLengthBet = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowBet = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupBet = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthBetOdds = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowBetOdds = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupBetOdds = fmt.Errorf("proto: unexpected end of group") )
var ( // Amino is the legacy aminto codec Amino = codec.NewLegacyAmino() // ModuleCdc is the codec of the module ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) )
var ( ErrInvalidBetUID = sdkerrors.Register(ModuleName, 2001, "bet UID is invalid") ErrInVerification = sdkerrors.Register(ModuleName, 2002, "error in verification process") ErrBetIsCanceled = sdkerrors.Register(ModuleName, 2003, "bet is already canceled") ErrBetIsSettled = sdkerrors.Register(ModuleName, 2004, "bet is already settled") ErrInSRBettorLoses = sdkerrors.Register(ModuleName, 2005, "internal error in processing loss in SR") ErrInSRBettorWins = sdkerrors.Register(ModuleName, 2006, "internal error in processing win in SR") ErrNoMatchingSportEvent = sdkerrors.Register(ModuleName, 2007, "sport-event not found") ErrInvalidOddsUID = sdkerrors.Register(ModuleName, 2008, "valid odds UID should be provided") ErrEmptyOddsValue = sdkerrors.Register(ModuleName, 2009, "odds value should not be empty") ErrInvalidSportEventUID = sdkerrors.Register(ModuleName, 2010, "valid sport-event UID should be provided") ErrInvalidTicket = sdkerrors.Register(ModuleName, 2011, "valid ticket should be provided") ErrInvalidAmount = sdkerrors.Register(ModuleName, 2012, "valid amount should be provided") ErrNoMatchingBet = sdkerrors.Register(ModuleName, 2013, "no matching bet") ErrResultNotDeclared = sdkerrors.Register(ModuleName, 2014, "sport-event result is not declared") ErrDuplicateUID = sdkerrors.Register(ModuleName, 2015, "UID is already set") ErrInSRPlacementProcessing = sdkerrors.Register(ModuleName, 2016, "internal error in processing bet placement in SR") ErrEndTSIsPassed = sdkerrors.Register(ModuleName, 2017, "the sport-event is expired") ErrOddsUIDNotExist = sdkerrors.Register(ModuleName, 2018, "sport-event does not have this odds UID") ErrInSRRefund = sdkerrors.Register(ModuleName, 2019, "internal error in refunding user in SR") ErrInactiveSportEvent = sdkerrors.Register(ModuleName, 2020, "the sport-event is not active") ErrBetAmountIsLow = sdkerrors.Register(ModuleName, 2021, "bet amount is lower than the minimum allowed") ErrInConvertingOddsToDec = sdkerrors.Register(ModuleName, 2022, "internal error in converting odds value from string to sdk.Dec") ErrInConvertingOddsToInt = sdkerrors.Register(ModuleName, 2023, "internal error in converting odds value from string to sdk.Int") ErrOddsDataNotFound = sdkerrors.Register(ModuleName, 2024, "odds does not exist in ticket payload") ErrInvalidOddsType = sdkerrors.Register(ModuleName, 2025, "valid odds type should be provided, 1: decimal, 2: fractional, 3: moneyline") ErrUserKycFailed = sdkerrors.Register(ModuleName, 2026, "the bettor failed the KYC Validation") ErrCanNotQueryLargeNumberOfBets = sdkerrors.Register(ModuleName, 2027, "can not query more than "+cast.ToString(MaxAllowedQueryBetsCount)) ErrDecimalOddsShouldBePositive = sdkerrors.Register(ModuleName, 2028, "decimal odds value should be positive") ErrDecimalOddsCanNotBeLessThanOne = sdkerrors.Register(ModuleName, 2029, "decimal odds value can not less than or equal to 1") ErrFractionalOddsCanNotBeNegativeOrZero = sdkerrors.Register(ModuleName, 2030, "fractional odds numbers can not be negative") ErrMoneylineOddsCanNotBeZero = sdkerrors.Register(ModuleName, 2031, "moneyline odds can not be zero") ErrFractionalOddsIncorrectFormat = sdkerrors.Register(ModuleName, 2032, "incorrect format of fractional odds") ErrBettorAddressNotEqualToCreator = sdkerrors.Register(ModuleName, 2033, "provided bettor address is not equal to bet owner") ErrMaxLossMultiplierCanNotBeZero = sdkerrors.Register(ModuleName, 2034, "max loss multiplier cannot be nil or zero") ErrMaxLossMultiplierCanNotBeMoreThanOne = sdkerrors.Register(ModuleName, 2035, "max loss multiplier cannot be more than one") )
x/bet module sentinel errors
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( // BetListPrefix is the prefix to retrieve all Bet BetListPrefix = []byte{0x00} // BetIDListPrefix is the prefix to retrieve all Bet IDs BetIDListPrefix = []byte{0x01} // BetStatsKey is the key for the bet statistics BetStatsKey = []byte{0x02} // ActiveBetListPrefix is the prefix to retrieve all active bets ActiveBetListPrefix = []byte{0x03} // SettledBetListPrefix is the prefix to retrieve all settled bets SettledBetListPrefix = []byte{0x04} )
var ( ErrInvalidLengthKyc = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowKyc = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupKyc = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthPlaceBetFields = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPlaceBetFields = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupPlaceBetFields = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthStats = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowStats = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupStats = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTicket = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTicket = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTicket = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var Bet_Result_name = map[int32]string{
0: "RESULT_UNSPECIFIED",
1: "RESULT_PENDING",
2: "RESULT_WON",
3: "RESULT_LOST",
4: "RESULT_REFUNDED",
}
var Bet_Result_value = map[string]int32{
"RESULT_UNSPECIFIED": 0,
"RESULT_PENDING": 1,
"RESULT_WON": 2,
"RESULT_LOST": 3,
"RESULT_REFUNDED": 4,
}
var Bet_Status_name = map[int32]string{
0: "STATUS_UNSPECIFIED",
1: "STATUS_PLACED",
2: "STATUS_CANCELED",
3: "STATUS_ABORTED",
4: "STATUS_PENDING",
5: "STATUS_RESULT_DECLARED",
6: "STATUS_SETTLED",
}
var Bet_Status_value = map[string]int32{
"STATUS_UNSPECIFIED": 0,
"STATUS_PLACED": 1,
"STATUS_CANCELED": 2,
"STATUS_ABORTED": 3,
"STATUS_PENDING": 4,
"STATUS_RESULT_DECLARED": 5,
"STATUS_SETTLED": 6,
}
var ( // KeyBatchSettlementCount is the batch settlement // count of bets KeyBatchSettlementCount = []byte("BatchSettlementCount") )
parameter store keys
var OddsType_name = map[int32]string{
0: "ODDS_TYPE_UNSPECIFIED",
1: "ODDS_TYPE_DECIMAL",
2: "ODDS_TYPE_FRACTIONAL",
3: "ODDS_TYPE_MONEYLINE",
}
var OddsType_value = map[string]int32{
"ODDS_TYPE_UNSPECIFIED": 0,
"ODDS_TYPE_DECIMAL": 1,
"ODDS_TYPE_FRACTIONAL": 2,
"ODDS_TYPE_MONEYLINE": 3,
}
Functions ¶
func ActiveBeOfSportEventKey ¶ added in v0.0.5
ActiveBeOfSportEventKey return the key of a certain active bet of a sport-event.
func ActiveBetListOfSportEventPrefix ¶ added in v0.0.5
ActiveBetListOfSportEventPrefix returns prefix of the certain sport-event active bet list.
func BetFieldsValidation ¶
func BetFieldsValidation(bet *PlaceBetFields) error
BetFieldsValidation validates fields of the given bet
func BetListByCreatorPrefix ¶ added in v0.0.5
BetListByCreatorPrefix returns prefix of the certain creator bet list.
func CalculateBetAmount ¶ added in v0.0.5
CalculateBetAmount calculates the amount of bet according to bet odds value and payout profit
func CalculatePayoutProfit ¶ added in v0.0.4
CalculatePayoutProfit calculates the amount of payout profit portion according to bet odds value and amount
func ParamKeyTable ¶
func ParamKeyTable() paramtypes.KeyTable
ParamKeyTable the param key table for launch module
func RegisterCodec ¶
func RegisterCodec(cdc *codec.LegacyAmino)
RegisterCodec registers module codec to the app codec
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
RegisterInterfaces registers the module interface types
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func SettledBeOfSportEventKey ¶ added in v0.0.5
SettledBeOfSportEventKey return the key of settled bet list on a certain block height.
func SettledBetListOfBlockHeightPrefix ¶ added in v0.0.5
SettledBetListOfBlockHeightPrefix returns prefix of settled bet list on a certain block height.
Types ¶
type AccountKeeper ¶
AccountKeeper defines the expected account keeper used for simulations (noalias)
type ActiveBet ¶ added in v0.0.5
type ActiveBet struct { // uid is the universal unique identifier for the bet. UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` // creator is the bettor address. Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` }
ActiveBet is the type for an active bet
func NewActiveBet ¶ added in v0.0.5
func (*ActiveBet) Descriptor ¶ added in v0.0.5
func (*ActiveBet) GetCreator ¶ added in v0.0.5
func (*ActiveBet) MarshalToSizedBuffer ¶ added in v0.0.5
func (*ActiveBet) ProtoMessage ¶ added in v0.0.5
func (*ActiveBet) ProtoMessage()
func (*ActiveBet) XXX_DiscardUnknown ¶ added in v0.0.5
func (m *ActiveBet) XXX_DiscardUnknown()
func (*ActiveBet) XXX_Marshal ¶ added in v0.0.5
func (*ActiveBet) XXX_Unmarshal ¶ added in v0.0.5
type BankKeeper ¶
BankKeeper defines the expected interface needed to retrieve account balances.
type Bet ¶
type Bet struct { // uid is the universal unique identifier assigned to a bet. UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` // sport_event_uid is the universal unique identifier of // the sport-event on which the bet is placed. SportEventUID string `protobuf:"bytes,2,opt,name=sport_event_uid,proto3" json:"sport_event_uid"` // odds_uid is the unique universal unique identifier, // of the odds on which the bet is placed. OddsUID string `protobuf:"bytes,3,opt,name=odds_uid,proto3" json:"odds_uid"` // odds_type is the type of odds that // user choose such as decimal, fractional. OddsType OddsType `protobuf:"varint,4,opt,name=odds_type,json=oddsType,proto3,enum=sgenetwork.sge.bet.OddsType" json:"odds_type,omitempty"` // odds_value is the odds on which the bet is placed. OddsValue string `protobuf:"bytes,5,opt,name=odds_value,json=oddsValue,proto3" json:"odds_value,omitempty"` // amount is the wager amount. Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` // bet_fee is the betting fee calculated by the bet amount. BetFee github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=bet_fee,json=betFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"bet_fee"` // status is the status of the bet, such as `unspecified` or `settled`. Status Bet_Status `protobuf:"varint,8,opt,name=status,proto3,enum=sgenetwork.sge.bet.Bet_Status" json:"status,omitempty"` // result is the result of the bet, such as `won` or `lost`. Result Bet_Result `protobuf:"varint,9,opt,name=result,proto3,enum=sgenetwork.sge.bet.Bet_Result" json:"result,omitempty"` // creator is the bettor address. Creator string `protobuf:"bytes,10,opt,name=creator,proto3" json:"creator,omitempty"` // created_at is the bet placement timestamp. CreatedAt int64 `protobuf:"varint,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // settlement_height is the block height that the bet is settled. SettlementHeight int64 `protobuf:"varint,12,opt,name=settlement_height,json=settlementHeight,proto3" json:"settlement_height,omitempty"` // max_loss_multiplier is the multiplier coefficient of max loss. MaxLossMultiplier github_com_cosmos_cosmos_sdk_types.Dec `` /* 155-byte string literal not displayed */ // bet_fulfillment is the fulfillment data. BetFulfillment []*BetFulfillment `protobuf:"bytes,14,rep,name=bet_fulfillment,json=betFulfillment,proto3" json:"bet_fulfillment,omitempty"` }
Bet is the main type of bet in the blockchain state.
func (*Bet) Descriptor ¶
func (*Bet) GetBetFulfillment ¶ added in v0.0.5
func (m *Bet) GetBetFulfillment() []*BetFulfillment
func (*Bet) GetCreatedAt ¶
func (*Bet) GetCreator ¶
func (*Bet) GetOddsType ¶ added in v0.0.3
func (*Bet) GetOddsUID ¶
func (*Bet) GetOddsValue ¶ added in v0.0.4
func (*Bet) GetResult ¶
func (m *Bet) GetResult() Bet_Result
func (*Bet) GetSettlementHeight ¶ added in v0.0.5
func (*Bet) GetSportEventUID ¶
func (*Bet) GetStatus ¶
func (m *Bet) GetStatus() Bet_Status
func (*Bet) ProtoMessage ¶
func (*Bet) ProtoMessage()
func (*Bet) XXX_DiscardUnknown ¶
func (m *Bet) XXX_DiscardUnknown()
func (*Bet) XXX_Unmarshal ¶
type BetFulfillment ¶ added in v0.0.5
type BetFulfillment struct { // participant_address is the bech32-encoded address of the participant // fulfilling bet. ParticipantAddress string `` /* 142-byte string literal not displayed */ // participation_index is the index in initial participation queue index ParticipationIndex uint64 `` /* 143-byte string literal not displayed */ // bet amount fulfilled by the participation BetAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 146-byte string literal not displayed */ // payout amount fulfilled by the participation PayoutAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 158-byte string literal not displayed */ }
BetFulfillment is the type for bet fulfillment
func (*BetFulfillment) Descriptor ¶ added in v0.0.5
func (*BetFulfillment) Descriptor() ([]byte, []int)
func (*BetFulfillment) GetParticipantAddress ¶ added in v0.0.5
func (m *BetFulfillment) GetParticipantAddress() string
func (*BetFulfillment) GetParticipationIndex ¶ added in v0.0.5
func (m *BetFulfillment) GetParticipationIndex() uint64
func (*BetFulfillment) Marshal ¶ added in v0.0.5
func (m *BetFulfillment) Marshal() (dAtA []byte, err error)
func (*BetFulfillment) MarshalTo ¶ added in v0.0.5
func (m *BetFulfillment) MarshalTo(dAtA []byte) (int, error)
func (*BetFulfillment) MarshalToSizedBuffer ¶ added in v0.0.5
func (m *BetFulfillment) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BetFulfillment) ProtoMessage ¶ added in v0.0.5
func (*BetFulfillment) ProtoMessage()
func (*BetFulfillment) Reset ¶ added in v0.0.5
func (m *BetFulfillment) Reset()
func (*BetFulfillment) Size ¶ added in v0.0.5
func (m *BetFulfillment) Size() (n int)
func (*BetFulfillment) String ¶ added in v0.0.5
func (m *BetFulfillment) String() string
func (*BetFulfillment) Unmarshal ¶ added in v0.0.5
func (m *BetFulfillment) Unmarshal(dAtA []byte) error
func (*BetFulfillment) XXX_DiscardUnknown ¶ added in v0.0.5
func (m *BetFulfillment) XXX_DiscardUnknown()
func (*BetFulfillment) XXX_Marshal ¶ added in v0.0.5
func (m *BetFulfillment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BetFulfillment) XXX_Merge ¶ added in v0.0.5
func (m *BetFulfillment) XXX_Merge(src proto.Message)
func (*BetFulfillment) XXX_Size ¶ added in v0.0.5
func (m *BetFulfillment) XXX_Size() int
func (*BetFulfillment) XXX_Unmarshal ¶ added in v0.0.5
func (m *BetFulfillment) XXX_Unmarshal(b []byte) error
type BetOdds ¶
type BetOdds struct { // uid is universal unique identifier of odds. // Required | Unique | uuid-v4 or code UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` // sport_event_uid is the parent, used for fast retrieving. // Required | NonUnique | - SportEventUID string `protobuf:"bytes,2,opt,name=sport_event_uid,proto3" json:"sport_event_uid"` // value of the odds in corresponding odds type proposed in bet placement // message. Required | NonUnique | "1.286" or "2/7" or "+500" Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // max_loss_multiplier is the factor for calculating max loss for given odds MaxLossMultiplier github_com_cosmos_cosmos_sdk_types.Dec `` /* 131-byte string literal not displayed */ }
BetOdds is the type to store odds of an sport-event.
func (*BetOdds) Descriptor ¶
func (*BetOdds) GetSportEventUID ¶
func (*BetOdds) MarshalToSizedBuffer ¶
func (*BetOdds) ProtoMessage ¶
func (*BetOdds) ProtoMessage()
func (*BetOdds) XXX_DiscardUnknown ¶
func (m *BetOdds) XXX_DiscardUnknown()
func (*BetOdds) XXX_Marshal ¶
func (*BetOdds) XXX_Unmarshal ¶
type BetPlacementTicketPayload ¶ added in v0.0.3
type BetPlacementTicketPayload struct { // selected_odds is the user-selected odds to place bet. SelectedOdds *BetOdds `protobuf:"bytes,1,opt,name=selected_odds,json=selectedOdds,proto3" json:"selected_odds,omitempty"` // kyc_data contains the details of user kyc. KycData KycDataPayload `protobuf:"bytes,2,opt,name=kyc_data,json=kycData,proto3" json:"kyc_data"` // odds_type is the type of odds that are going to be placed // such as decimal, fraction, moneyline. OddsType OddsType `protobuf:"varint,3,opt,name=odds_type,json=oddsType,proto3,enum=sgenetwork.sge.bet.OddsType" json:"odds_type,omitempty"` }
BetPlacementTicketPayload indicates data of bet placement ticket.
func (*BetPlacementTicketPayload) Descriptor ¶ added in v0.0.3
func (*BetPlacementTicketPayload) Descriptor() ([]byte, []int)
func (*BetPlacementTicketPayload) GetKycData ¶ added in v0.0.3
func (m *BetPlacementTicketPayload) GetKycData() KycDataPayload
func (*BetPlacementTicketPayload) GetOddsType ¶ added in v0.0.5
func (m *BetPlacementTicketPayload) GetOddsType() OddsType
func (*BetPlacementTicketPayload) GetSelectedOdds ¶ added in v0.0.3
func (m *BetPlacementTicketPayload) GetSelectedOdds() *BetOdds
func (*BetPlacementTicketPayload) Marshal ¶ added in v0.0.3
func (m *BetPlacementTicketPayload) Marshal() (dAtA []byte, err error)
func (*BetPlacementTicketPayload) MarshalTo ¶ added in v0.0.3
func (m *BetPlacementTicketPayload) MarshalTo(dAtA []byte) (int, error)
func (*BetPlacementTicketPayload) MarshalToSizedBuffer ¶ added in v0.0.3
func (m *BetPlacementTicketPayload) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BetPlacementTicketPayload) ProtoMessage ¶ added in v0.0.3
func (*BetPlacementTicketPayload) ProtoMessage()
func (*BetPlacementTicketPayload) Reset ¶ added in v0.0.3
func (m *BetPlacementTicketPayload) Reset()
func (*BetPlacementTicketPayload) Size ¶ added in v0.0.3
func (m *BetPlacementTicketPayload) Size() (n int)
func (*BetPlacementTicketPayload) String ¶ added in v0.0.3
func (m *BetPlacementTicketPayload) String() string
func (*BetPlacementTicketPayload) Unmarshal ¶ added in v0.0.3
func (m *BetPlacementTicketPayload) Unmarshal(dAtA []byte) error
func (*BetPlacementTicketPayload) Validate ¶ added in v0.0.5
func (ticketData *BetPlacementTicketPayload) Validate(creator string) error
Validate validates fields of the given ticketData
func (*BetPlacementTicketPayload) XXX_DiscardUnknown ¶ added in v0.0.3
func (m *BetPlacementTicketPayload) XXX_DiscardUnknown()
func (*BetPlacementTicketPayload) XXX_Marshal ¶ added in v0.0.3
func (m *BetPlacementTicketPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BetPlacementTicketPayload) XXX_Merge ¶ added in v0.0.3
func (m *BetPlacementTicketPayload) XXX_Merge(src proto.Message)
func (*BetPlacementTicketPayload) XXX_Size ¶ added in v0.0.3
func (m *BetPlacementTicketPayload) XXX_Size() int
func (*BetPlacementTicketPayload) XXX_Unmarshal ¶ added in v0.0.3
func (m *BetPlacementTicketPayload) XXX_Unmarshal(b []byte) error
type BetStats ¶ added in v0.0.4
type BetStats struct { // count is the total count of bets. Count uint64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` }
BetStats is the type of statistics of the betting in the blockchain state.
func (*BetStats) Descriptor ¶ added in v0.0.4
func (*BetStats) MarshalToSizedBuffer ¶ added in v0.0.4
func (*BetStats) ProtoMessage ¶ added in v0.0.4
func (*BetStats) ProtoMessage()
func (*BetStats) XXX_DiscardUnknown ¶ added in v0.0.4
func (m *BetStats) XXX_DiscardUnknown()
func (*BetStats) XXX_Marshal ¶ added in v0.0.4
func (*BetStats) XXX_Unmarshal ¶ added in v0.0.4
type Bet_Result ¶
type Bet_Result int32
Result of the bet.
const ( // the invalid or unknown Bet_RESULT_UNSPECIFIED Bet_Result = 0 // bet result is pending Bet_RESULT_PENDING Bet_Result = 1 // bet won by the bettor Bet_RESULT_WON Bet_Result = 2 // bet lost by the bettor Bet_RESULT_LOST Bet_Result = 3 // bet is refunded Bet_RESULT_REFUNDED Bet_Result = 4 )
func (Bet_Result) EnumDescriptor ¶
func (Bet_Result) EnumDescriptor() ([]byte, []int)
func (Bet_Result) String ¶
func (x Bet_Result) String() string
type Bet_Status ¶
type Bet_Status int32
Status of the Bet.
const ( // the invalid or unknown Bet_STATUS_UNSPECIFIED Bet_Status = 0 // bet is placed Bet_STATUS_PLACED Bet_Status = 1 // bet is canceled by Bettor Bet_STATUS_CANCELED Bet_Status = 2 // bet is aborted Bet_STATUS_ABORTED Bet_Status = 3 // bet is pending for getting placed Bet_STATUS_PENDING Bet_Status = 4 // bet result is declared Bet_STATUS_RESULT_DECLARED Bet_Status = 5 // the bet is settled Bet_STATUS_SETTLED Bet_Status = 6 )
func (Bet_Status) EnumDescriptor ¶
func (Bet_Status) EnumDescriptor() ([]byte, []int)
func (Bet_Status) String ¶
func (x Bet_Status) String() string
type DVMKeeper ¶
type DVMKeeper interface {
VerifyTicketUnmarshal(goCtx context.Context, ticket string, clm interface{}) error
}
DVMKeeper defines the expected interface needed to verify ticket and unmarshal it
type GenesisState ¶
type GenesisState struct { // params contains parameters of dvm module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // bet_list contains the bet list in the genesis init. BetList []Bet `protobuf:"bytes,2,rep,name=bet_list,json=betList,proto3" json:"bet_list"` // active_bet_list contains the active bet list in the genesis init. ActiveBetList []ActiveBet `protobuf:"bytes,3,rep,name=active_bet_list,json=activeBetList,proto3" json:"active_bet_list"` // active_bet_list contains the settled bet list in the genesis init. SettledBetList []SettledBet `protobuf:"bytes,4,rep,name=settled_bet_list,json=settledBetList,proto3" json:"settled_bet_list"` // uid2id_list contains bet to id list in the genesis init. Uid2IdList []UID2ID `protobuf:"bytes,5,rep,name=uid2id_list,json=uid2idList,proto3" json:"uid2id_list"` // stats contains statistics in the genesis init. Stats BetStats `protobuf:"bytes,6,opt,name=stats,proto3" json:"stats"` }
GenesisState defines the bet module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default genesis state
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetActiveBetList ¶ added in v0.0.5
func (m *GenesisState) GetActiveBetList() []ActiveBet
func (*GenesisState) GetBetList ¶
func (m *GenesisState) GetBetList() []Bet
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetSettledBetList ¶ added in v0.0.5
func (m *GenesisState) GetSettledBetList() []SettledBet
func (*GenesisState) GetStats ¶ added in v0.0.4
func (m *GenesisState) GetStats() BetStats
func (*GenesisState) GetUid2IdList ¶ added in v0.0.4
func (m *GenesisState) GetUid2IdList() []UID2ID
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) Validate ¶
func (gs GenesisState) Validate() error
Validate performs basic genesis state validation returning an error upon any failure.
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type KycDataPayload ¶ added in v0.0.3
type KycDataPayload struct { // ignore is true if kyc validation is not required. Ignore bool `protobuf:"varint,1,opt,name=ignore,proto3" json:"ignore,omitempty"` // approved represent if kvc validation is approved or not. Approved bool `protobuf:"varint,2,opt,name=approved,proto3" json:"approved,omitempty"` // id is the id of the kyc. ID string `protobuf:"bytes,3,opt,name=id,proto3" json:"id"` }
KycDataPayload is the KYC info.
func (*KycDataPayload) Descriptor ¶ added in v0.0.3
func (*KycDataPayload) Descriptor() ([]byte, []int)
func (*KycDataPayload) GetApproved ¶ added in v0.0.5
func (m *KycDataPayload) GetApproved() bool
func (*KycDataPayload) GetID ¶ added in v0.0.5
func (m *KycDataPayload) GetID() string
func (*KycDataPayload) GetIgnore ¶ added in v0.0.5
func (m *KycDataPayload) GetIgnore() bool
func (*KycDataPayload) Marshal ¶ added in v0.0.3
func (m *KycDataPayload) Marshal() (dAtA []byte, err error)
func (*KycDataPayload) MarshalTo ¶ added in v0.0.3
func (m *KycDataPayload) MarshalTo(dAtA []byte) (int, error)
func (*KycDataPayload) MarshalToSizedBuffer ¶ added in v0.0.3
func (m *KycDataPayload) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*KycDataPayload) ProtoMessage ¶ added in v0.0.3
func (*KycDataPayload) ProtoMessage()
func (*KycDataPayload) Reset ¶ added in v0.0.3
func (m *KycDataPayload) Reset()
func (*KycDataPayload) Size ¶ added in v0.0.3
func (m *KycDataPayload) Size() (n int)
func (*KycDataPayload) String ¶ added in v0.0.3
func (m *KycDataPayload) String() string
func (*KycDataPayload) Unmarshal ¶ added in v0.0.3
func (m *KycDataPayload) Unmarshal(dAtA []byte) error
func (*KycDataPayload) XXX_DiscardUnknown ¶ added in v0.0.3
func (m *KycDataPayload) XXX_DiscardUnknown()
func (*KycDataPayload) XXX_Marshal ¶ added in v0.0.3
func (m *KycDataPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*KycDataPayload) XXX_Merge ¶ added in v0.0.3
func (m *KycDataPayload) XXX_Merge(src proto.Message)
func (*KycDataPayload) XXX_Size ¶ added in v0.0.3
func (m *KycDataPayload) XXX_Size() int
func (*KycDataPayload) XXX_Unmarshal ¶ added in v0.0.3
func (m *KycDataPayload) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { // PlaceBet defines a method to place a bet with the given data. PlaceBet(ctx context.Context, in *MsgPlaceBet, opts ...grpc.CallOption) (*MsgPlaceBetResponse, error) }
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgPlaceBet ¶
type MsgPlaceBet struct { // creator is the bettor address. Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` // PlaceBetFields contains bet fields. Bet *PlaceBetFields `protobuf:"bytes,2,opt,name=bet,proto3" json:"bet,omitempty"` }
MsgPlaceBet defines a message to place a bet with the given data.
func NewMsgPlaceBet ¶
func NewMsgPlaceBet( creator string, bet PlaceBetFields, ) *MsgPlaceBet
NewMsgPlaceBet returns a MsgPlaceBet using given data
func (*MsgPlaceBet) Descriptor ¶
func (*MsgPlaceBet) Descriptor() ([]byte, []int)
func (*MsgPlaceBet) GetBet ¶
func (m *MsgPlaceBet) GetBet() *PlaceBetFields
func (*MsgPlaceBet) GetCreator ¶
func (m *MsgPlaceBet) GetCreator() string
func (*MsgPlaceBet) GetSignBytes ¶
func (msg *MsgPlaceBet) GetSignBytes() []byte
GetSignBytes returns sortJson form of its message
func (*MsgPlaceBet) GetSigners ¶
func (msg *MsgPlaceBet) GetSigners() []sdk.AccAddress
GetSigners returns the signers of its message
func (*MsgPlaceBet) Marshal ¶
func (m *MsgPlaceBet) Marshal() (dAtA []byte, err error)
func (*MsgPlaceBet) MarshalToSizedBuffer ¶
func (m *MsgPlaceBet) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgPlaceBet) ProtoMessage ¶
func (*MsgPlaceBet) ProtoMessage()
func (*MsgPlaceBet) Reset ¶
func (m *MsgPlaceBet) Reset()
func (*MsgPlaceBet) Route ¶
func (msg *MsgPlaceBet) Route() string
Route returns the module's message router key.
func (*MsgPlaceBet) Size ¶
func (m *MsgPlaceBet) Size() (n int)
func (*MsgPlaceBet) String ¶
func (m *MsgPlaceBet) String() string
func (*MsgPlaceBet) Unmarshal ¶
func (m *MsgPlaceBet) Unmarshal(dAtA []byte) error
func (*MsgPlaceBet) ValidateBasic ¶
func (msg *MsgPlaceBet) ValidateBasic() error
ValidateBasic does some validate checks on its message
func (*MsgPlaceBet) XXX_DiscardUnknown ¶
func (m *MsgPlaceBet) XXX_DiscardUnknown()
func (*MsgPlaceBet) XXX_Marshal ¶
func (m *MsgPlaceBet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgPlaceBet) XXX_Merge ¶
func (m *MsgPlaceBet) XXX_Merge(src proto.Message)
func (*MsgPlaceBet) XXX_Size ¶
func (m *MsgPlaceBet) XXX_Size() int
func (*MsgPlaceBet) XXX_Unmarshal ¶
func (m *MsgPlaceBet) XXX_Unmarshal(b []byte) error
type MsgPlaceBetResponse ¶
type MsgPlaceBetResponse struct { Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` Bet *PlaceBetFields `protobuf:"bytes,2,opt,name=bet,proto3" json:"bet,omitempty"` }
MsgPlaceBetResponse is the returning value in the response of MsgPlaceBet request.
func (*MsgPlaceBetResponse) Descriptor ¶
func (*MsgPlaceBetResponse) Descriptor() ([]byte, []int)
func (*MsgPlaceBetResponse) GetBet ¶ added in v0.0.3
func (m *MsgPlaceBetResponse) GetBet() *PlaceBetFields
func (*MsgPlaceBetResponse) GetError ¶ added in v0.0.3
func (m *MsgPlaceBetResponse) GetError() string
func (*MsgPlaceBetResponse) Marshal ¶
func (m *MsgPlaceBetResponse) Marshal() (dAtA []byte, err error)
func (*MsgPlaceBetResponse) MarshalTo ¶
func (m *MsgPlaceBetResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgPlaceBetResponse) MarshalToSizedBuffer ¶
func (m *MsgPlaceBetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgPlaceBetResponse) ProtoMessage ¶
func (*MsgPlaceBetResponse) ProtoMessage()
func (*MsgPlaceBetResponse) Reset ¶
func (m *MsgPlaceBetResponse) Reset()
func (*MsgPlaceBetResponse) Size ¶
func (m *MsgPlaceBetResponse) Size() (n int)
func (*MsgPlaceBetResponse) String ¶
func (m *MsgPlaceBetResponse) String() string
func (*MsgPlaceBetResponse) Unmarshal ¶
func (m *MsgPlaceBetResponse) Unmarshal(dAtA []byte) error
func (*MsgPlaceBetResponse) XXX_DiscardUnknown ¶
func (m *MsgPlaceBetResponse) XXX_DiscardUnknown()
func (*MsgPlaceBetResponse) XXX_Marshal ¶
func (m *MsgPlaceBetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgPlaceBetResponse) XXX_Merge ¶
func (m *MsgPlaceBetResponse) XXX_Merge(src proto.Message)
func (*MsgPlaceBetResponse) XXX_Size ¶
func (m *MsgPlaceBetResponse) XXX_Size() int
func (*MsgPlaceBetResponse) XXX_Unmarshal ¶
func (m *MsgPlaceBetResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // PlaceBet defines a method to place a bet with the given data. PlaceBet(context.Context, *MsgPlaceBet) (*MsgPlaceBetResponse, error) }
MsgServer is the server API for Msg service.
type OddsType ¶ added in v0.0.3
type OddsType int32
OddsType is the representation of the type of the odds.
func (OddsType) EnumDescriptor ¶ added in v0.0.3
type OrderBookKeeper ¶ added in v0.0.5
type OrderBookKeeper interface { ProcessBetPlacement(ctx sdk.Context, betUID, bookUID, oddsUID string, maxLossMultiplier sdk.Dec, betAmount sdk.Int, payoutProfit sdk.Dec, bettorAddress sdk.AccAddress, betFee sdk.Int, oddsType OddsType, oddsVal string, betID uint64) ([]*BetFulfillment, error) RefundBettor(ctx sdk.Context, bettorAddress sdk.AccAddress, betAmount, payout sdk.Int, uniqueLock string) error BettorWins(ctx sdk.Context, bettorAddress sdk.AccAddress, betAmount, payout sdk.Int, uniqueLock string, fulfillment []*BetFulfillment, bookUID string) error BettorLoses(ctx sdk.Context, bettorAddress sdk.AccAddress, betAmount, payout sdk.Int, uniqueLock string, fulfillment []*BetFulfillment, bookUID string) error AddBookSettlement(ctx sdk.Context, orderBookUID string) error }
OrderBookKeeper defines the expected interface needed to process bet placement
type Params ¶
type Params struct { // batch_settlement_count is the batch settlement bet counts. BatchSettlementCount uint32 `protobuf:"varint,1,opt,name=batch_settlement_count,json=batchSettlementCount,proto3" json:"batch_settlement_count,omitempty"` }
Params defines the parameters for the module.
func (*Params) Descriptor ¶
func (*Params) GetBatchSettlementCount ¶ added in v0.0.5
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs get the params.ParamSet
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type PlaceBetFields ¶ added in v0.0.3
type PlaceBetFields struct { // uid is the universal unique identifier assigned to bet. UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` // amount is the wager amount. Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` // ticket is a signed string containing important info such as `oddsValue`. Ticket string `protobuf:"bytes,3,opt,name=ticket,proto3" json:"ticket,omitempty"` }
PlaceBetFields contains necessary fields which come in Place bet tx request.
func (*PlaceBetFields) Descriptor ¶ added in v0.0.3
func (*PlaceBetFields) Descriptor() ([]byte, []int)
func (*PlaceBetFields) GetTicket ¶ added in v0.0.3
func (m *PlaceBetFields) GetTicket() string
func (*PlaceBetFields) GetUID ¶ added in v0.0.3
func (m *PlaceBetFields) GetUID() string
func (*PlaceBetFields) Marshal ¶ added in v0.0.3
func (m *PlaceBetFields) Marshal() (dAtA []byte, err error)
func (*PlaceBetFields) MarshalTo ¶ added in v0.0.3
func (m *PlaceBetFields) MarshalTo(dAtA []byte) (int, error)
func (*PlaceBetFields) MarshalToSizedBuffer ¶ added in v0.0.3
func (m *PlaceBetFields) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PlaceBetFields) ProtoMessage ¶ added in v0.0.3
func (*PlaceBetFields) ProtoMessage()
func (*PlaceBetFields) Reset ¶ added in v0.0.3
func (m *PlaceBetFields) Reset()
func (*PlaceBetFields) Size ¶ added in v0.0.3
func (m *PlaceBetFields) Size() (n int)
func (*PlaceBetFields) String ¶ added in v0.0.3
func (m *PlaceBetFields) String() string
func (*PlaceBetFields) Unmarshal ¶ added in v0.0.3
func (m *PlaceBetFields) Unmarshal(dAtA []byte) error
func (*PlaceBetFields) XXX_DiscardUnknown ¶ added in v0.0.3
func (m *PlaceBetFields) XXX_DiscardUnknown()
func (*PlaceBetFields) XXX_Marshal ¶ added in v0.0.3
func (m *PlaceBetFields) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PlaceBetFields) XXX_Merge ¶ added in v0.0.3
func (m *PlaceBetFields) XXX_Merge(src proto.Message)
func (*PlaceBetFields) XXX_Size ¶ added in v0.0.3
func (m *PlaceBetFields) XXX_Size() int
func (*PlaceBetFields) XXX_Unmarshal ¶ added in v0.0.3
func (m *PlaceBetFields) XXX_Unmarshal(b []byte) error
type QueryActiveBetsRequest ¶ added in v0.0.5
type QueryActiveBetsRequest struct { Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` SportEventUid string `protobuf:"bytes,2,opt,name=sport_event_uid,json=sportEventUid,proto3" json:"sport_event_uid,omitempty"` }
QueryActiveBetsRequest is the request type for the active bets list query Query/ActiveBets RPC method.
func (*QueryActiveBetsRequest) Descriptor ¶ added in v0.0.5
func (*QueryActiveBetsRequest) Descriptor() ([]byte, []int)
func (*QueryActiveBetsRequest) GetPagination ¶ added in v0.0.5
func (m *QueryActiveBetsRequest) GetPagination() *query.PageRequest
func (*QueryActiveBetsRequest) GetSportEventUid ¶ added in v0.0.5
func (m *QueryActiveBetsRequest) GetSportEventUid() string
func (*QueryActiveBetsRequest) Marshal ¶ added in v0.0.5
func (m *QueryActiveBetsRequest) Marshal() (dAtA []byte, err error)
func (*QueryActiveBetsRequest) MarshalTo ¶ added in v0.0.5
func (m *QueryActiveBetsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryActiveBetsRequest) MarshalToSizedBuffer ¶ added in v0.0.5
func (m *QueryActiveBetsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryActiveBetsRequest) ProtoMessage ¶ added in v0.0.5
func (*QueryActiveBetsRequest) ProtoMessage()
func (*QueryActiveBetsRequest) Reset ¶ added in v0.0.5
func (m *QueryActiveBetsRequest) Reset()
func (*QueryActiveBetsRequest) Size ¶ added in v0.0.5
func (m *QueryActiveBetsRequest) Size() (n int)
func (*QueryActiveBetsRequest) String ¶ added in v0.0.5
func (m *QueryActiveBetsRequest) String() string
func (*QueryActiveBetsRequest) Unmarshal ¶ added in v0.0.5
func (m *QueryActiveBetsRequest) Unmarshal(dAtA []byte) error
func (*QueryActiveBetsRequest) XXX_DiscardUnknown ¶ added in v0.0.5
func (m *QueryActiveBetsRequest) XXX_DiscardUnknown()
func (*QueryActiveBetsRequest) XXX_Marshal ¶ added in v0.0.5
func (m *QueryActiveBetsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryActiveBetsRequest) XXX_Merge ¶ added in v0.0.5
func (m *QueryActiveBetsRequest) XXX_Merge(src proto.Message)
func (*QueryActiveBetsRequest) XXX_Size ¶ added in v0.0.5
func (m *QueryActiveBetsRequest) XXX_Size() int
func (*QueryActiveBetsRequest) XXX_Unmarshal ¶ added in v0.0.5
func (m *QueryActiveBetsRequest) XXX_Unmarshal(b []byte) error
type QueryActiveBetsResponse ¶ added in v0.0.5
type QueryActiveBetsResponse struct { Bet []Bet `protobuf:"bytes,1,rep,name=bet,proto3" json:"bet"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryActiveBetsResponse is the response type for the active bets list query Query/ActiveBets RPC method.
func (*QueryActiveBetsResponse) Descriptor ¶ added in v0.0.5
func (*QueryActiveBetsResponse) Descriptor() ([]byte, []int)
func (*QueryActiveBetsResponse) GetBet ¶ added in v0.0.5
func (m *QueryActiveBetsResponse) GetBet() []Bet
func (*QueryActiveBetsResponse) GetPagination ¶ added in v0.0.5
func (m *QueryActiveBetsResponse) GetPagination() *query.PageResponse
func (*QueryActiveBetsResponse) Marshal ¶ added in v0.0.5
func (m *QueryActiveBetsResponse) Marshal() (dAtA []byte, err error)
func (*QueryActiveBetsResponse) MarshalTo ¶ added in v0.0.5
func (m *QueryActiveBetsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryActiveBetsResponse) MarshalToSizedBuffer ¶ added in v0.0.5
func (m *QueryActiveBetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryActiveBetsResponse) ProtoMessage ¶ added in v0.0.5
func (*QueryActiveBetsResponse) ProtoMessage()
func (*QueryActiveBetsResponse) Reset ¶ added in v0.0.5
func (m *QueryActiveBetsResponse) Reset()
func (*QueryActiveBetsResponse) Size ¶ added in v0.0.5
func (m *QueryActiveBetsResponse) Size() (n int)
func (*QueryActiveBetsResponse) String ¶ added in v0.0.5
func (m *QueryActiveBetsResponse) String() string
func (*QueryActiveBetsResponse) Unmarshal ¶ added in v0.0.5
func (m *QueryActiveBetsResponse) Unmarshal(dAtA []byte) error
func (*QueryActiveBetsResponse) XXX_DiscardUnknown ¶ added in v0.0.5
func (m *QueryActiveBetsResponse) XXX_DiscardUnknown()
func (*QueryActiveBetsResponse) XXX_Marshal ¶ added in v0.0.5
func (m *QueryActiveBetsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryActiveBetsResponse) XXX_Merge ¶ added in v0.0.5
func (m *QueryActiveBetsResponse) XXX_Merge(src proto.Message)
func (*QueryActiveBetsResponse) XXX_Size ¶ added in v0.0.5
func (m *QueryActiveBetsResponse) XXX_Size() int
func (*QueryActiveBetsResponse) XXX_Unmarshal ¶ added in v0.0.5
func (m *QueryActiveBetsResponse) XXX_Unmarshal(b []byte) error
type QueryBetRequest ¶
type QueryBetRequest struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` }
QueryBetRequest is the request type for a single bet query Query/Bet RPC method.
func (*QueryBetRequest) Descriptor ¶
func (*QueryBetRequest) Descriptor() ([]byte, []int)
func (*QueryBetRequest) GetCreator ¶ added in v0.0.4
func (m *QueryBetRequest) GetCreator() string
func (*QueryBetRequest) GetUid ¶
func (m *QueryBetRequest) GetUid() string
func (*QueryBetRequest) Marshal ¶
func (m *QueryBetRequest) Marshal() (dAtA []byte, err error)
func (*QueryBetRequest) MarshalToSizedBuffer ¶
func (m *QueryBetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBetRequest) ProtoMessage ¶
func (*QueryBetRequest) ProtoMessage()
func (*QueryBetRequest) Reset ¶
func (m *QueryBetRequest) Reset()
func (*QueryBetRequest) Size ¶
func (m *QueryBetRequest) Size() (n int)
func (*QueryBetRequest) String ¶
func (m *QueryBetRequest) String() string
func (*QueryBetRequest) Unmarshal ¶
func (m *QueryBetRequest) Unmarshal(dAtA []byte) error
func (*QueryBetRequest) XXX_DiscardUnknown ¶
func (m *QueryBetRequest) XXX_DiscardUnknown()
func (*QueryBetRequest) XXX_Marshal ¶
func (m *QueryBetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBetRequest) XXX_Merge ¶
func (m *QueryBetRequest) XXX_Merge(src proto.Message)
func (*QueryBetRequest) XXX_Size ¶
func (m *QueryBetRequest) XXX_Size() int
func (*QueryBetRequest) XXX_Unmarshal ¶
func (m *QueryBetRequest) XXX_Unmarshal(b []byte) error
type QueryBetResponse ¶
type QueryBetResponse struct { Bet Bet `protobuf:"bytes,1,opt,name=bet,proto3" json:"bet"` SportEvent types.SportEvent `protobuf:"bytes,2,opt,name=sport_event,json=sportEvent,proto3" json:"sport_event"` }
QueryBetResponse is the response type for single bet query Query/Bet RPC method.
func (*QueryBetResponse) Descriptor ¶
func (*QueryBetResponse) Descriptor() ([]byte, []int)
func (*QueryBetResponse) GetBet ¶
func (m *QueryBetResponse) GetBet() Bet
func (*QueryBetResponse) GetSportEvent ¶ added in v0.0.4
func (m *QueryBetResponse) GetSportEvent() types.SportEvent
func (*QueryBetResponse) Marshal ¶
func (m *QueryBetResponse) Marshal() (dAtA []byte, err error)
func (*QueryBetResponse) MarshalToSizedBuffer ¶
func (m *QueryBetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBetResponse) ProtoMessage ¶
func (*QueryBetResponse) ProtoMessage()
func (*QueryBetResponse) Reset ¶
func (m *QueryBetResponse) Reset()
func (*QueryBetResponse) Size ¶
func (m *QueryBetResponse) Size() (n int)
func (*QueryBetResponse) String ¶
func (m *QueryBetResponse) String() string
func (*QueryBetResponse) Unmarshal ¶
func (m *QueryBetResponse) Unmarshal(dAtA []byte) error
func (*QueryBetResponse) XXX_DiscardUnknown ¶
func (m *QueryBetResponse) XXX_DiscardUnknown()
func (*QueryBetResponse) XXX_Marshal ¶
func (m *QueryBetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBetResponse) XXX_Merge ¶
func (m *QueryBetResponse) XXX_Merge(src proto.Message)
func (*QueryBetResponse) XXX_Size ¶
func (m *QueryBetResponse) XXX_Size() int
func (*QueryBetResponse) XXX_Unmarshal ¶
func (m *QueryBetResponse) XXX_Unmarshal(b []byte) error
type QueryBetsByCreatorRequest ¶ added in v0.0.4
type QueryBetsByCreatorRequest struct { Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` }
QueryBetsByUIDsResponse is the request type for bets list of all bets of a bettor Query/BetsByCreator RPC method.
func (*QueryBetsByCreatorRequest) Descriptor ¶ added in v0.0.4
func (*QueryBetsByCreatorRequest) Descriptor() ([]byte, []int)
func (*QueryBetsByCreatorRequest) GetCreator ¶ added in v0.0.4
func (m *QueryBetsByCreatorRequest) GetCreator() string
func (*QueryBetsByCreatorRequest) GetPagination ¶ added in v0.0.4
func (m *QueryBetsByCreatorRequest) GetPagination() *query.PageRequest
func (*QueryBetsByCreatorRequest) Marshal ¶ added in v0.0.4
func (m *QueryBetsByCreatorRequest) Marshal() (dAtA []byte, err error)
func (*QueryBetsByCreatorRequest) MarshalTo ¶ added in v0.0.4
func (m *QueryBetsByCreatorRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryBetsByCreatorRequest) MarshalToSizedBuffer ¶ added in v0.0.4
func (m *QueryBetsByCreatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBetsByCreatorRequest) ProtoMessage ¶ added in v0.0.4
func (*QueryBetsByCreatorRequest) ProtoMessage()
func (*QueryBetsByCreatorRequest) Reset ¶ added in v0.0.4
func (m *QueryBetsByCreatorRequest) Reset()
func (*QueryBetsByCreatorRequest) Size ¶ added in v0.0.4
func (m *QueryBetsByCreatorRequest) Size() (n int)
func (*QueryBetsByCreatorRequest) String ¶ added in v0.0.4
func (m *QueryBetsByCreatorRequest) String() string
func (*QueryBetsByCreatorRequest) Unmarshal ¶ added in v0.0.4
func (m *QueryBetsByCreatorRequest) Unmarshal(dAtA []byte) error
func (*QueryBetsByCreatorRequest) XXX_DiscardUnknown ¶ added in v0.0.4
func (m *QueryBetsByCreatorRequest) XXX_DiscardUnknown()
func (*QueryBetsByCreatorRequest) XXX_Marshal ¶ added in v0.0.4
func (m *QueryBetsByCreatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBetsByCreatorRequest) XXX_Merge ¶ added in v0.0.4
func (m *QueryBetsByCreatorRequest) XXX_Merge(src proto.Message)
func (*QueryBetsByCreatorRequest) XXX_Size ¶ added in v0.0.4
func (m *QueryBetsByCreatorRequest) XXX_Size() int
func (*QueryBetsByCreatorRequest) XXX_Unmarshal ¶ added in v0.0.4
func (m *QueryBetsByCreatorRequest) XXX_Unmarshal(b []byte) error
type QueryBetsByCreatorResponse ¶ added in v0.0.5
type QueryBetsByCreatorResponse struct { Bet []Bet `protobuf:"bytes,1,rep,name=bet,proto3" json:"bet"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryBetsByCreatorResponse is the response type for the bets list of all bets of a bettor Query/BetsByCreator RPC method.
func (*QueryBetsByCreatorResponse) Descriptor ¶ added in v0.0.5
func (*QueryBetsByCreatorResponse) Descriptor() ([]byte, []int)
func (*QueryBetsByCreatorResponse) GetBet ¶ added in v0.0.5
func (m *QueryBetsByCreatorResponse) GetBet() []Bet
func (*QueryBetsByCreatorResponse) GetPagination ¶ added in v0.0.5
func (m *QueryBetsByCreatorResponse) GetPagination() *query.PageResponse
func (*QueryBetsByCreatorResponse) Marshal ¶ added in v0.0.5
func (m *QueryBetsByCreatorResponse) Marshal() (dAtA []byte, err error)
func (*QueryBetsByCreatorResponse) MarshalTo ¶ added in v0.0.5
func (m *QueryBetsByCreatorResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryBetsByCreatorResponse) MarshalToSizedBuffer ¶ added in v0.0.5
func (m *QueryBetsByCreatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBetsByCreatorResponse) ProtoMessage ¶ added in v0.0.5
func (*QueryBetsByCreatorResponse) ProtoMessage()
func (*QueryBetsByCreatorResponse) Reset ¶ added in v0.0.5
func (m *QueryBetsByCreatorResponse) Reset()
func (*QueryBetsByCreatorResponse) Size ¶ added in v0.0.5
func (m *QueryBetsByCreatorResponse) Size() (n int)
func (*QueryBetsByCreatorResponse) String ¶ added in v0.0.5
func (m *QueryBetsByCreatorResponse) String() string
func (*QueryBetsByCreatorResponse) Unmarshal ¶ added in v0.0.5
func (m *QueryBetsByCreatorResponse) Unmarshal(dAtA []byte) error
func (*QueryBetsByCreatorResponse) XXX_DiscardUnknown ¶ added in v0.0.5
func (m *QueryBetsByCreatorResponse) XXX_DiscardUnknown()
func (*QueryBetsByCreatorResponse) XXX_Marshal ¶ added in v0.0.5
func (m *QueryBetsByCreatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBetsByCreatorResponse) XXX_Merge ¶ added in v0.0.5
func (m *QueryBetsByCreatorResponse) XXX_Merge(src proto.Message)
func (*QueryBetsByCreatorResponse) XXX_Size ¶ added in v0.0.5
func (m *QueryBetsByCreatorResponse) XXX_Size() int
func (*QueryBetsByCreatorResponse) XXX_Unmarshal ¶ added in v0.0.5
func (m *QueryBetsByCreatorResponse) XXX_Unmarshal(b []byte) error
type QueryBetsByUIDsRequest ¶ added in v0.0.4
type QueryBetsByUIDsRequest struct {
Items []*QueryBetRequest `protobuf:"bytes,1,rep,name=items,proto3" json:"items"`
}
QueryBetsByUIDsRequest is the request type for a bets list of a certain UID list input Query/BetsByUIDs RPC method.
func (*QueryBetsByUIDsRequest) Descriptor ¶ added in v0.0.4
func (*QueryBetsByUIDsRequest) Descriptor() ([]byte, []int)
func (*QueryBetsByUIDsRequest) GetItems ¶ added in v0.0.4
func (m *QueryBetsByUIDsRequest) GetItems() []*QueryBetRequest
func (*QueryBetsByUIDsRequest) Marshal ¶ added in v0.0.4
func (m *QueryBetsByUIDsRequest) Marshal() (dAtA []byte, err error)
func (*QueryBetsByUIDsRequest) MarshalTo ¶ added in v0.0.4
func (m *QueryBetsByUIDsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryBetsByUIDsRequest) MarshalToSizedBuffer ¶ added in v0.0.4
func (m *QueryBetsByUIDsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBetsByUIDsRequest) ProtoMessage ¶ added in v0.0.4
func (*QueryBetsByUIDsRequest) ProtoMessage()
func (*QueryBetsByUIDsRequest) Reset ¶ added in v0.0.4
func (m *QueryBetsByUIDsRequest) Reset()
func (*QueryBetsByUIDsRequest) Size ¶ added in v0.0.4
func (m *QueryBetsByUIDsRequest) Size() (n int)
func (*QueryBetsByUIDsRequest) String ¶ added in v0.0.4
func (m *QueryBetsByUIDsRequest) String() string
func (*QueryBetsByUIDsRequest) Unmarshal ¶ added in v0.0.4
func (m *QueryBetsByUIDsRequest) Unmarshal(dAtA []byte) error
func (*QueryBetsByUIDsRequest) XXX_DiscardUnknown ¶ added in v0.0.4
func (m *QueryBetsByUIDsRequest) XXX_DiscardUnknown()
func (*QueryBetsByUIDsRequest) XXX_Marshal ¶ added in v0.0.4
func (m *QueryBetsByUIDsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBetsByUIDsRequest) XXX_Merge ¶ added in v0.0.4
func (m *QueryBetsByUIDsRequest) XXX_Merge(src proto.Message)
func (*QueryBetsByUIDsRequest) XXX_Size ¶ added in v0.0.4
func (m *QueryBetsByUIDsRequest) XXX_Size() int
func (*QueryBetsByUIDsRequest) XXX_Unmarshal ¶ added in v0.0.4
func (m *QueryBetsByUIDsRequest) XXX_Unmarshal(b []byte) error
type QueryBetsByUIDsResponse ¶ added in v0.0.4
type QueryBetsByUIDsResponse struct { Bets []Bet `protobuf:"bytes,1,rep,name=bets,proto3" json:"bets"` NotFoundEvents []string `protobuf:"bytes,2,rep,name=not_found_events,json=notFoundEvents,proto3" json:"not_found_events,omitempty"` }
QueryBetsByUIDsResponse is the response type for the bets list of a certain UID list input Query/BetsByUIDs RPC method.
func (*QueryBetsByUIDsResponse) Descriptor ¶ added in v0.0.4
func (*QueryBetsByUIDsResponse) Descriptor() ([]byte, []int)
func (*QueryBetsByUIDsResponse) GetBets ¶ added in v0.0.4
func (m *QueryBetsByUIDsResponse) GetBets() []Bet
func (*QueryBetsByUIDsResponse) GetNotFoundEvents ¶ added in v0.0.4
func (m *QueryBetsByUIDsResponse) GetNotFoundEvents() []string
func (*QueryBetsByUIDsResponse) Marshal ¶ added in v0.0.4
func (m *QueryBetsByUIDsResponse) Marshal() (dAtA []byte, err error)
func (*QueryBetsByUIDsResponse) MarshalTo ¶ added in v0.0.4
func (m *QueryBetsByUIDsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryBetsByUIDsResponse) MarshalToSizedBuffer ¶ added in v0.0.4
func (m *QueryBetsByUIDsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBetsByUIDsResponse) ProtoMessage ¶ added in v0.0.4
func (*QueryBetsByUIDsResponse) ProtoMessage()
func (*QueryBetsByUIDsResponse) Reset ¶ added in v0.0.4
func (m *QueryBetsByUIDsResponse) Reset()
func (*QueryBetsByUIDsResponse) Size ¶ added in v0.0.4
func (m *QueryBetsByUIDsResponse) Size() (n int)
func (*QueryBetsByUIDsResponse) String ¶ added in v0.0.4
func (m *QueryBetsByUIDsResponse) String() string
func (*QueryBetsByUIDsResponse) Unmarshal ¶ added in v0.0.4
func (m *QueryBetsByUIDsResponse) Unmarshal(dAtA []byte) error
func (*QueryBetsByUIDsResponse) XXX_DiscardUnknown ¶ added in v0.0.4
func (m *QueryBetsByUIDsResponse) XXX_DiscardUnknown()
func (*QueryBetsByUIDsResponse) XXX_Marshal ¶ added in v0.0.4
func (m *QueryBetsByUIDsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBetsByUIDsResponse) XXX_Merge ¶ added in v0.0.4
func (m *QueryBetsByUIDsResponse) XXX_Merge(src proto.Message)
func (*QueryBetsByUIDsResponse) XXX_Size ¶ added in v0.0.4
func (m *QueryBetsByUIDsResponse) XXX_Size() int
func (*QueryBetsByUIDsResponse) XXX_Unmarshal ¶ added in v0.0.4
func (m *QueryBetsByUIDsResponse) XXX_Unmarshal(b []byte) error
type QueryBetsRequest ¶ added in v0.0.3
type QueryBetsRequest struct {
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}
QueryBetsRequest is the request type for the bets list query Query/Bets RPC method.
func (*QueryBetsRequest) Descriptor ¶ added in v0.0.3
func (*QueryBetsRequest) Descriptor() ([]byte, []int)
func (*QueryBetsRequest) GetPagination ¶ added in v0.0.3
func (m *QueryBetsRequest) GetPagination() *query.PageRequest
func (*QueryBetsRequest) Marshal ¶ added in v0.0.3
func (m *QueryBetsRequest) Marshal() (dAtA []byte, err error)
func (*QueryBetsRequest) MarshalTo ¶ added in v0.0.3
func (m *QueryBetsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryBetsRequest) MarshalToSizedBuffer ¶ added in v0.0.3
func (m *QueryBetsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBetsRequest) ProtoMessage ¶ added in v0.0.3
func (*QueryBetsRequest) ProtoMessage()
func (*QueryBetsRequest) Reset ¶ added in v0.0.3
func (m *QueryBetsRequest) Reset()
func (*QueryBetsRequest) Size ¶ added in v0.0.3
func (m *QueryBetsRequest) Size() (n int)
func (*QueryBetsRequest) String ¶ added in v0.0.3
func (m *QueryBetsRequest) String() string
func (*QueryBetsRequest) Unmarshal ¶ added in v0.0.3
func (m *QueryBetsRequest) Unmarshal(dAtA []byte) error
func (*QueryBetsRequest) XXX_DiscardUnknown ¶ added in v0.0.3
func (m *QueryBetsRequest) XXX_DiscardUnknown()
func (*QueryBetsRequest) XXX_Marshal ¶ added in v0.0.3
func (m *QueryBetsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBetsRequest) XXX_Merge ¶ added in v0.0.3
func (m *QueryBetsRequest) XXX_Merge(src proto.Message)
func (*QueryBetsRequest) XXX_Size ¶ added in v0.0.3
func (m *QueryBetsRequest) XXX_Size() int
func (*QueryBetsRequest) XXX_Unmarshal ¶ added in v0.0.3
func (m *QueryBetsRequest) XXX_Unmarshal(b []byte) error
type QueryBetsResponse ¶ added in v0.0.3
type QueryBetsResponse struct { Bet []Bet `protobuf:"bytes,1,rep,name=bet,proto3" json:"bet"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryBetsResponse is the response type for the bets list query Query/Bets RPC method.
func (*QueryBetsResponse) Descriptor ¶ added in v0.0.3
func (*QueryBetsResponse) Descriptor() ([]byte, []int)
func (*QueryBetsResponse) GetBet ¶ added in v0.0.3
func (m *QueryBetsResponse) GetBet() []Bet
func (*QueryBetsResponse) GetPagination ¶ added in v0.0.3
func (m *QueryBetsResponse) GetPagination() *query.PageResponse
func (*QueryBetsResponse) Marshal ¶ added in v0.0.3
func (m *QueryBetsResponse) Marshal() (dAtA []byte, err error)
func (*QueryBetsResponse) MarshalTo ¶ added in v0.0.3
func (m *QueryBetsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryBetsResponse) MarshalToSizedBuffer ¶ added in v0.0.3
func (m *QueryBetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBetsResponse) ProtoMessage ¶ added in v0.0.3
func (*QueryBetsResponse) ProtoMessage()
func (*QueryBetsResponse) Reset ¶ added in v0.0.3
func (m *QueryBetsResponse) Reset()
func (*QueryBetsResponse) Size ¶ added in v0.0.3
func (m *QueryBetsResponse) Size() (n int)
func (*QueryBetsResponse) String ¶ added in v0.0.3
func (m *QueryBetsResponse) String() string
func (*QueryBetsResponse) Unmarshal ¶ added in v0.0.3
func (m *QueryBetsResponse) Unmarshal(dAtA []byte) error
func (*QueryBetsResponse) XXX_DiscardUnknown ¶ added in v0.0.3
func (m *QueryBetsResponse) XXX_DiscardUnknown()
func (*QueryBetsResponse) XXX_Marshal ¶ added in v0.0.3
func (m *QueryBetsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBetsResponse) XXX_Merge ¶ added in v0.0.3
func (m *QueryBetsResponse) XXX_Merge(src proto.Message)
func (*QueryBetsResponse) XXX_Size ¶ added in v0.0.3
func (m *QueryBetsResponse) XXX_Size() int
func (*QueryBetsResponse) XXX_Unmarshal ¶ added in v0.0.3
func (m *QueryBetsResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // Params queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Queries a Bet by uid. Bet(ctx context.Context, in *QueryBetRequest, opts ...grpc.CallOption) (*QueryBetResponse, error) // Queries list of Bet items of a certain creator sorted by timestamp. BetsByCreator(ctx context.Context, in *QueryBetsByCreatorRequest, opts ...grpc.CallOption) (*QueryBetsByCreatorResponse, error) // Queries list of Bet items. Bets(ctx context.Context, in *QueryBetsRequest, opts ...grpc.CallOption) (*QueryBetsResponse, error) // Queries a list of Bet items filtered by uid list. BetsByUIDs(ctx context.Context, in *QueryBetsByUIDsRequest, opts ...grpc.CallOption) (*QueryBetsByUIDsResponse, error) // Queries list of Active Bet items. ActiveBets(ctx context.Context, in *QueryActiveBetsRequest, opts ...grpc.CallOption) (*QueryActiveBetsResponse, error) // Queries list of Settled Bet items. SettledBetsOfHeight(ctx context.Context, in *QuerySettledBetsOfHeightRequest, opts ...grpc.CallOption) (*QuerySettledBetsOfHeightResponse, error) }
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryParamsRequest ¶ added in v0.0.5
type QueryParamsRequest struct { }
QueryParamsRequest is the request type for the Query/Params RPC method. Query/Params RPC method.
func (*QueryParamsRequest) Descriptor ¶ added in v0.0.5
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶ added in v0.0.5
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶ added in v0.0.5
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶ added in v0.0.5
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶ added in v0.0.5
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶ added in v0.0.5
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶ added in v0.0.5
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶ added in v0.0.5
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶ added in v0.0.5
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶ added in v0.0.5
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶ added in v0.0.5
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶ added in v0.0.5
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶ added in v0.0.5
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶ added in v0.0.5
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶ added in v0.0.5
type QueryParamsResponse struct { // params holds all the parameters of this module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` }
QueryParamsResponse is the response type for the Query/Params RPC method. Query/Params RPC method.
func (*QueryParamsResponse) Descriptor ¶ added in v0.0.5
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶ added in v0.0.5
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) Marshal ¶ added in v0.0.5
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶ added in v0.0.5
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶ added in v0.0.5
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶ added in v0.0.5
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶ added in v0.0.5
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶ added in v0.0.5
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶ added in v0.0.5
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶ added in v0.0.5
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶ added in v0.0.5
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶ added in v0.0.5
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶ added in v0.0.5
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶ added in v0.0.5
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶ added in v0.0.5
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Params queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Queries a Bet by uid. Bet(context.Context, *QueryBetRequest) (*QueryBetResponse, error) // Queries list of Bet items of a certain creator sorted by timestamp. BetsByCreator(context.Context, *QueryBetsByCreatorRequest) (*QueryBetsByCreatorResponse, error) // Queries list of Bet items. Bets(context.Context, *QueryBetsRequest) (*QueryBetsResponse, error) // Queries a list of Bet items filtered by uid list. BetsByUIDs(context.Context, *QueryBetsByUIDsRequest) (*QueryBetsByUIDsResponse, error) // Queries list of Active Bet items. ActiveBets(context.Context, *QueryActiveBetsRequest) (*QueryActiveBetsResponse, error) // Queries list of Settled Bet items. SettledBetsOfHeight(context.Context, *QuerySettledBetsOfHeightRequest) (*QuerySettledBetsOfHeightResponse, error) }
QueryServer is the server API for Query service.
type QuerySettledBetsOfHeightRequest ¶ added in v0.0.5
type QuerySettledBetsOfHeightRequest struct { Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` BlockHeight int64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` }
QuerySettledBetsOfHeightRequest is the request type for the settled bets of a certain height list query. Query/ActiveBets RPC method.
func (*QuerySettledBetsOfHeightRequest) Descriptor ¶ added in v0.0.5
func (*QuerySettledBetsOfHeightRequest) Descriptor() ([]byte, []int)
func (*QuerySettledBetsOfHeightRequest) GetBlockHeight ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightRequest) GetBlockHeight() int64
func (*QuerySettledBetsOfHeightRequest) GetPagination ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightRequest) GetPagination() *query.PageRequest
func (*QuerySettledBetsOfHeightRequest) Marshal ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightRequest) Marshal() (dAtA []byte, err error)
func (*QuerySettledBetsOfHeightRequest) MarshalTo ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightRequest) MarshalTo(dAtA []byte) (int, error)
func (*QuerySettledBetsOfHeightRequest) MarshalToSizedBuffer ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuerySettledBetsOfHeightRequest) ProtoMessage ¶ added in v0.0.5
func (*QuerySettledBetsOfHeightRequest) ProtoMessage()
func (*QuerySettledBetsOfHeightRequest) Reset ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightRequest) Reset()
func (*QuerySettledBetsOfHeightRequest) Size ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightRequest) Size() (n int)
func (*QuerySettledBetsOfHeightRequest) String ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightRequest) String() string
func (*QuerySettledBetsOfHeightRequest) Unmarshal ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightRequest) Unmarshal(dAtA []byte) error
func (*QuerySettledBetsOfHeightRequest) XXX_DiscardUnknown ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightRequest) XXX_DiscardUnknown()
func (*QuerySettledBetsOfHeightRequest) XXX_Marshal ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuerySettledBetsOfHeightRequest) XXX_Merge ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightRequest) XXX_Merge(src proto.Message)
func (*QuerySettledBetsOfHeightRequest) XXX_Size ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightRequest) XXX_Size() int
func (*QuerySettledBetsOfHeightRequest) XXX_Unmarshal ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightRequest) XXX_Unmarshal(b []byte) error
type QuerySettledBetsOfHeightResponse ¶ added in v0.0.5
type QuerySettledBetsOfHeightResponse struct { Bet []Bet `protobuf:"bytes,1,rep,name=bet,proto3" json:"bet"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QuerySettledBetsOfHeightResponse is the response type for the settled bets of a certain height list query Query/ActiveBets RPC method.
func (*QuerySettledBetsOfHeightResponse) Descriptor ¶ added in v0.0.5
func (*QuerySettledBetsOfHeightResponse) Descriptor() ([]byte, []int)
func (*QuerySettledBetsOfHeightResponse) GetBet ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightResponse) GetBet() []Bet
func (*QuerySettledBetsOfHeightResponse) GetPagination ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightResponse) GetPagination() *query.PageResponse
func (*QuerySettledBetsOfHeightResponse) Marshal ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightResponse) Marshal() (dAtA []byte, err error)
func (*QuerySettledBetsOfHeightResponse) MarshalTo ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightResponse) MarshalTo(dAtA []byte) (int, error)
func (*QuerySettledBetsOfHeightResponse) MarshalToSizedBuffer ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuerySettledBetsOfHeightResponse) ProtoMessage ¶ added in v0.0.5
func (*QuerySettledBetsOfHeightResponse) ProtoMessage()
func (*QuerySettledBetsOfHeightResponse) Reset ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightResponse) Reset()
func (*QuerySettledBetsOfHeightResponse) Size ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightResponse) Size() (n int)
func (*QuerySettledBetsOfHeightResponse) String ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightResponse) String() string
func (*QuerySettledBetsOfHeightResponse) Unmarshal ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightResponse) Unmarshal(dAtA []byte) error
func (*QuerySettledBetsOfHeightResponse) XXX_DiscardUnknown ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightResponse) XXX_DiscardUnknown()
func (*QuerySettledBetsOfHeightResponse) XXX_Marshal ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuerySettledBetsOfHeightResponse) XXX_Merge ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightResponse) XXX_Merge(src proto.Message)
func (*QuerySettledBetsOfHeightResponse) XXX_Size ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightResponse) XXX_Size() int
func (*QuerySettledBetsOfHeightResponse) XXX_Unmarshal ¶ added in v0.0.5
func (m *QuerySettledBetsOfHeightResponse) XXX_Unmarshal(b []byte) error
type SettledBet ¶ added in v0.0.5
type SettledBet struct { // uid is the universal unique identifier for the bet. UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` // bettor_address is the bech32 address of the bettor account. BettorAddress string `protobuf:"bytes,2,opt,name=bettor_address,json=bettorAddress,proto3" json:"bettor_address,omitempty"` }
SettledBet is the type for a settled bet.
func NewSettledBet ¶ added in v0.0.5
func NewSettledBet(uid, bettorAddress string) *SettledBet
func (*SettledBet) Descriptor ¶ added in v0.0.5
func (*SettledBet) Descriptor() ([]byte, []int)
func (*SettledBet) GetBettorAddress ¶ added in v0.0.5
func (m *SettledBet) GetBettorAddress() string
func (*SettledBet) GetUID ¶ added in v0.0.5
func (m *SettledBet) GetUID() string
func (*SettledBet) Marshal ¶ added in v0.0.5
func (m *SettledBet) Marshal() (dAtA []byte, err error)
func (*SettledBet) MarshalTo ¶ added in v0.0.5
func (m *SettledBet) MarshalTo(dAtA []byte) (int, error)
func (*SettledBet) MarshalToSizedBuffer ¶ added in v0.0.5
func (m *SettledBet) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SettledBet) ProtoMessage ¶ added in v0.0.5
func (*SettledBet) ProtoMessage()
func (*SettledBet) Reset ¶ added in v0.0.5
func (m *SettledBet) Reset()
func (*SettledBet) Size ¶ added in v0.0.5
func (m *SettledBet) Size() (n int)
func (*SettledBet) String ¶ added in v0.0.5
func (m *SettledBet) String() string
func (*SettledBet) Unmarshal ¶ added in v0.0.5
func (m *SettledBet) Unmarshal(dAtA []byte) error
func (*SettledBet) XXX_DiscardUnknown ¶ added in v0.0.5
func (m *SettledBet) XXX_DiscardUnknown()
func (*SettledBet) XXX_Marshal ¶ added in v0.0.5
func (m *SettledBet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SettledBet) XXX_Merge ¶ added in v0.0.5
func (m *SettledBet) XXX_Merge(src proto.Message)
func (*SettledBet) XXX_Size ¶ added in v0.0.5
func (m *SettledBet) XXX_Size() int
func (*SettledBet) XXX_Unmarshal ¶ added in v0.0.5
func (m *SettledBet) XXX_Unmarshal(b []byte) error
type SportEventKeeper ¶ added in v0.0.5
type SportEventKeeper interface { GetSportEvent(ctx sdk.Context, sportEventUID string) (sporteventtypes.SportEvent, bool) GetFirstUnsettledResovedSportEvent(ctx sdk.Context) (string, bool) GetDefaultBetConstraints(ctx sdk.Context) (params *sporteventtypes.EventBetConstraints) RemoveUnsettledResolvedSportEvent(ctx sdk.Context, sportEventUID string) }
SportEventKeeper defines the expected interface needed to get sportEvents from KVStore
type UID2ID ¶ added in v0.0.4
type UID2ID struct { // uid is the universal unique identifier assigned to the bet. UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` // id is an autogenerated sequential id for a bet. ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id"` }
UID2ID is the type for mapping UIDs and Sequencial IDs of bets.
func (*UID2ID) Descriptor ¶ added in v0.0.4
func (*UID2ID) MarshalToSizedBuffer ¶ added in v0.0.4
func (*UID2ID) ProtoMessage ¶ added in v0.0.4
func (*UID2ID) ProtoMessage()
func (*UID2ID) XXX_DiscardUnknown ¶ added in v0.0.4
func (m *UID2ID) XXX_DiscardUnknown()
func (*UID2ID) XXX_Marshal ¶ added in v0.0.4
func (*UID2ID) XXX_Unmarshal ¶ added in v0.0.4
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) PlaceBet ¶
func (*UnimplementedMsgServer) PlaceBet(ctx context.Context, req *MsgPlaceBet) (*MsgPlaceBetResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) ActiveBets ¶ added in v0.0.5
func (*UnimplementedQueryServer) ActiveBets(ctx context.Context, req *QueryActiveBetsRequest) (*QueryActiveBetsResponse, error)
func (*UnimplementedQueryServer) Bet ¶
func (*UnimplementedQueryServer) Bet(ctx context.Context, req *QueryBetRequest) (*QueryBetResponse, error)
func (*UnimplementedQueryServer) Bets ¶ added in v0.0.3
func (*UnimplementedQueryServer) Bets(ctx context.Context, req *QueryBetsRequest) (*QueryBetsResponse, error)
func (*UnimplementedQueryServer) BetsByCreator ¶ added in v0.0.4
func (*UnimplementedQueryServer) BetsByCreator(ctx context.Context, req *QueryBetsByCreatorRequest) (*QueryBetsByCreatorResponse, error)
func (*UnimplementedQueryServer) BetsByUIDs ¶ added in v0.0.4
func (*UnimplementedQueryServer) BetsByUIDs(ctx context.Context, req *QueryBetsByUIDsRequest) (*QueryBetsByUIDsResponse, error)
func (*UnimplementedQueryServer) Params ¶ added in v0.0.5
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) SettledBetsOfHeight ¶ added in v0.0.5
func (*UnimplementedQueryServer) SettledBetsOfHeight(ctx context.Context, req *QuerySettledBetsOfHeightRequest) (*QuerySettledBetsOfHeightResponse, error)
Source Files ¶
- bet.go
- bet.pb.go
- bet_odds.pb.go
- codec.go
- const.go
- errors.go
- events.go
- expected_keepers.go
- genesis.go
- genesis.pb.go
- keys.go
- kyc.pb.go
- messages_bet.go
- odds_type.go
- odds_type.pb.go
- params.go
- params.pb.go
- payout.go
- place_bet_fields.pb.go
- query.pb.go
- query.pb.gw.go
- stats.pb.go
- ticket.pb.go
- tx.pb.go
- validation.go