Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) CalcAndWithdraw(ctx sdk.Context, msg *types.MsgWithdraw, depositorAddr string, isOnBehalf bool) (uint64, error)
- func (k Keeper) Deposit(ctx sdk.Context, creator, depositor string, marketUID string, ...) (participationIndex uint64, feeAmount sdkmath.Int, err error)
- func (k Keeper) Deposits(c context.Context, req *types.QueryDepositsRequest) (*types.QueryDepositsResponse, error)
- func (k Keeper) DepositsByAccount(c context.Context, req *types.QueryDepositsByAccountRequest) (*types.QueryDepositsByAccountResponse, error)
- func (k Keeper) GetAllDeposits(ctx sdk.Context) (list []types.Deposit, err error)
- func (k Keeper) GetAllWithdrawals(ctx sdk.Context) (list []types.Withdrawal, err error)
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetDeposit(ctx sdk.Context, depositorAddress, marketUID string, participationIndex uint64) (val types.Deposit, found bool)
- func (k Keeper) GetHouseParticipationFee(ctx sdk.Context) (res sdkmath.LegacyDec)
- func (k Keeper) GetMaxWithdrawalCount(ctx sdk.Context) (res uint64)
- func (k Keeper) GetMinAllowedDepositAmount(ctx sdk.Context) (res sdkmath.Int)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetWithdraw(ctx sdk.Context, depositorAddress, marketUID string, ...) (val types.Withdrawal, found bool)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) ParseDepositTicketAndValidate(goCtx context.Context, ctx sdk.Context, msg *types.MsgDeposit, ...) (string, error)
- func (k Keeper) ParseWithdrawTicketAndValidate(goCtx context.Context, msg *types.MsgWithdraw, authzAllowed bool) (string, bool, error)
- func (k Keeper) SetDeposit(ctx sdk.Context, deposit types.Deposit)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetWithdrawal(ctx sdk.Context, withdrawal types.Withdrawal)
- func (k Keeper) Withdraw(ctx sdk.Context, deposit types.Deposit, creator, depositorAddr string, ...) (uint64, error)
- func (k Keeper) Withdrawal(c context.Context, req *types.QueryWithdrawalRequest) (*types.QueryWithdrawalResponse, error)
- func (k Keeper) WithdrawalsByAccount(c context.Context, req *types.QueryWithdrawalsByAccountRequest) (*types.QueryWithdrawalsByAccountResponse, error)
- type SdkExpectedKeepers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
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 storetypes.StoreKey, orderbookKeeper types.OrderbookKeeper, ovmKeeper types.OVMKeeper, ps paramtypes.Subspace, expectedKeepers SdkExpectedKeepers, authority string, ) *Keeper
NewKeeper returns an instance of the housekeeper
func (Keeper) CalcAndWithdraw ¶ added in v1.3.0
func (k Keeper) CalcAndWithdraw( ctx sdk.Context, msg *types.MsgWithdraw, depositorAddr string, isOnBehalf bool, ) (uint64, error)
CalcAndWithdraw calculates the withdrawable amount and withdraws the deposit.
func (Keeper) Deposit ¶
func (k Keeper) Deposit(ctx sdk.Context, creator, depositor string, marketUID string, amount sdkmath.Int, ) (participationIndex uint64, feeAmount sdkmath.Int, err error)
Deposit performs a deposit transaction and stores a new deposit in store.
func (Keeper) Deposits ¶
func (k Keeper) Deposits( c context.Context, req *types.QueryDepositsRequest, ) (*types.QueryDepositsResponse, error)
Deposits queries all deposits
func (Keeper) DepositsByAccount ¶ added in v0.0.6
func (k Keeper) DepositsByAccount(c context.Context, req *types.QueryDepositsByAccountRequest, ) (*types.QueryDepositsByAccountResponse, error)
DepositsByAccount returns all deposits of a given account address
func (Keeper) GetAllDeposits ¶
GetAllDeposits returns list of deposits.
func (Keeper) GetAllWithdrawals ¶
GetAllWithdrawals returns all withdrawals used during genesis dump.
func (Keeper) GetAuthority ¶ added in v1.4.5
GetAuthority returns the x/house module's authority.
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 ¶
GetHouseParticipationFee returns % of deposit to be paid for house participation by an account
func (Keeper) GetMaxWithdrawalCount ¶ added in v1.1.1
GetMaxWithdrawalCount returns number of max withdrawals allowed per participation
func (Keeper) GetMinAllowedDepositAmount ¶ added in v0.0.6
GetMinAllowedDepositAmount returns minimum acceptable deposit amount.
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 ¶
func (k Keeper) Params( c context.Context, req *types.QueryParamsRequest, ) (*types.QueryParamsResponse, error)
Params returns the params of the module
func (Keeper) ParseDepositTicketAndValidate ¶ added in v1.3.0
func (k Keeper) ParseDepositTicketAndValidate( goCtx context.Context, ctx sdk.Context, msg *types.MsgDeposit, authzAllowed bool, ) (string, error)
ParseDepositTicketAndValidate parses the deposit payload ticket and validate.
func (Keeper) ParseWithdrawTicketAndValidate ¶ added in v1.3.0
func (k Keeper) ParseWithdrawTicketAndValidate( goCtx context.Context, msg *types.MsgWithdraw, authzAllowed bool, ) (string, bool, error)
ParseWithdrawTicketAndValidate parses the withdraw payload ticket and validate.
func (Keeper) SetDeposit ¶
SetDeposit sets a deposit in the store
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, deposit types.Deposit, creator, depositorAddr string, marketUID string, participationIndex uint64, mode types.WithdrawalMode, withdrawableAmount sdkmath.Int, ) (uint64, error)
Withdraw performs a withdrawal of coins of unused amount corresponding to a deposit.
func (Keeper) Withdrawal ¶ added in v0.0.8
func (k Keeper) Withdrawal(c context.Context, req *types.QueryWithdrawalRequest, ) (*types.QueryWithdrawalResponse, error)
Withdrawal returns specific withdrawal.
func (Keeper) WithdrawalsByAccount ¶ added in v0.0.6
func (k Keeper) WithdrawalsByAccount(c context.Context, req *types.QueryWithdrawalsByAccountRequest, ) (*types.QueryWithdrawalsByAccountResponse, error)
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