types

package
v0.10.21 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MPL-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DefaultCodespace sdk.CodespaceType = 6

	// CodeIncorrectDexOperation module reserves error 400-499
	CodeIncorrectDexOperation   sdk.CodeType = 400
	CodeInvalidOrderParam       sdk.CodeType = 401
	CodeInvalidTradeSymbol      sdk.CodeType = 402
	CodeFailInsertOrder         sdk.CodeType = 403
	CodeFailCancelOrder         sdk.CodeType = 404
	CodeFailLocateOrderToCancel sdk.CodeType = 405
	CodeDuplicatedOrder         sdk.CodeType = 406
	CodeInvalidProposal         sdk.CodeType = 407
)
View Source
const ListRoute = "dexList"
View Source
const MiniMsg = "dexListMini"

Variables

This section is empty.

Functions

func ErrIncorrectDexOperation

func ErrIncorrectDexOperation(answer string) sdk.Error

ErrIncorrectDexOperation - Error returned upon an incorrect guess

func ErrInvalidOrderParam

func ErrInvalidOrderParam(paraName string, err string) sdk.Error

func ErrInvalidProposal

func ErrInvalidProposal(err string) sdk.Error

func ErrInvalidTradeSymbol

func ErrInvalidTradeSymbol(err string) sdk.Error

Types

type ListMiniMsg

type ListMiniMsg struct {
	From             sdk.AccAddress `json:"from"`
	BaseAssetSymbol  string         `json:"base_asset_symbol"`
	QuoteAssetSymbol string         `json:"quote_asset_symbol"`
	InitPrice        int64          `json:"init_price"`
}

func NewListMiniMsg

func NewListMiniMsg(from sdk.AccAddress, baseAssetSymbol string, quoteAssetSymbol string, initPrice int64) ListMiniMsg

func (ListMiniMsg) GetInvolvedAddresses

func (msg ListMiniMsg) GetInvolvedAddresses() []sdk.AccAddress

func (ListMiniMsg) GetSignBytes

func (msg ListMiniMsg) GetSignBytes() []byte

func (ListMiniMsg) GetSigners

func (msg ListMiniMsg) GetSigners() []sdk.AccAddress

func (ListMiniMsg) Route

func (msg ListMiniMsg) Route() string

func (ListMiniMsg) String

func (msg ListMiniMsg) String() string

func (ListMiniMsg) Type

func (msg ListMiniMsg) Type() string

func (ListMiniMsg) ValidateBasic

func (msg ListMiniMsg) ValidateBasic() sdk.Error

type ListMsg

type ListMsg struct {
	From             sdk.AccAddress `json:"from"`
	ProposalId       int64          `json:"proposal_id"`
	BaseAssetSymbol  string         `json:"base_asset_symbol"`
	QuoteAssetSymbol string         `json:"quote_asset_symbol"`
	InitPrice        int64          `json:"init_price"`
}

func NewListMsg

func NewListMsg(from sdk.AccAddress, proposalId int64, baseAssetSymbol string, quoteAssetSymbol string, initPrice int64) ListMsg

func (ListMsg) GetInvolvedAddresses

func (msg ListMsg) GetInvolvedAddresses() []sdk.AccAddress

func (ListMsg) GetSignBytes

func (msg ListMsg) GetSignBytes() []byte

func (ListMsg) GetSigners

func (msg ListMsg) GetSigners() []sdk.AccAddress

func (ListMsg) Route

func (msg ListMsg) Route() string

func (ListMsg) String

func (msg ListMsg) String() string

func (ListMsg) Type

func (msg ListMsg) Type() string

func (ListMsg) ValidateBasic

func (msg ListMsg) ValidateBasic() sdk.Error

type TradingPair

type TradingPair struct {
	BaseAssetSymbol  string        `json:"base_asset_symbol"`
	QuoteAssetSymbol string        `json:"quote_asset_symbol"`
	ListPrice        ctuils.Fixed8 `json:"list_price"`
	TickSize         ctuils.Fixed8 `json:"tick_size"`
	LotSize          ctuils.Fixed8 `json:"lot_size"`
}

func NewTradingPair

func NewTradingPair(baseAssetSymbol, quoteAssetSymbol string, listPrice int64) TradingPair

NOTE: only for test use

func NewTradingPairWithLotSize

func NewTradingPairWithLotSize(baseAsset, quoteAsset string, listPrice, lotSize int64) TradingPair

func (*TradingPair) GetSymbol

func (pair *TradingPair) GetSymbol() string

Jump to

Keyboard shortcuts

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