keeper

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the house MsgServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

keeper of the house store

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, key sdk.StoreKey, obKeeper types.OrderBookKeeper, ps paramtypes.Subspace) *Keeper

NewKeeper creates a new house Keeper instance

func (Keeper) Deposit

func (k Keeper) Deposit(ctx sdk.Context, creator string, sportEventUID string, amount sdk.Int) (participationIndex uint64, err error)

Deposit performs a deposit, set/update everything necessary within the store.

func (Keeper) DepositorDeposits

DepositorDeposits queries all deposits of a give depositor address

func (Keeper) DepositorWithdrawals

DepositorWithdrawals queries all withdrawals of a give depositor address

func (Keeper) Deposits

Deposits queries all deposits

func (Keeper) GetAllDeposits

func (k Keeper) GetAllDeposits(ctx sdk.Context) (list []types.Deposit, err error)

GetAllDeposits returns all deposits used during genesis dump.

func (Keeper) GetAllWithdrawals

func (k Keeper) GetAllWithdrawals(ctx sdk.Context) (list []types.Withdrawal, err error)

GetAllWithdrawals returns all withdrawals used during genesis dump.

func (Keeper) GetDeposit

func (k Keeper) GetDeposit(ctx sdk.Context, depositorAddress, sportEventUID string, participationIndex uint64) (val types.Deposit, found bool)

GetDeposit returns a specific deposit.

func (Keeper) GetHouseParticipationFee

func (k Keeper) GetHouseParticipationFee(ctx sdk.Context) (res sdk.Dec)

GetHouseParticipationFee - % of deposit to be paid for house participation by the user

func (Keeper) GetMinDepositAllowedAmount

func (k Keeper) GetMinDepositAllowedAmount(ctx sdk.Context) (res sdk.Int)

GetMinDepositAllowedAmount - Minum amount of deposit acceptable.

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) types.Params

Get all parameters as types.Params

func (Keeper) Params

Params returns the params of the module

func (Keeper) SetDeposit

func (k Keeper) SetDeposit(ctx sdk.Context, deposit types.Deposit)

SetDeposit sets a deposit.

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

set the params

func (Keeper) SetWithdrawal

func (k Keeper) SetWithdrawal(ctx sdk.Context, withdrawal types.Withdrawal)

SetWithdrawal sets a withdrawal.

func (Keeper) Withdraw

func (k Keeper) Withdraw(ctx sdk.Context, creator string, sportEventUID string, participationIndex uint64, mode types.WithdrawalMode, witAmt sdk.Int) (uint64, error)

Withdraw performs a withdrawal of coins of unused amount corresponding to a deposit.

Jump to

Keyboard shortcuts

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