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) GetAuthority() string
- func (k Keeper) GetBalances(ctx sdk.Context, subAccountAddress sdk.AccAddress, ...) ([]types.LockedBalance, sdkmath.Int)
- func (k Keeper) GetDepositEnabled(ctx sdk.Context) bool
- 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) GetWagerEnabled(ctx sdk.Context) bool
- func (k Keeper) HasLockedBalances(ctx sdk.Context, subAccAddr sdk.AccAddress, time uint64) 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, authority string, ) *Keeper
func (Keeper) CreateSubaccount ¶ added in v1.4.5
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) GetAuthority ¶ added in v1.4.5
GetAuthority returns the x/subaccount module's authority.
func (Keeper) GetBalances ¶ added in v1.4.5
func (k Keeper) GetBalances(ctx sdk.Context, subAccountAddress sdk.AccAddress, balanceType types.LockedBalanceStatus) ([]types.LockedBalance, sdkmath.Int)
etBalances returns the locked balances of an account.
func (Keeper) GetDepositEnabled ¶
GetDepositEnabled returns enable/disable status of deposit
func (Keeper) GetSubaccountByOwner ¶ added in v1.4.5
func (k Keeper) GetSubaccountByOwner(ctx sdk.Context, address sdk.AccAddress) (sdk.AccAddress, bool)
GetSubaccountByOwner returns the subaccount ID of an owner.
func (Keeper) GetSubaccountOwner ¶ added in v1.4.5
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) GetWagerEnabled ¶
GetWagerEnabled returns enable/disable status of wager
func (Keeper) HasLockedBalances ¶ added in v1.4.5
HasLockedBalances returns true if there is an existing locked balance for the sub account address.
func (Keeper) IsSubaccount ¶ added in v1.4.5
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 ¶ added in v1.4.5
func (k Keeper) SetSubaccountOwner(ctx sdk.Context, subAccountAddress, ownerAddress sdk.AccAddress)
SetSubaccountOwner sets the owner of a subaccount.