keeper

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 11 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,
	orderbookKeeper types.OrderbookKeeper,
	ovmKeeper types.OVMKeeper,
	ps paramtypes.Subspace,
	expectedKeepers SdkExpectedKeepers,
) *Keeper

NewKeeper returns an instance of the housekeeper

func (Keeper) Deposit

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

Deposit performs a deposit transaction and stores a new deposit in store.

func (Keeper) Deposits

Deposits queries all deposits

func (Keeper) DepositsByAccount added in v0.0.6

DepositsByAccount returns all deposits of a given account address

func (Keeper) GetAllDeposits

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

GetAllDeposits returns list of deposits.

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,
	marketUID string, participationIndex uint64,
) (val types.Deposit, found bool)

GetDeposit returns a specific deposit from the store.

func (Keeper) GetHouseParticipationFee

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

GetHouseParticipationFee returns % of deposit to be paid for house participation by an account

func (Keeper) GetMinAllowedDepositAmount added in v0.0.6

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

GetMinAllowedDepositAmount returns minimum acceptable deposit amount.

func (Keeper) GetParams

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

GetParams return parameters of the module

func (Keeper) GetWithdraw added in v0.0.8

func (k Keeper) GetWithdraw(ctx sdk.Context, depositorAddress,
	marketUID string, participationIndex, id uint64,
) (val types.Withdrawal, found bool)

GetWithdraw returns a specific withdrawal from the store.

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 in the store

func (Keeper) SetParams

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

SetParams set the params for the module

func (Keeper) SetWithdrawal

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

SetWithdrawal sets a withdrawal.

func (Keeper) ValidateMsgAuthorization added in v0.0.8

func (k Keeper) ValidateMsgAuthorization(
	ctx sdk.Context,
	creator, depositor string,
	msg sdk.Msg,
) error

func (Keeper) Withdraw

func (k Keeper) Withdraw(
	ctx sdk.Context,
	deposit types.Deposit,
	creator, depositorAddr string,
	marketUID string,
	participationIndex uint64,
	mode types.WithdrawalMode,
	withdrawableAmount sdk.Int,
) (uint64, error)

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

func (Keeper) Withdrawal added in v0.0.8

Withdrawal returns specific withdrawal.

func (Keeper) WithdrawalsByAccount added in v0.0.6

WithdrawalsByAccount returns all withdrawals of a given account address

type SdkExpectedKeepers added in v0.0.8

type SdkExpectedKeepers struct {
	AuthzKeeper types.AuthzKeeper
}

SdkExpectedKeepers contains expected keepers parameter needed by NewKeeper

Jump to

Keyboard shortcuts

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