Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper *Keeper) types.MsgServer
- func NewQueryServer(keeper Keeper) types.QueryServer
- type Hooks
- func (h Hooks) AfterHouseFeeRefund(ctx sdk.Context, house sdk.AccAddress, fee sdkmath.Int)
- func (h Hooks) AfterHouseLoss(ctx sdk.Context, house sdk.AccAddress, originalAmount, lostAmt sdkmath.Int)
- func (h Hooks) AfterHouseRefund(ctx sdk.Context, house sdk.AccAddress, originalAmount sdkmath.Int)
- func (h Hooks) AfterHouseWin(ctx sdk.Context, house sdk.AccAddress, originalAmount, profit sdkmath.Int)
- type Keeper
- func (k Keeper) CreateSubAccount(ctx sdk.Context, creator, owner string, lockedBalances []types.LockedBalance) (string, error)
- func (k Keeper) GetAccountSummary(ctx sdk.Context, subAccountAddress sdk.AccAddress) (types.AccountSummary, bool)
- func (k Keeper) GetAllSubaccounts(ctx sdk.Context) []types.GenesisSubaccount
- func (k Keeper) GetDepositEnabled(ctx sdk.Context) bool
- func (k Keeper) GetLockedBalances(ctx sdk.Context, subAccountAddress sdk.AccAddress) []types.LockedBalance
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetSubAccountByOwner(ctx sdk.Context, address sdk.AccAddress) (sdk.AccAddress, bool)
- func (k Keeper) GetSubAccountOwner(ctx sdk.Context, subAccAddr sdk.AccAddress) (sdk.AccAddress, bool)
- func (k Keeper) GetUnlockedBalance(ctx sdk.Context, subAccountAddress sdk.AccAddress) sdkmath.Int
- func (k Keeper) GetWagerEnabled(ctx sdk.Context) bool
- func (k Keeper) Hooks() Hooks
- func (k Keeper) IsSubAccount(ctx sdk.Context, subAccAddr sdk.AccAddress) bool
- func (k Keeper) IterateSubaccounts(ctx sdk.Context, ...)
- func (k Keeper) NextID(ctx sdk.Context) uint64
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) Peek(ctx sdk.Context) uint64
- func (k Keeper) SetAccountSummary(ctx sdk.Context, subAccountAddress sdk.AccAddress, ...)
- func (k Keeper) SetID(ctx sdk.Context, id uint64)
- func (k Keeper) SetLockedBalances(ctx sdk.Context, subAccountAddress sdk.AccAddress, ...)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetSubAccountOwner(ctx sdk.Context, subAccountAddress, ownerAddress sdk.AccAddress)
- func (k Keeper) TopUp(ctx sdk.Context, creator, subAccOwnerAddr string, ...) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func NewQueryServer ¶
func NewQueryServer(keeper Keeper) types.QueryServer
Types ¶
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Hooks wrapper struct for slashing keeper
func (Hooks) AfterHouseFeeRefund ¶
AfterHouseFeeRefund is subaccount module hook for house fee refund in subaccount deposit.
func (Hooks) AfterHouseLoss ¶
func (h Hooks) AfterHouseLoss(ctx sdk.Context, house sdk.AccAddress, originalAmount, lostAmt sdkmath.Int)
AfterHouseLoss is subaccount module hook for house loss for subbacount.
func (Hooks) AfterHouseRefund ¶
AfterHouseRefund is subaccount module hook for house refund in subaccount deposit.
func (Hooks) AfterHouseWin ¶
func (h Hooks) AfterHouseWin(ctx sdk.Context, house sdk.AccAddress, originalAmount, profit sdkmath.Int)
AfterHouseWin is subaccount module hook for house winning over subbacount.
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.Codec, storeKey storetypes.StoreKey, ps paramtypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, ovmKeeper bettypes.OVMKeeper, betKeeper types.BetKeeper, obKeeper types.OrderBookKeeper, hk types.HouseKeeper, ) *Keeper
func (Keeper) CreateSubAccount ¶
func (Keeper) GetAccountSummary ¶
func (k Keeper) GetAccountSummary(ctx sdk.Context, subAccountAddress sdk.AccAddress) (types.AccountSummary, bool)
GetAccountSummary returns the balance of an account.
func (Keeper) GetAllSubaccounts ¶
func (k Keeper) GetAllSubaccounts(ctx sdk.Context) []types.GenesisSubaccount
func (Keeper) GetDepositEnabled ¶
GetDepositEnabled returns enable/disable status of deposit
func (Keeper) GetLockedBalances ¶
func (k Keeper) GetLockedBalances(ctx sdk.Context, subAccountAddress sdk.AccAddress) []types.LockedBalance
GetLockedBalances returns the locked balances of an account.
func (Keeper) GetSubAccountByOwner ¶
func (k Keeper) GetSubAccountByOwner(ctx sdk.Context, address sdk.AccAddress) (sdk.AccAddress, bool)
GetSubAccountByOwner returns the subaccount ID of an owner.
func (Keeper) GetSubAccountOwner ¶
func (k Keeper) GetSubAccountOwner(ctx sdk.Context, subAccAddr sdk.AccAddress) (sdk.AccAddress, bool)
GetSubAccountOwner returns the owner of a subaccount given the subaccount address.
func (Keeper) GetUnlockedBalance ¶
GetUnlockedBalance returns the unlocked balance of an account.
func (Keeper) GetWagerEnabled ¶
GetWagerEnabled returns enable/disable status of wager
func (Keeper) IsSubAccount ¶
IsSubAccount returns true if the address blongs to a sub account.
func (Keeper) IterateSubaccounts ¶
func (Keeper) NextID ¶
NextID returns the actual value, same as Peek, but also advances the subaccount ID.
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) SetAccountSummary ¶
func (k Keeper) SetAccountSummary(ctx sdk.Context, subAccountAddress sdk.AccAddress, accountSummary types.AccountSummary)
SetAccountSummary saves the balance of an account.
func (Keeper) SetLockedBalances ¶
func (k Keeper) SetLockedBalances(ctx sdk.Context, subAccountAddress sdk.AccAddress, lockedBalances []types.LockedBalance)
SetLockedBalances saves the locked balances of an account.
func (Keeper) SetSubAccountOwner ¶
func (k Keeper) SetSubAccountOwner(ctx sdk.Context, subAccountAddress, ownerAddress sdk.AccAddress)
SetSubAccountOwner sets the owner of a subaccount.