types

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCodespace sdk.CodespaceType = ModuleName

	CodeInvalidInput   sdk.CodeType = 101
	CodeInvalidGenesis sdk.CodeType = 102
	CodeOrderNotExist  sdk.CodeType = 103
	CodeNoPermission   sdk.CodeType = 104
	CodeNotMatchTarget sdk.CodeType = 105
	CodeTooLess        sdk.CodeType = 106
)
View Source
const (
	// ModuleName is the name of the exchange module
	ModuleName = "exchange"

	// StoreKey is the string store representation
	StoreKey = ModuleName

	// RouteKey is the msg router key for the exchange module
	RouterKey = ModuleName

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

	// Parameter store default namestore
	DefaultParamspace = ModuleName
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BankKeeper

type BankKeeper interface {
	GetCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

	// TODO: remove once exchange doesn't require use of accounts
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
}

expected bank keeper

type ExchangeParams

type ExchangeParams struct {
	MaxOrdersPerAddr uint64 `json:"max_orders_per_addr"`
}

func (ExchangeParams) String

func (ep ExchangeParams) String() string

type Order

type Order struct {
	OrderId    uint64         `json:"order_id"`
	Seller     sdk.AccAddress `json:"seller"`
	Supply     sdk.Coin       `json:"supply"`
	Target     sdk.Coin       `json:"target"`
	Remains    sdk.Coin       `json:"remains"`
	CreateTime time.Time      `json:"create_time"`
}

func (Order) String

func (order Order) String() string

type Orders

type Orders []Order

Orders is an array of order

func (Orders) String

func (orders Orders) String() string

Jump to

Keyboard shortcuts

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