types

package
v0.0.0-...-3ec3047 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: 28 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	AttributeKeyParticipationIndex = "deposit_participation_index"

	// AttributeValueCategory is the event attribute for category as module name
	AttributeValueCategory = ModuleName
)
View Source
const (
	// ModuleName is the name of the house module
	ModuleName = "house"

	// StoreKey is the string store representation
	StoreKey = ModuleName

	// QuerierRoute is the querier route for the house module
	QuerierRoute = ModuleName

	// RouterKey is the msg router key for the house module
	RouterKey = ModuleName
)
View Source
const (
	// DefaultMinDeposit is default minimum deposit acceptable.
	DefaultMinDeposit int64 = 100

	// DefaultHouseParticipationFee is default house participation fee.
	DefaultHouseParticipationFee string = "0.1"
)

House params default values

View Source
const (
	ErrTextInvalidDepositor = "invalid depositor address (%s)"
)
View Source
const (
	// HouseParticipationFeeName defines the account name for house participation fee
	HouseParticipationFeeName = "house_participation_fee_pool"
)

module accounts constants

View Source
const (
	TypeMsgDeposit = "create_deposit"
)

Variables

View Source
var (
	// Amino is the legacy aminto codec
	Amino = codec.NewLegacyAmino()
	// ModuleCdc is the codec of the module
	ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)
View Source
var (
	ErrInvalidLengthDeposit        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDeposit          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDeposit = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrEmptyDepositorAddr        = sdkerrors.Register(ModuleName, 5001, "empty depositor address")
	ErrInvalidMarketUID          = sdkerrors.Register(ModuleName, 5002, "invalid market uid")
	ErrInvalidWithdrawMode       = sdkerrors.Register(ModuleName, 5003, "invalid withdrawal mode")
	ErrInvalidIndex              = sdkerrors.Register(ModuleName, 5004, "invalid participant index")
	ErrInvalidAmount             = sdkerrors.Register(ModuleName, 5005, "invalid amount")
	ErrDepositTooSmall           = sdkerrors.Register(ModuleName, 5006, "deposit amount is less than minimum acceptable deposit")
	ErrSRDepositProcessing       = sdkerrors.Register(ModuleName, 5007, "internal error in processing deposit in SR")
	ErrDepositSetting            = sdkerrors.Register(ModuleName, 5008, "internal error in setting deposit")
	ErrInvalidparticipationIndex = sdkerrors.Register(ModuleName, 5009, "invalid participant index")
	ErrInvalidMode               = sdkerrors.Register(ModuleName, 5010, "invalid withdrawal mode")
	ErrDepositNotFound           = sdkerrors.Register(ModuleName, 5011, "deposit not found")
	ErrWithdrawalTooLarge        = sdkerrors.Register(ModuleName, 5012, "withdrawal is more than unused amount")
	ErrSRLiquidateProcessing     = sdkerrors.Register(ModuleName, 5013, "internal error in processing liquidation in SR")
	ErrWrongWithdrawCreator      = sdkerrors.Register(ModuleName, 5014, "withdrawal is only allowed from the depositor account")
)

x/house module sentinel errors

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	DepositKeyPrefix    = []byte{0x00} // prefix for keys that store deposits
	WithdrawalKeyPrefix = []byte{0x01} // prefix for keys that store withdrawals
)
View Source
var (
	KeyMinDeposit            = []byte("MinDeposit")
	KeyHouseParticipationFee = []byte("HouseParticipationFee")
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthWithdraw        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowWithdraw          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupWithdraw = fmt.Errorf("proto: unexpected end of group")
)
View Source
var WithdrawalMode_name = map[int32]string{
	0: "WITHDRAWAL_MODE_UNSPECIFIED",
	1: "WITHDRAWAL_MODE_FULL",
	2: "WITHDRAWAL_MODE_PARTIAL",
}
View Source
var WithdrawalMode_value = map[string]int32{
	"WITHDRAWAL_MODE_UNSPECIFIED": 0,
	"WITHDRAWAL_MODE_FULL":        1,
	"WITHDRAWAL_MODE_PARTIAL":     2,
}

Functions

func GetDepositKey

func GetDepositKey(depositorAddr string, marketUID string, participationIndex uint64) []byte

GetDepositKey creates the key for deposit bond with market and participation

func GetDepositListPrefix

func GetDepositListPrefix(depositorAddr string) []byte

GetDepositListPrefix creates the key for deposit bond with market

func GetWithdrawalKey

func GetWithdrawalKey(depositorAddr string, marketUID string, participationIndex uint64, id uint64) []byte

GetWithdrawalKey creates the key for withdrawal bond with market and deposit

func GetWithdrawalListPrefix

func GetWithdrawalListPrefix(depositorAddr string) []byte

GetWithdrawalListPrefix creates the key for withdrawals bond with market

func MustMarshalWithdrawal

func MustMarshalWithdrawal(cdc codec.BinaryCodec, withdrawal Withdrawal) []byte

MustMarshalWithdrawal returns the withdrawal bytes. Panics if fails

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable for house module

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

RegisterInterfaces registers the x/house interfaces types with the interface registry

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/house interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type Deposit

type Deposit struct {
	// creator is the bech32-encoded address of the depositor.
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"`
	// market_uid is the uid of market/order book against which deposit is being
	// made.
	MarketUID string `protobuf:"bytes,2,opt,name=market_uid,proto3" json:"market_uid"`
	// participation_index is the index corresponding to the order book
	// participation
	ParticipationIndex uint64 `` /* 143-byte string literal not displayed */
	// amount is the amount being deposited on an order book to be a house
	Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount" yaml:"amount"`
	// fee is deducted from the deposited amount for participation in the order
	// book.
	Fee github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=fee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"fee" yaml:"fee"`
	// liquidity is the liquidity being provided to the order book after fee
	// deduction.
	Liquidity github_com_cosmos_cosmos_sdk_types.Int `` /* 128-byte string literal not displayed */
	// withdrawal_count is the total count of the withdrawals from an order book
	WithdrawalCount uint64 `` /* 126-byte string literal not displayed */
	// total_withdrawal_amount is the total amount withdrawn from the liquidity
	// provided
	TotalWithdrawalAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 197-byte string literal not displayed */
}

Deposit represents the deposit against a market held by an account.

func NewDeposit

func NewDeposit(creator, marketUID string, amount, totalAmount sdk.Int, withdrawalCount uint64) Deposit

NewDeposit creates a new deposit object

func (*Deposit) Descriptor

func (*Deposit) Descriptor() ([]byte, []int)

func (*Deposit) Marshal

func (m *Deposit) Marshal() (dAtA []byte, err error)

func (*Deposit) MarshalTo

func (m *Deposit) MarshalTo(dAtA []byte) (int, error)

func (*Deposit) MarshalToSizedBuffer

func (m *Deposit) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Deposit) ProtoMessage

func (*Deposit) ProtoMessage()

func (*Deposit) Reset

func (m *Deposit) Reset()

func (*Deposit) SetHouseParticipationFee

func (d *Deposit) SetHouseParticipationFee(feePercentage sdk.Dec)

SetHouseParticipationFee sets participation fee for house

func (*Deposit) Size

func (m *Deposit) Size() (n int)

func (*Deposit) String

func (d *Deposit) String() string

String returns a human-readable string representation of a Deposit.

func (*Deposit) Unmarshal

func (m *Deposit) Unmarshal(dAtA []byte) error

func (*Deposit) XXX_DiscardUnknown

func (m *Deposit) XXX_DiscardUnknown()

func (*Deposit) XXX_Marshal

func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Deposit) XXX_Merge

func (m *Deposit) XXX_Merge(src proto.Message)

func (*Deposit) XXX_Size

func (m *Deposit) XXX_Size() int

func (*Deposit) XXX_Unmarshal

func (m *Deposit) XXX_Unmarshal(b []byte) error

type GenesisState

type GenesisState struct {
	// params defines the parameters of the house module at genesis
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// deposit_list defines the deposits active at genesis.
	DepositList []Deposit `protobuf:"bytes,2,rep,name=deposit_list,json=depositList,proto3" json:"deposit_list"`
	// withdrawal_list defines the withdrawals active at genesis.
	WithdrawalList []Withdrawal `protobuf:"bytes,3,rep,name=withdrawal_list,json=withdrawalList,proto3" json:"withdrawal_list"`
}

GenesisState defines the house module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetDepositList

func (m *GenesisState) GetDepositList() []Deposit

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetWithdrawalList

func (m *GenesisState) GetWithdrawalList() []Withdrawal

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type MsgClient

type MsgClient interface {
	// Deposit defines a method for performing a deposit of tokens to become part
	// of the order book or be the house for an order book corresponding to a
	// market.
	Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error)
	// Withdraw defines a method for performing a withdrawal of tokens of unused
	// amount corresponding to a deposit.
	Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgDeposit

type MsgDeposit struct {
	// creator is the account who makes a deposit
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"`
	// market_uid is the uid of market/order book against which deposit is being
	// made.
	MarketUID string `protobuf:"bytes,2,opt,name=market_uid,proto3" json:"market_uid"`
	// amount is the amount being deposited on an order book to be a house
	Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"`
}

MsgDeposit defines a SDK message for performing a deposit of coins to become part of the house corresponding to a market.

func NewMsgDeposit

func NewMsgDeposit(creator, marketUID string, amount sdk.Int) *MsgDeposit

NewMsgDeposit creates the new input for adding deposit to blockchain

func (*MsgDeposit) Descriptor

func (*MsgDeposit) Descriptor() ([]byte, []int)

func (*MsgDeposit) GetSignBytes

func (msg *MsgDeposit) GetSignBytes() []byte

GetSignBytes return the marshalled bytes of the msg

func (*MsgDeposit) GetSigners

func (msg *MsgDeposit) GetSigners() []sdk.AccAddress

GetSigners return the creators address

func (*MsgDeposit) Marshal

func (m *MsgDeposit) Marshal() (dAtA []byte, err error)

func (*MsgDeposit) MarshalTo

func (m *MsgDeposit) MarshalTo(dAtA []byte) (int, error)

func (*MsgDeposit) MarshalToSizedBuffer

func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgDeposit) ProtoMessage

func (*MsgDeposit) ProtoMessage()

func (*MsgDeposit) Reset

func (m *MsgDeposit) Reset()

func (*MsgDeposit) Route

func (msg *MsgDeposit) Route() string

Route return the message route for slashing

func (*MsgDeposit) Size

func (m *MsgDeposit) Size() (n int)

func (*MsgDeposit) String

func (m *MsgDeposit) String() string

func (*MsgDeposit) Type

func (msg *MsgDeposit) Type() string

Type returns the msg add market type

func (*MsgDeposit) Unmarshal

func (m *MsgDeposit) Unmarshal(dAtA []byte) error

func (*MsgDeposit) ValidateBasic

func (msg *MsgDeposit) ValidateBasic() error

ValidateBasic validates the input creation market

func (*MsgDeposit) XXX_DiscardUnknown

func (m *MsgDeposit) XXX_DiscardUnknown()

func (*MsgDeposit) XXX_Marshal

func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgDeposit) XXX_Merge

func (m *MsgDeposit) XXX_Merge(src proto.Message)

func (*MsgDeposit) XXX_Size

func (m *MsgDeposit) XXX_Size() int

func (*MsgDeposit) XXX_Unmarshal

func (m *MsgDeposit) XXX_Unmarshal(b []byte) error

type MsgDepositResponse

type MsgDepositResponse struct {
	// market_uid is the uid of market/order book against which deposit is being
	// made.
	MarketUID string `protobuf:"bytes,1,opt,name=market_uid,proto3" json:"market_uid"`
	// participation_index is the index corresponding to the order book
	// participation
	ParticipationIndex uint64 `` /* 143-byte string literal not displayed */
}

MsgDepositResponse defines the Msg/Deposit response type.

func (*MsgDepositResponse) Descriptor

func (*MsgDepositResponse) Descriptor() ([]byte, []int)

func (*MsgDepositResponse) GetMarketUID

func (m *MsgDepositResponse) GetMarketUID() string

func (*MsgDepositResponse) GetParticipationIndex

func (m *MsgDepositResponse) GetParticipationIndex() uint64

func (*MsgDepositResponse) Marshal

func (m *MsgDepositResponse) Marshal() (dAtA []byte, err error)

func (*MsgDepositResponse) MarshalTo

func (m *MsgDepositResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgDepositResponse) MarshalToSizedBuffer

func (m *MsgDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgDepositResponse) ProtoMessage

func (*MsgDepositResponse) ProtoMessage()

func (*MsgDepositResponse) Reset

func (m *MsgDepositResponse) Reset()

func (*MsgDepositResponse) Size

func (m *MsgDepositResponse) Size() (n int)

func (*MsgDepositResponse) String

func (m *MsgDepositResponse) String() string

func (*MsgDepositResponse) Unmarshal

func (m *MsgDepositResponse) Unmarshal(dAtA []byte) error

func (*MsgDepositResponse) XXX_DiscardUnknown

func (m *MsgDepositResponse) XXX_DiscardUnknown()

func (*MsgDepositResponse) XXX_Marshal

func (m *MsgDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgDepositResponse) XXX_Merge

func (m *MsgDepositResponse) XXX_Merge(src proto.Message)

func (*MsgDepositResponse) XXX_Size

func (m *MsgDepositResponse) XXX_Size() int

func (*MsgDepositResponse) XXX_Unmarshal

func (m *MsgDepositResponse) XXX_Unmarshal(b []byte) error

type MsgServer

type MsgServer interface {
	// Deposit defines a method for performing a deposit of tokens to become part
	// of the order book or be the house for an order book corresponding to a
	// market.
	Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error)
	// Withdraw defines a method for performing a withdrawal of tokens of unused
	// amount corresponding to a deposit.
	Withdraw(context.Context, *MsgWithdraw) (*MsgWithdrawResponse, error)
}

MsgServer is the server API for Msg service.

type MsgWithdraw

type MsgWithdraw struct {
	Creator   string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"`
	MarketUID string `protobuf:"bytes,2,opt,name=market_uid,proto3" json:"market_uid"`
	// participation_index is the index corresponding to the order book
	// participation
	ParticipationIndex uint64 `` /* 143-byte string literal not displayed */
	// mode is the withdrawal mode. It can be full or partial withdraw
	Mode WithdrawalMode `protobuf:"varint,4,opt,name=mode,proto3,enum=furynetwork.fury.house.WithdrawalMode" json:"mode,omitempty" yaml:"mode"`
	// amount is the requested withdrawal amount
	Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"`
}

MsgWithdraw defines a SDK message for performing a withdrawal of coins of unused amount corresponding to a deposit.

func NewMsgWithdraw

func NewMsgWithdraw(creator string, marketUID string, amount sdk.Int,
	participationIndex uint64, mode WithdrawalMode,
) *MsgWithdraw

NewMsgWithdraw creates the new input for withdrawal of a deposit

func (*MsgWithdraw) Descriptor

func (*MsgWithdraw) Descriptor() ([]byte, []int)

func (*MsgWithdraw) GetSignBytes

func (msg *MsgWithdraw) GetSignBytes() []byte

GetSignBytes return the marshalled bytes of the msg

func (*MsgWithdraw) GetSigners

func (msg *MsgWithdraw) GetSigners() []sdk.AccAddress

GetSigners return the creators address

func (*MsgWithdraw) Marshal

func (m *MsgWithdraw) Marshal() (dAtA []byte, err error)

func (*MsgWithdraw) MarshalTo

func (m *MsgWithdraw) MarshalTo(dAtA []byte) (int, error)

func (*MsgWithdraw) MarshalToSizedBuffer

func (m *MsgWithdraw) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgWithdraw) ProtoMessage

func (*MsgWithdraw) ProtoMessage()

func (*MsgWithdraw) Reset

func (m *MsgWithdraw) Reset()

func (*MsgWithdraw) Route

func (msg *MsgWithdraw) Route() string

Route return the message route for slashing

func (*MsgWithdraw) Size

func (m *MsgWithdraw) Size() (n int)

func (*MsgWithdraw) String

func (m *MsgWithdraw) String() string

func (*MsgWithdraw) Type

func (msg *MsgWithdraw) Type() string

Type returns the msg add market type

func (*MsgWithdraw) Unmarshal

func (m *MsgWithdraw) Unmarshal(dAtA []byte) error

func (*MsgWithdraw) ValidateBasic

func (msg *MsgWithdraw) ValidateBasic() error

ValidateBasic validates the input creation market

func (*MsgWithdraw) XXX_DiscardUnknown

func (m *MsgWithdraw) XXX_DiscardUnknown()

func (*MsgWithdraw) XXX_Marshal

func (m *MsgWithdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgWithdraw) XXX_Merge

func (m *MsgWithdraw) XXX_Merge(src proto.Message)

func (*MsgWithdraw) XXX_Size

func (m *MsgWithdraw) XXX_Size() int

func (*MsgWithdraw) XXX_Unmarshal

func (m *MsgWithdraw) XXX_Unmarshal(b []byte) error

type MsgWithdrawResponse

type MsgWithdrawResponse struct {
	// id is the unique identifier for the withdrawal
	ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id" yaml:"id"`
	// market_uid is the id of market/order book from which withdrawal is made
	MarketUID string `protobuf:"bytes,2,opt,name=market_uid,proto3" json:"market_uid"`
	// participation_index is the index in order book from which withdrawal is
	// made
	ParticipationIndex uint64 `` /* 143-byte string literal not displayed */
}

MsgWithdrawResponse defines the Msg/Withdraw response type.

func (*MsgWithdrawResponse) Descriptor

func (*MsgWithdrawResponse) Descriptor() ([]byte, []int)

func (*MsgWithdrawResponse) GetID

func (m *MsgWithdrawResponse) GetID() uint64

func (*MsgWithdrawResponse) GetMarketUID

func (m *MsgWithdrawResponse) GetMarketUID() string

func (*MsgWithdrawResponse) GetParticipationIndex

func (m *MsgWithdrawResponse) GetParticipationIndex() uint64

func (*MsgWithdrawResponse) Marshal

func (m *MsgWithdrawResponse) Marshal() (dAtA []byte, err error)

func (*MsgWithdrawResponse) MarshalTo

func (m *MsgWithdrawResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgWithdrawResponse) MarshalToSizedBuffer

func (m *MsgWithdrawResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgWithdrawResponse) ProtoMessage

func (*MsgWithdrawResponse) ProtoMessage()

func (*MsgWithdrawResponse) Reset

func (m *MsgWithdrawResponse) Reset()

func (*MsgWithdrawResponse) Size

func (m *MsgWithdrawResponse) Size() (n int)

func (*MsgWithdrawResponse) String

func (m *MsgWithdrawResponse) String() string

func (*MsgWithdrawResponse) Unmarshal

func (m *MsgWithdrawResponse) Unmarshal(dAtA []byte) error

func (*MsgWithdrawResponse) XXX_DiscardUnknown

func (m *MsgWithdrawResponse) XXX_DiscardUnknown()

func (*MsgWithdrawResponse) XXX_Marshal

func (m *MsgWithdrawResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgWithdrawResponse) XXX_Merge

func (m *MsgWithdrawResponse) XXX_Merge(src proto.Message)

func (*MsgWithdrawResponse) XXX_Size

func (m *MsgWithdrawResponse) XXX_Size() int

func (*MsgWithdrawResponse) XXX_Unmarshal

func (m *MsgWithdrawResponse) XXX_Unmarshal(b []byte) error

type Params

type Params struct {
	// min_deposit is the minimum acceptable deposit amount.
	MinDeposit github_com_cosmos_cosmos_sdk_types.Int `` /* 150-byte string literal not displayed */
	// house_participation_fee is the % of the deposit to be paid for a house
	// participation by the depositor.
	HouseParticipationFee github_com_cosmos_cosmos_sdk_types.Dec `` /* 166-byte string literal not displayed */
}

Params define the parameters for the house module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func NewParams

func NewParams(minDeposit sdk.Int, houseParticipationFee sdk.Dec) Params

NewParams creates a new Params instance

func (*Params) Descriptor

func (*Params) Descriptor() ([]byte, []int)

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs implements params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (Params) String

func (p Params) String() string

String returns a human-readable string representation of the parameters.

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (Params) Validate

func (p Params) Validate() error

Validate a set of params

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

func (m *Params) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// Params queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Deposits queries all deposits.
	Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error)
	// DepositsByAccount queries deposits info for given account.
	DepositsByAccount(ctx context.Context, in *QueryDepositsByAccountRequest, opts ...grpc.CallOption) (*QueryDepositsByAccountResponse, error)
	// WithdrawalsByAccount queries withdrawals info for given account.
	WithdrawalsByAccount(ctx context.Context, in *QueryWithdrawalsByAccountRequest, opts ...grpc.CallOption) (*QueryWithdrawalsByAccountResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryDepositsByAccountRequest

type QueryDepositsByAccountRequest struct {
	// address defines the address of depositor/account for which deposits are
	// queried.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositsByAccountRequest is request type for Query/DepositsByAccount RPC method.

func (*QueryDepositsByAccountRequest) Descriptor

func (*QueryDepositsByAccountRequest) Descriptor() ([]byte, []int)

func (*QueryDepositsByAccountRequest) GetAddress

func (m *QueryDepositsByAccountRequest) GetAddress() string

func (*QueryDepositsByAccountRequest) GetPagination

func (m *QueryDepositsByAccountRequest) GetPagination() *query.PageRequest

func (*QueryDepositsByAccountRequest) Marshal

func (m *QueryDepositsByAccountRequest) Marshal() (dAtA []byte, err error)

func (*QueryDepositsByAccountRequest) MarshalTo

func (m *QueryDepositsByAccountRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryDepositsByAccountRequest) MarshalToSizedBuffer

func (m *QueryDepositsByAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryDepositsByAccountRequest) ProtoMessage

func (*QueryDepositsByAccountRequest) ProtoMessage()

func (*QueryDepositsByAccountRequest) Reset

func (m *QueryDepositsByAccountRequest) Reset()

func (*QueryDepositsByAccountRequest) Size

func (m *QueryDepositsByAccountRequest) Size() (n int)

func (*QueryDepositsByAccountRequest) String

func (*QueryDepositsByAccountRequest) Unmarshal

func (m *QueryDepositsByAccountRequest) Unmarshal(dAtA []byte) error

func (*QueryDepositsByAccountRequest) XXX_DiscardUnknown

func (m *QueryDepositsByAccountRequest) XXX_DiscardUnknown()

func (*QueryDepositsByAccountRequest) XXX_Marshal

func (m *QueryDepositsByAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryDepositsByAccountRequest) XXX_Merge

func (m *QueryDepositsByAccountRequest) XXX_Merge(src proto.Message)

func (*QueryDepositsByAccountRequest) XXX_Size

func (m *QueryDepositsByAccountRequest) XXX_Size() int

func (*QueryDepositsByAccountRequest) XXX_Unmarshal

func (m *QueryDepositsByAccountRequest) XXX_Unmarshal(b []byte) error

type QueryDepositsByAccountResponse

type QueryDepositsByAccountResponse struct {
	// deposits contains all the queried deposits.
	Deposits []Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositsByAccountResponse is response type for the Query/DepositsByAccount RPC method

func (*QueryDepositsByAccountResponse) Descriptor

func (*QueryDepositsByAccountResponse) Descriptor() ([]byte, []int)

func (*QueryDepositsByAccountResponse) GetDeposits

func (m *QueryDepositsByAccountResponse) GetDeposits() []Deposit

func (*QueryDepositsByAccountResponse) GetPagination

func (*QueryDepositsByAccountResponse) Marshal

func (m *QueryDepositsByAccountResponse) Marshal() (dAtA []byte, err error)

func (*QueryDepositsByAccountResponse) MarshalTo

func (m *QueryDepositsByAccountResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryDepositsByAccountResponse) MarshalToSizedBuffer

func (m *QueryDepositsByAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryDepositsByAccountResponse) ProtoMessage

func (*QueryDepositsByAccountResponse) ProtoMessage()

func (*QueryDepositsByAccountResponse) Reset

func (m *QueryDepositsByAccountResponse) Reset()

func (*QueryDepositsByAccountResponse) Size

func (m *QueryDepositsByAccountResponse) Size() (n int)

func (*QueryDepositsByAccountResponse) String

func (*QueryDepositsByAccountResponse) Unmarshal

func (m *QueryDepositsByAccountResponse) Unmarshal(dAtA []byte) error

func (*QueryDepositsByAccountResponse) XXX_DiscardUnknown

func (m *QueryDepositsByAccountResponse) XXX_DiscardUnknown()

func (*QueryDepositsByAccountResponse) XXX_Marshal

func (m *QueryDepositsByAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryDepositsByAccountResponse) XXX_Merge

func (m *QueryDepositsByAccountResponse) XXX_Merge(src proto.Message)

func (*QueryDepositsByAccountResponse) XXX_Size

func (m *QueryDepositsByAccountResponse) XXX_Size() int

func (*QueryDepositsByAccountResponse) XXX_Unmarshal

func (m *QueryDepositsByAccountResponse) XXX_Unmarshal(b []byte) error

type QueryDepositsRequest

type QueryDepositsRequest struct {
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositsRequest is request type for Query/Deposits RPC method.

func (*QueryDepositsRequest) Descriptor

func (*QueryDepositsRequest) Descriptor() ([]byte, []int)

func (*QueryDepositsRequest) GetPagination

func (m *QueryDepositsRequest) GetPagination() *query.PageRequest

func (*QueryDepositsRequest) Marshal

func (m *QueryDepositsRequest) Marshal() (dAtA []byte, err error)

func (*QueryDepositsRequest) MarshalTo

func (m *QueryDepositsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryDepositsRequest) MarshalToSizedBuffer

func (m *QueryDepositsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryDepositsRequest) ProtoMessage

func (*QueryDepositsRequest) ProtoMessage()

func (*QueryDepositsRequest) Reset

func (m *QueryDepositsRequest) Reset()

func (*QueryDepositsRequest) Size

func (m *QueryDepositsRequest) Size() (n int)

func (*QueryDepositsRequest) String

func (m *QueryDepositsRequest) String() string

func (*QueryDepositsRequest) Unmarshal

func (m *QueryDepositsRequest) Unmarshal(dAtA []byte) error

func (*QueryDepositsRequest) XXX_DiscardUnknown

func (m *QueryDepositsRequest) XXX_DiscardUnknown()

func (*QueryDepositsRequest) XXX_Marshal

func (m *QueryDepositsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryDepositsRequest) XXX_Merge

func (m *QueryDepositsRequest) XXX_Merge(src proto.Message)

func (*QueryDepositsRequest) XXX_Size

func (m *QueryDepositsRequest) XXX_Size() int

func (*QueryDepositsRequest) XXX_Unmarshal

func (m *QueryDepositsRequest) XXX_Unmarshal(b []byte) error

type QueryDepositsResponse

type QueryDepositsResponse struct {
	// deposits is the list of deposits returned for the request.
	Deposits []Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositsResponse is response type for the Query/Deposits RPC method

func (*QueryDepositsResponse) Descriptor

func (*QueryDepositsResponse) Descriptor() ([]byte, []int)

func (*QueryDepositsResponse) GetDeposits

func (m *QueryDepositsResponse) GetDeposits() []Deposit

func (*QueryDepositsResponse) GetPagination

func (m *QueryDepositsResponse) GetPagination() *query.PageResponse

func (*QueryDepositsResponse) Marshal

func (m *QueryDepositsResponse) Marshal() (dAtA []byte, err error)

func (*QueryDepositsResponse) MarshalTo

func (m *QueryDepositsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryDepositsResponse) MarshalToSizedBuffer

func (m *QueryDepositsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryDepositsResponse) ProtoMessage

func (*QueryDepositsResponse) ProtoMessage()

func (*QueryDepositsResponse) Reset

func (m *QueryDepositsResponse) Reset()

func (*QueryDepositsResponse) Size

func (m *QueryDepositsResponse) Size() (n int)

func (*QueryDepositsResponse) String

func (m *QueryDepositsResponse) String() string

func (*QueryDepositsResponse) Unmarshal

func (m *QueryDepositsResponse) Unmarshal(dAtA []byte) error

func (*QueryDepositsResponse) XXX_DiscardUnknown

func (m *QueryDepositsResponse) XXX_DiscardUnknown()

func (*QueryDepositsResponse) XXX_Marshal

func (m *QueryDepositsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryDepositsResponse) XXX_Merge

func (m *QueryDepositsResponse) XXX_Merge(src proto.Message)

func (*QueryDepositsResponse) XXX_Size

func (m *QueryDepositsResponse) XXX_Size() int

func (*QueryDepositsResponse) XXX_Unmarshal

func (m *QueryDepositsResponse) XXX_Unmarshal(b []byte) error

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method. Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

func (*QueryParamsRequest) Descriptor() ([]byte, []int)

func (*QueryParamsRequest) Marshal

func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)

func (*QueryParamsRequest) MarshalTo

func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsRequest) MarshalToSizedBuffer

func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

func (m *QueryParamsRequest) Size() (n int)

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsRequest) XXX_Merge

func (m *QueryParamsRequest) XXX_Merge(src proto.Message)

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error

type QueryParamsResponse

type QueryParamsResponse struct {
	// params holds all the parameters of this module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is the response type for the Query/Params RPC method. Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

func (*QueryParamsResponse) Descriptor() ([]byte, []int)

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)

func (*QueryParamsResponse) MarshalTo

func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsResponse) MarshalToSizedBuffer

func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

func (m *QueryParamsResponse) Size() (n int)

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsResponse) XXX_Merge

func (m *QueryParamsResponse) XXX_Merge(src proto.Message)

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// Params queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Deposits queries all deposits.
	Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error)
	// DepositsByAccount queries deposits info for given account.
	DepositsByAccount(context.Context, *QueryDepositsByAccountRequest) (*QueryDepositsByAccountResponse, error)
	// WithdrawalsByAccount queries withdrawals info for given account.
	WithdrawalsByAccount(context.Context, *QueryWithdrawalsByAccountRequest) (*QueryWithdrawalsByAccountResponse, error)
}

QueryServer is the server API for Query service.

type QueryWithdrawalsByAccountRequest

type QueryWithdrawalsByAccountRequest struct {
	// address defines the address of depositor/account for which withdrawals are
	// queried.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositorWithdrawalsRequest is request type for Query/WithdrawalsByAccount RPC method.

func (*QueryWithdrawalsByAccountRequest) Descriptor

func (*QueryWithdrawalsByAccountRequest) Descriptor() ([]byte, []int)

func (*QueryWithdrawalsByAccountRequest) GetAddress

func (m *QueryWithdrawalsByAccountRequest) GetAddress() string

func (*QueryWithdrawalsByAccountRequest) GetPagination

func (*QueryWithdrawalsByAccountRequest) Marshal

func (m *QueryWithdrawalsByAccountRequest) Marshal() (dAtA []byte, err error)

func (*QueryWithdrawalsByAccountRequest) MarshalTo

func (m *QueryWithdrawalsByAccountRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryWithdrawalsByAccountRequest) MarshalToSizedBuffer

func (m *QueryWithdrawalsByAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryWithdrawalsByAccountRequest) ProtoMessage

func (*QueryWithdrawalsByAccountRequest) ProtoMessage()

func (*QueryWithdrawalsByAccountRequest) Reset

func (*QueryWithdrawalsByAccountRequest) Size

func (m *QueryWithdrawalsByAccountRequest) Size() (n int)

func (*QueryWithdrawalsByAccountRequest) String

func (*QueryWithdrawalsByAccountRequest) Unmarshal

func (m *QueryWithdrawalsByAccountRequest) Unmarshal(dAtA []byte) error

func (*QueryWithdrawalsByAccountRequest) XXX_DiscardUnknown

func (m *QueryWithdrawalsByAccountRequest) XXX_DiscardUnknown()

func (*QueryWithdrawalsByAccountRequest) XXX_Marshal

func (m *QueryWithdrawalsByAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryWithdrawalsByAccountRequest) XXX_Merge

func (*QueryWithdrawalsByAccountRequest) XXX_Size

func (m *QueryWithdrawalsByAccountRequest) XXX_Size() int

func (*QueryWithdrawalsByAccountRequest) XXX_Unmarshal

func (m *QueryWithdrawalsByAccountRequest) XXX_Unmarshal(b []byte) error

type QueryWithdrawalsByAccountResponse

type QueryWithdrawalsByAccountResponse struct {
	// withdrawals contains all the queried withdrawals.
	Withdrawals []Withdrawal `protobuf:"bytes,1,rep,name=withdrawals,proto3" json:"withdrawals"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryWithdrawalsByAccountResponse is response type for the Query/WithdrawalsByAccount RPC method

func (*QueryWithdrawalsByAccountResponse) Descriptor

func (*QueryWithdrawalsByAccountResponse) Descriptor() ([]byte, []int)

func (*QueryWithdrawalsByAccountResponse) GetPagination

func (*QueryWithdrawalsByAccountResponse) GetWithdrawals

func (m *QueryWithdrawalsByAccountResponse) GetWithdrawals() []Withdrawal

func (*QueryWithdrawalsByAccountResponse) Marshal

func (m *QueryWithdrawalsByAccountResponse) Marshal() (dAtA []byte, err error)

func (*QueryWithdrawalsByAccountResponse) MarshalTo

func (m *QueryWithdrawalsByAccountResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryWithdrawalsByAccountResponse) MarshalToSizedBuffer

func (m *QueryWithdrawalsByAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryWithdrawalsByAccountResponse) ProtoMessage

func (*QueryWithdrawalsByAccountResponse) ProtoMessage()

func (*QueryWithdrawalsByAccountResponse) Reset

func (*QueryWithdrawalsByAccountResponse) Size

func (m *QueryWithdrawalsByAccountResponse) Size() (n int)

func (*QueryWithdrawalsByAccountResponse) String

func (*QueryWithdrawalsByAccountResponse) Unmarshal

func (m *QueryWithdrawalsByAccountResponse) Unmarshal(dAtA []byte) error

func (*QueryWithdrawalsByAccountResponse) XXX_DiscardUnknown

func (m *QueryWithdrawalsByAccountResponse) XXX_DiscardUnknown()

func (*QueryWithdrawalsByAccountResponse) XXX_Marshal

func (m *QueryWithdrawalsByAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryWithdrawalsByAccountResponse) XXX_Merge

func (*QueryWithdrawalsByAccountResponse) XXX_Size

func (m *QueryWithdrawalsByAccountResponse) XXX_Size() int

func (*QueryWithdrawalsByAccountResponse) XXX_Unmarshal

func (m *QueryWithdrawalsByAccountResponse) XXX_Unmarshal(b []byte) error

type SRKeeper

type SRKeeper interface {
	InitiateOrderBookParticipation(ctx sdk.Context, addr sdk.AccAddress,
		bookUID string, liquidity, fee sdk.Int) (uint64, error)
	WithdrawOrderBookParticipation(ctx sdk.Context, depAddr,
		bookUID string, bpNumber uint64, mode WithdrawalMode, amount sdk.Int) (sdk.Int, error)
}

SRKeeper defines the expected strategicreserve keeper.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Deposit

func (*UnimplementedMsgServer) Withdraw

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Deposits

func (*UnimplementedQueryServer) DepositsByAccount

func (*UnimplementedQueryServer) Params

type Withdrawal

type Withdrawal struct {
	// withdrawal is the withdrawal attempt id.
	ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id" yaml:"id"`
	// address is the bech32-encoded address of the depositor.
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" yaml:"address"`
	// market_uid is the uid of market against which the deposit is
	// being made.
	MarketUID string `protobuf:"bytes,3,opt,name=market_uid,proto3" json:"market_uid"`
	// participation_index is the id corresponding to the book participation
	ParticipationIndex uint64 `` /* 143-byte string literal not displayed */
	// mode is the withdrawal mode enum value
	Mode WithdrawalMode `protobuf:"varint,5,opt,name=mode,proto3,enum=furynetwork.fury.house.WithdrawalMode" json:"mode,omitempty" yaml:"mode"`
	// amount is the amount being withdrawn.
	Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount" yaml:"amount"`
}

Withdrawal represents the withdrawal against a deposit.

func NewWithdrawal

func NewWithdrawal(id uint64, depositorAddr, marketUID string, participationIndex uint64, amount sdk.Int, mode WithdrawalMode) Withdrawal

NewWithdrawal creates a new withdrawal object

func UnmarshalWithdrawal

func UnmarshalWithdrawal(cdc codec.BinaryCodec, value []byte) (withdrawal Withdrawal, err error)

return the withdrawal

func (*Withdrawal) Descriptor

func (*Withdrawal) Descriptor() ([]byte, []int)

func (*Withdrawal) Marshal

func (m *Withdrawal) Marshal() (dAtA []byte, err error)

func (*Withdrawal) MarshalTo

func (m *Withdrawal) MarshalTo(dAtA []byte) (int, error)

func (*Withdrawal) MarshalToSizedBuffer

func (m *Withdrawal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Withdrawal) ProtoMessage

func (*Withdrawal) ProtoMessage()

func (*Withdrawal) Reset

func (m *Withdrawal) Reset()

func (*Withdrawal) Size

func (m *Withdrawal) Size() (n int)

func (Withdrawal) String

func (w Withdrawal) String() string

String returns a human-readable string representation of a Withdrawal.

func (*Withdrawal) Unmarshal

func (m *Withdrawal) Unmarshal(dAtA []byte) error

func (*Withdrawal) XXX_DiscardUnknown

func (m *Withdrawal) XXX_DiscardUnknown()

func (*Withdrawal) XXX_Marshal

func (m *Withdrawal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Withdrawal) XXX_Merge

func (m *Withdrawal) XXX_Merge(src proto.Message)

func (*Withdrawal) XXX_Size

func (m *Withdrawal) XXX_Size() int

func (*Withdrawal) XXX_Unmarshal

func (m *Withdrawal) XXX_Unmarshal(b []byte) error

type WithdrawalMode

type WithdrawalMode int32

WithdrawalMode is the enum type for the withdrawal mode.

const (
	// invalid
	WithdrawalMode_WITHDRAWAL_MODE_UNSPECIFIED WithdrawalMode = 0
	// full
	WithdrawalMode_WITHDRAWAL_MODE_FULL WithdrawalMode = 1
	// partial
	WithdrawalMode_WITHDRAWAL_MODE_PARTIAL WithdrawalMode = 2
)

func (WithdrawalMode) EnumDescriptor

func (WithdrawalMode) EnumDescriptor() ([]byte, []int)

func (WithdrawalMode) String

func (x WithdrawalMode) String() string

Jump to

Keyboard shortcuts

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