types

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
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 nolint

View Source
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"
)
View Source
const (
	// TypeMsgPlaceBet is type of message MsgPlaceBet
	TypeMsgPlaceBet = "place_bet"
	// TypeMsgPlaceBetSlip is type of message MsgPlaceBetSlip
	TypeMsgPlaceBetSlip = "place_bet_slip"
	// TypeMsgSettleBet is type of message MsgSettleBet
	TypeMsgSettleBet = "settle_bet"
	// TypeMsgSettleBetBulk is type of message MsgSettleBetBulk
	TypeMsgSettleBetBulk = "settle_bet_bulk"

	// 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
)
View Source
const DefaultUID uint64 = 1

DefaultUID is the default capability global uid

Variables

View Source
var (
	ErrInvalidLengthBet        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBet          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBet = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthBetOdds        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBetOdds          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBetOdds = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthBetPlaceFields        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBetPlaceFields          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBetPlaceFields = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// Amino is the legacy aminto codec
	Amino = codec.NewLegacyAmino()
	// ModuleCdc is the codec of the module
	ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)
View Source
var (
	ErrInvalidBetUID              = sdkerrors.Register(ModuleName, 2001, "bet UID is invalid")
	ErrInVerification             = sdkerrors.Register(ModuleName, 2002, "error in verification process")
	ErrBetIsInvalid               = sdkerrors.Register(ModuleName, 2003, "bet is invalid")
	ErrBetIsAborted               = sdkerrors.Register(ModuleName, 2004, "bet is already aborted")
	ErrBetIsCanceled              = sdkerrors.Register(ModuleName, 2005, "bet is already canceled")
	ErrBetIsSettled               = sdkerrors.Register(ModuleName, 2006, "bet is already settled")
	ErrInUnmarshaling             = sdkerrors.Register(ModuleName, 2007, "internal error in unmarshaling")
	ErrInSRBettorLoses            = sdkerrors.Register(ModuleName, 2008, "internal error in processing loss in SR")
	ErrInSRBettorWins             = sdkerrors.Register(ModuleName, 2009, "internal error in processing win in SR")
	ErrNoMatchingSportEvent       = sdkerrors.Register(ModuleName, 2010, "sport event is not found")
	ErrEmptyBetUID                = sdkerrors.Register(ModuleName, 2011, "valid bet UID should be provided")
	ErrInvalidOddsUID             = sdkerrors.Register(ModuleName, 2013, "valid odds UID should be provided")
	ErrInvalidOddsValue           = sdkerrors.Register(ModuleName, 2014, "valid odds value should be provided (odds value more than 1.0)")
	ErrInvalidSportEventUID       = sdkerrors.Register(ModuleName, 2015, "valid sport event UID should be provided")
	ErrInvalidTicket              = sdkerrors.Register(ModuleName, 2016, "valid ticket should be provided")
	ErrInvalidAmount              = sdkerrors.Register(ModuleName, 2017, "valid amount should be provided")
	ErrEmptyUidsList              = sdkerrors.Register(ModuleName, 2018, "empty UIDs list")
	ErrTooManyUids                = sdkerrors.Register(ModuleName, 2019, "too many UIDs")
	ErrInJSONMarshal              = sdkerrors.Register(ModuleName, 2020, "internal error in Json marshaling")
	ErrInMarshaling               = sdkerrors.Register(ModuleName, 2021, "internal error in marshaling")
	ErrNoMatchingBet              = sdkerrors.Register(ModuleName, 2022, "no matching bet")
	ErrResultNotDeclared          = sdkerrors.Register(ModuleName, 2023, "sport event result is not declared")
	ErrDuplicateUID               = sdkerrors.Register(ModuleName, 2024, "UID is already set")
	ErrTooManyBets                = sdkerrors.Register(ModuleName, 2025, "too many bets")
	ErrEmptyBetListRequest        = sdkerrors.Register(ModuleName, 2026, "no bet in the request")
	ErrInSRPlacementProcessing    = sdkerrors.Register(ModuleName, 2027, "internal error in processing bet placement in SR")
	ErrSportEventStatusNotPending = sdkerrors.Register(ModuleName, 2028, "can not place bet on this sport event any more")
	ErrEndTSIsPassed              = sdkerrors.Register(ModuleName, 2029, "the sport event is expired")
	ErrOddsUIDNotExist            = sdkerrors.Register(ModuleName, 2030, "sport event does not have this odds UID")
	ErrSportEventIsAborted        = sdkerrors.Register(ModuleName, 2031, "sport event is aborted")
	ErrInvalidCreatorAddr         = sdkerrors.Register(ModuleName, 2032, "can not cretae an AccAddress from creator")
	ErrInSRRefund                 = sdkerrors.Register(ModuleName, 2033, "internal error in refunding user in SR")
	ErrInactiveSportEvent         = sdkerrors.Register(ModuleName, 2034, "the sport event is not active")
	ErrBetAmountIsLow             = sdkerrors.Register(ModuleName, 2035, "bet amount is lower than the minimum allowed")
	ErrInAddAmountToSportEvent    = sdkerrors.Register(ModuleName, 2036, "internal error in adding bet amount to sport event")
	ErrInConvertingOddsToDec      = sdkerrors.Register(ModuleName, 2037, "internal error in converting odds value from string to sdk.Dec")
	ErrInSubAmountFromSportEvent  = sdkerrors.Register(ModuleName, 2038, "internal error in adding bet amount to sport event")
	ErrTextInvalidCreator         = "invalid creator address (%s)"
)

x/bet module sentinel errors nolint

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// BetListPrefix is the prefix to retrieve all Bet
	BetListPrefix = []byte{0x00}
)
View Source
var Bet_Result_name = map[int32]string{
	0: "RESULT_INVALID",
	1: "RESULT_PENDING",
	2: "RESULT_WON",
	3: "RESULT_LOST",
	4: "RESULT_DRAW",
	5: "RESULT_ABORTED",
}
View Source
var Bet_Result_value = map[string]int32{
	"RESULT_INVALID": 0,
	"RESULT_PENDING": 1,
	"RESULT_WON":     2,
	"RESULT_LOST":    3,
	"RESULT_DRAW":    4,
	"RESULT_ABORTED": 5,
}
View Source
var Bet_Status_name = map[int32]string{
	0: "STATUS_INVALID",
	1: "STATUS_PLACED",
	2: "STATUS_CANCELLED",
	3: "STATUS_ABORTED",
	4: "STATUS_PENDING",
	5: "STATUS_RESULT_DECLARED",
	6: "STATUS_SETTLED",
}
View Source
var Bet_Status_value = map[string]int32{
	"STATUS_INVALID":         0,
	"STATUS_PLACED":          1,
	"STATUS_CANCELLED":       2,
	"STATUS_ABORTED":         3,
	"STATUS_PENDING":         4,
	"STATUS_RESULT_DECLARED": 5,
	"STATUS_SETTLED":         6,
}

Functions

func BetFieldsValidation

func BetFieldsValidation(bet *BetPlaceFields) error

BetFieldsValidation validates fields of the given bet

func IsValidUID

func IsValidUID(uid string) bool

IsValidUID validates the uid

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 RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

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 TicketFieldsValidation

func TicketFieldsValidation(ticketData *BetOdds) error

TicketFieldsValidation validates fields of the given ticketData

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
}

AccountKeeper defines the expected account keeper used for simulations (noalias)

type BankKeeper

type BankKeeper interface {
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected interface needed to retrieve account balances.

type Bet

type Bet struct {
	// uid is the unique uuid assigned to bet
	UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
	// sport_event_uid is the unique uuid of te sportevent on which bet is placed
	SportEventUID string `protobuf:"bytes,2,opt,name=sport_event_uid,proto3" json:"sport_event_uid"`
	// odds_uid is the unique uuid of the odds on which bet is placed
	OddsUID string `protobuf:"bytes,3,opt,name=odds_uid,proto3" json:"odds_uid"`
	// odds_value is the odds on which bet is placed
	OddsValue github_com_cosmos_cosmos_sdk_types.Dec `` /* 128-byte string literal not displayed */
	// amount is the wagger amount deducted by betting fee
	Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"`
	// betFee is the betting fee
	BetFee types.Coin `protobuf:"bytes,6,opt,name=bet_fee,json=betFee,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"bet_fee"`
	// status is the status of the bet, such as `pending` or `settled`
	Status Bet_Status `protobuf:"varint,7,opt,name=status,proto3,enum=sgenetwork.sge.bet.Bet_Status" json:"status,omitempty"`
	// result is the result of bet, sunch as `won` or `lost`
	Result Bet_Result `protobuf:"varint,8,opt,name=result,proto3,enum=sgenetwork.sge.bet.Bet_Result" json:"result,omitempty"`
	// verified shows bet is verified or not
	Verified bool `protobuf:"varint,9,opt,name=verified,proto3" json:"verified,omitempty"`
	// ticket is a signed string containing important info such as `oddsValue`
	Ticket string `protobuf:"bytes,10,opt,name=ticket,proto3" json:"ticket,omitempty"`
	// creator is the bettor address
	Creator   string `protobuf:"bytes,11,opt,name=creator,proto3" json:"creator,omitempty"`
	CreatedAt int64  `protobuf:"varint,12,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
}

func NewBet

func NewBet(creator string, bet *BetPlaceFields, ticketData *BetOdds) (*Bet, error)

NewBet creates and returns a new bet from given message

func (*Bet) Descriptor

func (*Bet) Descriptor() ([]byte, []int)

func (*Bet) GetBetFee

func (m *Bet) GetBetFee() types.Coin

func (*Bet) GetCreatedAt

func (m *Bet) GetCreatedAt() int64

func (*Bet) GetCreator

func (m *Bet) GetCreator() string

func (*Bet) GetOddsUID

func (m *Bet) GetOddsUID() string

func (*Bet) GetResult

func (m *Bet) GetResult() Bet_Result

func (*Bet) GetSportEventUID

func (m *Bet) GetSportEventUID() string

func (*Bet) GetStatus

func (m *Bet) GetStatus() Bet_Status

func (*Bet) GetTicket

func (m *Bet) GetTicket() string

func (*Bet) GetUID

func (m *Bet) GetUID() string

func (*Bet) GetVerified

func (m *Bet) GetVerified() bool

func (*Bet) Marshal

func (m *Bet) Marshal() (dAtA []byte, err error)

func (*Bet) MarshalTo

func (m *Bet) MarshalTo(dAtA []byte) (int, error)

func (*Bet) MarshalToSizedBuffer

func (m *Bet) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Bet) ProtoMessage

func (*Bet) ProtoMessage()

func (*Bet) Reset

func (m *Bet) Reset()

func (*Bet) Size

func (m *Bet) Size() (n int)

func (*Bet) String

func (m *Bet) String() string

func (*Bet) Unmarshal

func (m *Bet) Unmarshal(dAtA []byte) error

func (*Bet) XXX_DiscardUnknown

func (m *Bet) XXX_DiscardUnknown()

func (*Bet) XXX_Marshal

func (m *Bet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Bet) XXX_Merge

func (m *Bet) XXX_Merge(src proto.Message)

func (*Bet) XXX_Size

func (m *Bet) XXX_Size() int

func (*Bet) XXX_Unmarshal

func (m *Bet) XXX_Unmarshal(b []byte) error

type BetOdds

type BetOdds struct {
	// uid is Universal Unique Identifier
	// Optional | Unique | uuid-v4 or code
	UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
	// bet_event_uid is the parent, used for fast retrieving.
	// ? Required | NonUnique | -
	// in Create and Update must be Omitted.
	SportEventUID string `protobuf:"bytes,2,opt,name=sport_event_uid,proto3" json:"sport_event_uid"`
	// value of the Odd
	// Required | NonUnique | "1.286"
	// the double value is not good for the B.C. since we are going to relay on this value, it may face roundoff error or being truncated.
	Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
}

BetOdds is an odds of a sportevent user can place a bet on it.

func (*BetOdds) Descriptor

func (*BetOdds) Descriptor() ([]byte, []int)

func (*BetOdds) GetSportEventUID

func (m *BetOdds) GetSportEventUID() string

func (*BetOdds) GetUID

func (m *BetOdds) GetUID() string

func (*BetOdds) GetValue

func (m *BetOdds) GetValue() string

func (*BetOdds) Marshal

func (m *BetOdds) Marshal() (dAtA []byte, err error)

func (*BetOdds) MarshalTo

func (m *BetOdds) MarshalTo(dAtA []byte) (int, error)

func (*BetOdds) MarshalToSizedBuffer

func (m *BetOdds) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BetOdds) ProtoMessage

func (*BetOdds) ProtoMessage()

func (*BetOdds) Reset

func (m *BetOdds) Reset()

func (*BetOdds) Size

func (m *BetOdds) Size() (n int)

func (*BetOdds) String

func (m *BetOdds) String() string

func (*BetOdds) Unmarshal

func (m *BetOdds) Unmarshal(dAtA []byte) error

func (*BetOdds) XXX_DiscardUnknown

func (m *BetOdds) XXX_DiscardUnknown()

func (*BetOdds) XXX_Marshal

func (m *BetOdds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BetOdds) XXX_Merge

func (m *BetOdds) XXX_Merge(src proto.Message)

func (*BetOdds) XXX_Size

func (m *BetOdds) XXX_Size() int

func (*BetOdds) XXX_Unmarshal

func (m *BetOdds) XXX_Unmarshal(b []byte) error

type BetPlaceFields

type BetPlaceFields struct {
	// uid is the unique uuid assigned to bet
	UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
	// amount is the wagger 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 BetPlacement and BetSlipPlacement TX requests

func (*BetPlaceFields) Descriptor

func (*BetPlaceFields) Descriptor() ([]byte, []int)

func (*BetPlaceFields) GetTicket

func (m *BetPlaceFields) GetTicket() string

func (*BetPlaceFields) GetUID

func (m *BetPlaceFields) GetUID() string

func (*BetPlaceFields) Marshal

func (m *BetPlaceFields) Marshal() (dAtA []byte, err error)

func (*BetPlaceFields) MarshalTo

func (m *BetPlaceFields) MarshalTo(dAtA []byte) (int, error)

func (*BetPlaceFields) MarshalToSizedBuffer

func (m *BetPlaceFields) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BetPlaceFields) ProtoMessage

func (*BetPlaceFields) ProtoMessage()

func (*BetPlaceFields) Reset

func (m *BetPlaceFields) Reset()

func (*BetPlaceFields) Size

func (m *BetPlaceFields) Size() (n int)

func (*BetPlaceFields) String

func (m *BetPlaceFields) String() string

func (*BetPlaceFields) Unmarshal

func (m *BetPlaceFields) Unmarshal(dAtA []byte) error

func (*BetPlaceFields) XXX_DiscardUnknown

func (m *BetPlaceFields) XXX_DiscardUnknown()

func (*BetPlaceFields) XXX_Marshal

func (m *BetPlaceFields) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BetPlaceFields) XXX_Merge

func (m *BetPlaceFields) XXX_Merge(src proto.Message)

func (*BetPlaceFields) XXX_Size

func (m *BetPlaceFields) XXX_Size() int

func (*BetPlaceFields) XXX_Unmarshal

func (m *BetPlaceFields) XXX_Unmarshal(b []byte) error

type Bet_Result

type Bet_Result int32

Result of the bet.

const (
	//the invalid or unknown
	Bet_RESULT_INVALID Bet_Result = 0
	// the result is not decelerated yet.
	Bet_RESULT_PENDING Bet_Result = 1
	// bet is won
	Bet_RESULT_WON Bet_Result = 2
	// bet is lost
	Bet_RESULT_LOST Bet_Result = 3
	// bet is draw
	Bet_RESULT_DRAW Bet_Result = 4
	// bet is aborted
	Bet_RESULT_ABORTED Bet_Result = 5
)

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 unknown status
	Bet_STATUS_INVALID Bet_Status = 0
	//placed bet placed and waiting for result
	Bet_STATUS_PLACED Bet_Status = 1
	//canceled by Bettor
	Bet_STATUS_CANCELLED Bet_Status = 2
	//there was an abort because of force like match canceled or system.
	Bet_STATUS_ABORTED Bet_Status = 3
	//pending for any reason like DVM , see BetEventStatus on this case.
	Bet_STATUS_PENDING Bet_Status = 4
	//the result of the bet is decelerated.
	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  Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	BetList []Bet  `protobuf:"bytes,2,rep,name=bet_list,json=betList,proto3" json:"bet_list"`
}

GenesisState defines the bet module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default Capability genesis state

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetBetList

func (m *GenesisState) GetBetList() []Bet

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, 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 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)
	// PlaceBetSlip defines a method to place multiple bets with the given data
	PlaceBetSlip(ctx context.Context, in *MsgPlaceBetSlip, opts ...grpc.CallOption) (*MsgPlaceBetSlipResponse, error)
	// SettleBet defines a method to settle the given bet
	SettleBet(ctx context.Context, in *MsgSettleBet, opts ...grpc.CallOption) (*MsgSettleBetResponse, error)
	// SettleBetBulk defines a method to settle multiple given bets
	SettleBetBulk(ctx context.Context, in *MsgSettleBetBulk, opts ...grpc.CallOption) (*MsgSettleBetBulkResponse, 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"`
	// bet is the info of bet to place
	Bet *BetPlaceFields `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 BetPlaceFields,

) *MsgPlaceBet

NewMsgPlaceBet returns a MsgPlaceBet using given data

func (*MsgPlaceBet) Descriptor

func (*MsgPlaceBet) Descriptor() ([]byte, []int)

func (*MsgPlaceBet) GetBet

func (m *MsgPlaceBet) GetBet() *BetPlaceFields

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

func (m *MsgPlaceBet) MarshalTo(dAtA []byte) (int, 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) Type

func (msg *MsgPlaceBet) Type() string

Type returns type of its message

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 {
}

MsgPlaceBetResponse is the returning value in the response of MsgPlaceBet request

func (*MsgPlaceBetResponse) Descriptor

func (*MsgPlaceBetResponse) Descriptor() ([]byte, []int)

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 MsgPlaceBetSlip

type MsgPlaceBetSlip struct {
	// creator is the bettor address
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	// bets is an array of bets info to place
	Bets []*BetPlaceFields `protobuf:"bytes,2,rep,name=bets,proto3" json:"bets,omitempty"`
}

MsgPlaceBetSlip defines a message to place multiple bets with the given data

func NewMsgPlaceBetSlip

func NewMsgPlaceBetSlip(creator string, bets []*BetPlaceFields) *MsgPlaceBetSlip

NewMsgPlaceBetSlip returns a MsgPlaceBetSlip using given data

func (*MsgPlaceBetSlip) Descriptor

func (*MsgPlaceBetSlip) Descriptor() ([]byte, []int)

func (*MsgPlaceBetSlip) GetBets

func (m *MsgPlaceBetSlip) GetBets() []*BetPlaceFields

func (*MsgPlaceBetSlip) GetCreator

func (m *MsgPlaceBetSlip) GetCreator() string

func (*MsgPlaceBetSlip) GetSignBytes

func (msg *MsgPlaceBetSlip) GetSignBytes() []byte

GetSignBytes returns sortJson form of its message

func (*MsgPlaceBetSlip) GetSigners

func (msg *MsgPlaceBetSlip) GetSigners() []sdk.AccAddress

GetSigners returns the signers of its message

func (*MsgPlaceBetSlip) Marshal

func (m *MsgPlaceBetSlip) Marshal() (dAtA []byte, err error)

func (*MsgPlaceBetSlip) MarshalTo

func (m *MsgPlaceBetSlip) MarshalTo(dAtA []byte) (int, error)

func (*MsgPlaceBetSlip) MarshalToSizedBuffer

func (m *MsgPlaceBetSlip) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgPlaceBetSlip) ProtoMessage

func (*MsgPlaceBetSlip) ProtoMessage()

func (*MsgPlaceBetSlip) Reset

func (m *MsgPlaceBetSlip) Reset()

func (*MsgPlaceBetSlip) Route

func (msg *MsgPlaceBetSlip) Route() string

Route returns the module's message router key.

func (*MsgPlaceBetSlip) Size

func (m *MsgPlaceBetSlip) Size() (n int)

func (*MsgPlaceBetSlip) String

func (m *MsgPlaceBetSlip) String() string

func (*MsgPlaceBetSlip) Type

func (msg *MsgPlaceBetSlip) Type() string

Type returns type of its message

func (*MsgPlaceBetSlip) Unmarshal

func (m *MsgPlaceBetSlip) Unmarshal(dAtA []byte) error

func (*MsgPlaceBetSlip) ValidateBasic

func (msg *MsgPlaceBetSlip) ValidateBasic() error

ValidateBasic does some validate checks on its message

func (*MsgPlaceBetSlip) XXX_DiscardUnknown

func (m *MsgPlaceBetSlip) XXX_DiscardUnknown()

func (*MsgPlaceBetSlip) XXX_Marshal

func (m *MsgPlaceBetSlip) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgPlaceBetSlip) XXX_Merge

func (m *MsgPlaceBetSlip) XXX_Merge(src proto.Message)

func (*MsgPlaceBetSlip) XXX_Size

func (m *MsgPlaceBetSlip) XXX_Size() int

func (*MsgPlaceBetSlip) XXX_Unmarshal

func (m *MsgPlaceBetSlip) XXX_Unmarshal(b []byte) error

type MsgPlaceBetSlipResponse

type MsgPlaceBetSlipResponse struct {
	// successful_bet_uids_list is an array of successful bet UIDs to place
	SuccessfulBetUIDsList []string `protobuf:"bytes,1,rep,name=successful_bet_uids_list,proto3" json:"successful_bet_uids_list"`
	// failed_bet_uids_error_map is an map of failed bet UIDs to place alongside their failure messages
	FailedBetUIDsErrorMap map[string]string `` /* 181-byte string literal not displayed */
}

MsgPlaceBetSlipResponse is the returning value in the response of MsgPlaceBetSlip request

func (*MsgPlaceBetSlipResponse) Descriptor

func (*MsgPlaceBetSlipResponse) Descriptor() ([]byte, []int)

func (*MsgPlaceBetSlipResponse) GetFailedBetUIDsErrorMap

func (m *MsgPlaceBetSlipResponse) GetFailedBetUIDsErrorMap() map[string]string

func (*MsgPlaceBetSlipResponse) GetSuccessfulBetUIDsList

func (m *MsgPlaceBetSlipResponse) GetSuccessfulBetUIDsList() []string

func (*MsgPlaceBetSlipResponse) Marshal

func (m *MsgPlaceBetSlipResponse) Marshal() (dAtA []byte, err error)

func (*MsgPlaceBetSlipResponse) MarshalTo

func (m *MsgPlaceBetSlipResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgPlaceBetSlipResponse) MarshalToSizedBuffer

func (m *MsgPlaceBetSlipResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgPlaceBetSlipResponse) ProtoMessage

func (*MsgPlaceBetSlipResponse) ProtoMessage()

func (*MsgPlaceBetSlipResponse) Reset

func (m *MsgPlaceBetSlipResponse) Reset()

func (*MsgPlaceBetSlipResponse) Size

func (m *MsgPlaceBetSlipResponse) Size() (n int)

func (*MsgPlaceBetSlipResponse) String

func (m *MsgPlaceBetSlipResponse) String() string

func (*MsgPlaceBetSlipResponse) Unmarshal

func (m *MsgPlaceBetSlipResponse) Unmarshal(dAtA []byte) error

func (*MsgPlaceBetSlipResponse) XXX_DiscardUnknown

func (m *MsgPlaceBetSlipResponse) XXX_DiscardUnknown()

func (*MsgPlaceBetSlipResponse) XXX_Marshal

func (m *MsgPlaceBetSlipResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgPlaceBetSlipResponse) XXX_Merge

func (m *MsgPlaceBetSlipResponse) XXX_Merge(src proto.Message)

func (*MsgPlaceBetSlipResponse) XXX_Size

func (m *MsgPlaceBetSlipResponse) XXX_Size() int

func (*MsgPlaceBetSlipResponse) XXX_Unmarshal

func (m *MsgPlaceBetSlipResponse) 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)
	// PlaceBetSlip defines a method to place multiple bets with the given data
	PlaceBetSlip(context.Context, *MsgPlaceBetSlip) (*MsgPlaceBetSlipResponse, error)
	// SettleBet defines a method to settle the given bet
	SettleBet(context.Context, *MsgSettleBet) (*MsgSettleBetResponse, error)
	// SettleBetBulk defines a method to settle multiple given bets
	SettleBetBulk(context.Context, *MsgSettleBetBulk) (*MsgSettleBetBulkResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSettleBet

type MsgSettleBet struct {
	// creator is the bettor address
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	// bet_uid is the unique uuid of the bet to settle
	BetUID string `protobuf:"bytes,2,opt,name=bet_uid,proto3" json:"bet_uid"`
}

MsgSettleBet defines a message to settle the given bet

func NewMsgSettleBet

func NewMsgSettleBet(creator string, betUID string) *MsgSettleBet

NewMsgSettleBet returns a MsgSettleBet using given data

func (*MsgSettleBet) Descriptor

func (*MsgSettleBet) Descriptor() ([]byte, []int)

func (*MsgSettleBet) GetBetUID

func (m *MsgSettleBet) GetBetUID() string

func (*MsgSettleBet) GetCreator

func (m *MsgSettleBet) GetCreator() string

func (*MsgSettleBet) GetSignBytes

func (msg *MsgSettleBet) GetSignBytes() []byte

GetSignBytes returns sortJson form of its message

func (*MsgSettleBet) GetSigners

func (msg *MsgSettleBet) GetSigners() []sdk.AccAddress

GetSigners returns the signers of its message

func (*MsgSettleBet) Marshal

func (m *MsgSettleBet) Marshal() (dAtA []byte, err error)

func (*MsgSettleBet) MarshalTo

func (m *MsgSettleBet) MarshalTo(dAtA []byte) (int, error)

func (*MsgSettleBet) MarshalToSizedBuffer

func (m *MsgSettleBet) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSettleBet) ProtoMessage

func (*MsgSettleBet) ProtoMessage()

func (*MsgSettleBet) Reset

func (m *MsgSettleBet) Reset()

func (*MsgSettleBet) Route

func (msg *MsgSettleBet) Route() string

Route returns the module's message router key.

func (*MsgSettleBet) Size

func (m *MsgSettleBet) Size() (n int)

func (*MsgSettleBet) String

func (m *MsgSettleBet) String() string

func (*MsgSettleBet) Type

func (msg *MsgSettleBet) Type() string

Type returns type of its message

func (*MsgSettleBet) Unmarshal

func (m *MsgSettleBet) Unmarshal(dAtA []byte) error

func (*MsgSettleBet) ValidateBasic

func (msg *MsgSettleBet) ValidateBasic() error

ValidateBasic does some validate checks on its message

func (*MsgSettleBet) XXX_DiscardUnknown

func (m *MsgSettleBet) XXX_DiscardUnknown()

func (*MsgSettleBet) XXX_Marshal

func (m *MsgSettleBet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSettleBet) XXX_Merge

func (m *MsgSettleBet) XXX_Merge(src proto.Message)

func (*MsgSettleBet) XXX_Size

func (m *MsgSettleBet) XXX_Size() int

func (*MsgSettleBet) XXX_Unmarshal

func (m *MsgSettleBet) XXX_Unmarshal(b []byte) error

type MsgSettleBetBulk

type MsgSettleBetBulk struct {
	// creator is the bettor address
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	// bet_uids is an array of uuid of the bets to settle
	BetUIDs []string `protobuf:"bytes,2,rep,name=bet_uids,proto3" json:"bet_uids"`
}

MsgSettleBetBulk defines a message to settle multiple given bets

func NewMsgSettleBetBulk

func NewMsgSettleBetBulk(creator string, betUIDs []string) *MsgSettleBetBulk

NewMsgSettleBetBulk returns a MsgSettleBetBulk using given data

func (*MsgSettleBetBulk) Descriptor

func (*MsgSettleBetBulk) Descriptor() ([]byte, []int)

func (*MsgSettleBetBulk) GetBetUIDs

func (m *MsgSettleBetBulk) GetBetUIDs() []string

func (*MsgSettleBetBulk) GetCreator

func (m *MsgSettleBetBulk) GetCreator() string

func (*MsgSettleBetBulk) GetSignBytes

func (msg *MsgSettleBetBulk) GetSignBytes() []byte

GetSignBytes returns sortJson form of its message

func (*MsgSettleBetBulk) GetSigners

func (msg *MsgSettleBetBulk) GetSigners() []sdk.AccAddress

GetSigners returns the signers of its message

func (*MsgSettleBetBulk) Marshal

func (m *MsgSettleBetBulk) Marshal() (dAtA []byte, err error)

func (*MsgSettleBetBulk) MarshalTo

func (m *MsgSettleBetBulk) MarshalTo(dAtA []byte) (int, error)

func (*MsgSettleBetBulk) MarshalToSizedBuffer

func (m *MsgSettleBetBulk) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSettleBetBulk) ProtoMessage

func (*MsgSettleBetBulk) ProtoMessage()

func (*MsgSettleBetBulk) Reset

func (m *MsgSettleBetBulk) Reset()

func (*MsgSettleBetBulk) Route

func (msg *MsgSettleBetBulk) Route() string

Route returns the module's message router key.

func (*MsgSettleBetBulk) Size

func (m *MsgSettleBetBulk) Size() (n int)

func (*MsgSettleBetBulk) String

func (m *MsgSettleBetBulk) String() string

func (*MsgSettleBetBulk) Type

func (msg *MsgSettleBetBulk) Type() string

Type returns type of its message

func (*MsgSettleBetBulk) Unmarshal

func (m *MsgSettleBetBulk) Unmarshal(dAtA []byte) error

func (*MsgSettleBetBulk) ValidateBasic

func (msg *MsgSettleBetBulk) ValidateBasic() error

ValidateBasic does some validate checks on its message

func (*MsgSettleBetBulk) XXX_DiscardUnknown

func (m *MsgSettleBetBulk) XXX_DiscardUnknown()

func (*MsgSettleBetBulk) XXX_Marshal

func (m *MsgSettleBetBulk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSettleBetBulk) XXX_Merge

func (m *MsgSettleBetBulk) XXX_Merge(src proto.Message)

func (*MsgSettleBetBulk) XXX_Size

func (m *MsgSettleBetBulk) XXX_Size() int

func (*MsgSettleBetBulk) XXX_Unmarshal

func (m *MsgSettleBetBulk) XXX_Unmarshal(b []byte) error

type MsgSettleBetBulkResponse

type MsgSettleBetBulkResponse struct {
	// successful_bet_uids_list is an array of successful bet UIDs to place
	SuccessfulBetUIDsList []string `protobuf:"bytes,1,rep,name=successful_bet_uids_list,proto3" json:"successful_bet_uids_list"`
	// failed_bet_uids_error_map is an map of failed bet UIDs to place alongside their failure messages
	FailedBetUIDsErrorMap map[string]string `` /* 181-byte string literal not displayed */
}

MsgSettleBetBulkResponse is the returning value in the response of MsgSettleBetBulk request

func (*MsgSettleBetBulkResponse) Descriptor

func (*MsgSettleBetBulkResponse) Descriptor() ([]byte, []int)

func (*MsgSettleBetBulkResponse) GetFailedBetUIDsErrorMap

func (m *MsgSettleBetBulkResponse) GetFailedBetUIDsErrorMap() map[string]string

func (*MsgSettleBetBulkResponse) GetSuccessfulBetUIDsList

func (m *MsgSettleBetBulkResponse) GetSuccessfulBetUIDsList() []string

func (*MsgSettleBetBulkResponse) Marshal

func (m *MsgSettleBetBulkResponse) Marshal() (dAtA []byte, err error)

func (*MsgSettleBetBulkResponse) MarshalTo

func (m *MsgSettleBetBulkResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgSettleBetBulkResponse) MarshalToSizedBuffer

func (m *MsgSettleBetBulkResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSettleBetBulkResponse) ProtoMessage

func (*MsgSettleBetBulkResponse) ProtoMessage()

func (*MsgSettleBetBulkResponse) Reset

func (m *MsgSettleBetBulkResponse) Reset()

func (*MsgSettleBetBulkResponse) Size

func (m *MsgSettleBetBulkResponse) Size() (n int)

func (*MsgSettleBetBulkResponse) String

func (m *MsgSettleBetBulkResponse) String() string

func (*MsgSettleBetBulkResponse) Unmarshal

func (m *MsgSettleBetBulkResponse) Unmarshal(dAtA []byte) error

func (*MsgSettleBetBulkResponse) XXX_DiscardUnknown

func (m *MsgSettleBetBulkResponse) XXX_DiscardUnknown()

func (*MsgSettleBetBulkResponse) XXX_Marshal

func (m *MsgSettleBetBulkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSettleBetBulkResponse) XXX_Merge

func (m *MsgSettleBetBulkResponse) XXX_Merge(src proto.Message)

func (*MsgSettleBetBulkResponse) XXX_Size

func (m *MsgSettleBetBulkResponse) XXX_Size() int

func (*MsgSettleBetBulkResponse) XXX_Unmarshal

func (m *MsgSettleBetBulkResponse) XXX_Unmarshal(b []byte) error

type MsgSettleBetResponse

type MsgSettleBetResponse struct {
}

MsgSettleBetResponse is the returning value in the response of MsgSettleBet request

func (*MsgSettleBetResponse) Descriptor

func (*MsgSettleBetResponse) Descriptor() ([]byte, []int)

func (*MsgSettleBetResponse) Marshal

func (m *MsgSettleBetResponse) Marshal() (dAtA []byte, err error)

func (*MsgSettleBetResponse) MarshalTo

func (m *MsgSettleBetResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgSettleBetResponse) MarshalToSizedBuffer

func (m *MsgSettleBetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSettleBetResponse) ProtoMessage

func (*MsgSettleBetResponse) ProtoMessage()

func (*MsgSettleBetResponse) Reset

func (m *MsgSettleBetResponse) Reset()

func (*MsgSettleBetResponse) Size

func (m *MsgSettleBetResponse) Size() (n int)

func (*MsgSettleBetResponse) String

func (m *MsgSettleBetResponse) String() string

func (*MsgSettleBetResponse) Unmarshal

func (m *MsgSettleBetResponse) Unmarshal(dAtA []byte) error

func (*MsgSettleBetResponse) XXX_DiscardUnknown

func (m *MsgSettleBetResponse) XXX_DiscardUnknown()

func (*MsgSettleBetResponse) XXX_Marshal

func (m *MsgSettleBetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSettleBetResponse) XXX_Merge

func (m *MsgSettleBetResponse) XXX_Merge(src proto.Message)

func (*MsgSettleBetResponse) XXX_Size

func (m *MsgSettleBetResponse) XXX_Size() int

func (*MsgSettleBetResponse) XXX_Unmarshal

func (m *MsgSettleBetResponse) XXX_Unmarshal(b []byte) error

type Params

type Params struct {
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams() Params

NewParams creates a new Params instance

func (*Params) Descriptor

func (*Params) Descriptor() ([]byte, []int)

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs get the params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (Params) String

func (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

func (m *Params) XXX_Unmarshal(b []byte) error

type QueryBetRequest

type QueryBetRequest struct {
	Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
}

func (*QueryBetRequest) Descriptor

func (*QueryBetRequest) Descriptor() ([]byte, []int)

func (*QueryBetRequest) GetUid

func (m *QueryBetRequest) GetUid() string

func (*QueryBetRequest) Marshal

func (m *QueryBetRequest) Marshal() (dAtA []byte, err error)

func (*QueryBetRequest) MarshalTo

func (m *QueryBetRequest) MarshalTo(dAtA []byte) (int, 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"`
}

func (*QueryBetResponse) Descriptor

func (*QueryBetResponse) Descriptor() ([]byte, []int)

func (*QueryBetResponse) GetBet

func (m *QueryBetResponse) GetBet() Bet

func (*QueryBetResponse) Marshal

func (m *QueryBetResponse) Marshal() (dAtA []byte, err error)

func (*QueryBetResponse) MarshalTo

func (m *QueryBetResponse) MarshalTo(dAtA []byte) (int, 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 QueryClient

type QueryClient interface {
	// Queries a Bet by uid.
	Bet(ctx context.Context, in *QueryBetRequest, opts ...grpc.CallOption) (*QueryBetResponse, error)
	// Queries a list of Bet items.
	ListAllBet(ctx context.Context, in *QueryListBetAllRequest, opts ...grpc.CallOption) (*QueryListBetAllResponse, 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 QueryListBetAllRequest

type QueryListBetAllRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryListBetAllRequest) Descriptor

func (*QueryListBetAllRequest) Descriptor() ([]byte, []int)

func (*QueryListBetAllRequest) GetPagination

func (m *QueryListBetAllRequest) GetPagination() *query.PageRequest

func (*QueryListBetAllRequest) Marshal

func (m *QueryListBetAllRequest) Marshal() (dAtA []byte, err error)

func (*QueryListBetAllRequest) MarshalTo

func (m *QueryListBetAllRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryListBetAllRequest) MarshalToSizedBuffer

func (m *QueryListBetAllRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryListBetAllRequest) ProtoMessage

func (*QueryListBetAllRequest) ProtoMessage()

func (*QueryListBetAllRequest) Reset

func (m *QueryListBetAllRequest) Reset()

func (*QueryListBetAllRequest) Size

func (m *QueryListBetAllRequest) Size() (n int)

func (*QueryListBetAllRequest) String

func (m *QueryListBetAllRequest) String() string

func (*QueryListBetAllRequest) Unmarshal

func (m *QueryListBetAllRequest) Unmarshal(dAtA []byte) error

func (*QueryListBetAllRequest) XXX_DiscardUnknown

func (m *QueryListBetAllRequest) XXX_DiscardUnknown()

func (*QueryListBetAllRequest) XXX_Marshal

func (m *QueryListBetAllRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryListBetAllRequest) XXX_Merge

func (m *QueryListBetAllRequest) XXX_Merge(src proto.Message)

func (*QueryListBetAllRequest) XXX_Size

func (m *QueryListBetAllRequest) XXX_Size() int

func (*QueryListBetAllRequest) XXX_Unmarshal

func (m *QueryListBetAllRequest) XXX_Unmarshal(b []byte) error

type QueryListBetAllResponse

type QueryListBetAllResponse 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"`
}

func (*QueryListBetAllResponse) Descriptor

func (*QueryListBetAllResponse) Descriptor() ([]byte, []int)

func (*QueryListBetAllResponse) GetBet

func (m *QueryListBetAllResponse) GetBet() []Bet

func (*QueryListBetAllResponse) GetPagination

func (m *QueryListBetAllResponse) GetPagination() *query.PageResponse

func (*QueryListBetAllResponse) Marshal

func (m *QueryListBetAllResponse) Marshal() (dAtA []byte, err error)

func (*QueryListBetAllResponse) MarshalTo

func (m *QueryListBetAllResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryListBetAllResponse) MarshalToSizedBuffer

func (m *QueryListBetAllResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryListBetAllResponse) ProtoMessage

func (*QueryListBetAllResponse) ProtoMessage()

func (*QueryListBetAllResponse) Reset

func (m *QueryListBetAllResponse) Reset()

func (*QueryListBetAllResponse) Size

func (m *QueryListBetAllResponse) Size() (n int)

func (*QueryListBetAllResponse) String

func (m *QueryListBetAllResponse) String() string

func (*QueryListBetAllResponse) Unmarshal

func (m *QueryListBetAllResponse) Unmarshal(dAtA []byte) error

func (*QueryListBetAllResponse) XXX_DiscardUnknown

func (m *QueryListBetAllResponse) XXX_DiscardUnknown()

func (*QueryListBetAllResponse) XXX_Marshal

func (m *QueryListBetAllResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryListBetAllResponse) XXX_Merge

func (m *QueryListBetAllResponse) XXX_Merge(src proto.Message)

func (*QueryListBetAllResponse) XXX_Size

func (m *QueryListBetAllResponse) XXX_Size() int

func (*QueryListBetAllResponse) XXX_Unmarshal

func (m *QueryListBetAllResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// Queries a Bet by uid.
	Bet(context.Context, *QueryBetRequest) (*QueryBetResponse, error)
	// Queries a list of Bet items.
	ListAllBet(context.Context, *QueryListBetAllRequest) (*QueryListBetAllResponse, error)
}

QueryServer is the server API for Query service.

type SporteventKeeper

type SporteventKeeper interface {
	GetSportEvent(ctx sdk.Context, sportEventUID string) (sporteventtypes.SportEvent, bool)
	AddExtraPayoutToEvent(ctx sdk.Context, sportEventUID string, amount sdk.Int) error
}

SporteventKeeper defines the expected interface needed to get sportEvents from KVStore

type StrategicreserveKeeper

type StrategicreserveKeeper interface {
	ProcessBetPlacement(ctx sdk.Context, bettorAddress sdk.AccAddress,
		betFee sdk.Coin, betAmount sdk.Int, extraPayout sdk.Int, uniqueLock string,
		endTs uint64) error

	BettorWins(ctx sdk.Context, bettorAddress sdk.AccAddress,
		betAmount sdk.Int, extraPayout sdk.Int, uniqueLock string) error

	BettorLoses(ctx sdk.Context, address sdk.AccAddress,
		betAmount sdk.Int, extraPayout sdk.Int, uniqueLock string) error

	RefundBettor(ctx sdk.Context, bettorAddress sdk.AccAddress,
		betAmount sdk.Int, extraPayout sdk.Int, uniqueLock string) error
}

StrategicreserveKeeper defines the expected interface needed to unlock fund and pay out

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) PlaceBet

func (*UnimplementedMsgServer) PlaceBetSlip

func (*UnimplementedMsgServer) SettleBet

func (*UnimplementedMsgServer) SettleBetBulk

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Bet

func (*UnimplementedQueryServer) ListAllBet

Jump to

Keyboard shortcuts

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