batch

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: Apache-2.0, Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryLatest = "latest"
)
View Source
const (
	TableKey = "batch"
)

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

func RegisterRoutes

func RegisterRoutes(ctx context.CLIContext, r *mux.Router, cdc *codec.Codec)

Types

type Batch

type Batch struct {
	BlockNumber   int64                     `json:"block_number"`
	BlockTime     time.Time                 `json:"block_time"`
	MarketID      store.EntityID            `json:"market_id"`
	ClearingPrice sdk.Uint                  `json:"clearing_price"`
	Bids          []matcheng.AggregatePrice `json:"bids"`
	Asks          []matcheng.AggregatePrice `json:"asks"`
}

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(db dbm.DB, cdc *codec.Codec) Keeper

func (Keeper) LatestByMarket

func (k Keeper) LatestByMarket(marketID store.EntityID) (Batch, sdk.Error)

func (Keeper) OnBatchEvent

func (k Keeper) OnBatchEvent(event types.Batch)

func (Keeper) OnEvent

func (k Keeper) OnEvent(event interface{}) error

Jump to

Keyboard shortcuts

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