order

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName        = types.ModuleName
	RouterKey         = types.RouterKey
	QuerierRoute      = types.QuerierRoute
	DefaultParamspace = types.DefaultParamspace
	DefaultCodespace  = types.DefaultCodespace
	OrderStoreKey     = types.OrderStoreKey
)

nolint const params aliases

Variables

View Source
var (
	RegisterCodec     = types.RegisterCodec
	DefaultParams     = types.DefaultParams
	NewMsgNewOrder    = types.NewMsgNewOrder
	NewMsgCancelOrder = types.NewMsgCancelOrder
	NewKeeper         = keeper.NewKeeper
	NewQuerier        = keeper.NewQuerier
	FormatOrderIDsKey = types.FormatOrderIDsKey
)

nolint functions aliases

Functions

func BeginBlocker

func BeginBlocker(ctx sdk.Context, keeper keeper.Keeper)

BeginBlocker runs the logic of BeginBlocker with version 0. BeginBlocker resets keeper cache.

func CalculateGas

func CalculateGas(msg sdk.Msg, params *types.Params) (gas uint64)

func EndBlocker

func EndBlocker(ctx sdk.Context, keeper keeper.Keeper)

EndBlocker called every block 1. execute matching engine 2. flush cache

func InitGenesis

func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data GenesisState)

InitGenesis initialize default parameters and the keeper's address to pubkey map

func NewOrderHandler

func NewOrderHandler(keeper keeper.Keeper) sdk.Handler

NewOrderHandler returns the handler with version 0.

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis validates the slashing genesis parameters

func ValidateMsgCancelOrders

func ValidateMsgCancelOrders(ctx sdk.Context, keeper keeper.Keeper, msg types.MsgCancelOrders) error

ValidateMsgCancelOrders validates whether the msg of cancelOrders is valid.

func ValidateMsgNewOrders

func ValidateMsgNewOrders(ctx sdk.Context, k keeper.Keeper, msg types.MsgNewOrders) (*sdk.Result, error)

ValidateMsgNewOrders validates whether the msg of newOrders is valid.

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

AppModule : app module

func NewAppModule

func NewAppModule(v version.ProtocolVersionType, keeper keeper.Keeper, supplyKeeper auth.SupplyKeeper) AppModule

NewAppModule : creates a new AppModule object

func (AppModule) BeginBlock

func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock)

BeginBlock : module begin-block

func (AppModule) EndBlock

EndBlock : module end-block

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage

ExportGenesis : module export genesis

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate

InitGenesis : module init-genesis

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

NewHandler : module handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler : module querier

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute : module querier route name

func (AppModule) RegisterInvariants

func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)

RegisterInvariants : register invariants

func (AppModule) Route

func (AppModule) Route() string

Route : module message route name

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic : app module basics object

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

DefaultGenesis : default genesis state

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command

GetQueryCmd : get the root query command of this module

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command

GetTxCmd : get the root tx command of this module

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name : module name

func (AppModuleBasic) RegisterCodec

func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)

RegisterCodec : register module codec

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)

RegisterRESTRoutes : register rest routes

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error

ValidateGenesis : module validate genesis

type BlockMatchResult

type BlockMatchResult = types.BlockMatchResult

nolint types aliases

type Deal

type Deal = types.Deal

nolint types aliases

type DepthBook

type DepthBook = types.DepthBook

nolint types aliases

type GenesisState

type GenesisState struct {
	Params     types.Params   `json:"params"`
	OpenOrders []*types.Order `json:"open_orders"`
}

GenesisState - all order state that must be provided at genesis

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState - default GenesisState used by Cosmos Hub

func ExportGenesis

func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data GenesisState)

ExportGenesis writes the current store values to a genesis file, which can be imported again with InitGenesis

type Keeper

type Keeper = keeper.Keeper

nolint types aliases

type MatchResult

type MatchResult = types.MatchResult

nolint types aliases

type MsgCancelOrder

type MsgCancelOrder = types.MsgCancelOrder

nolint types aliases

type MsgCancelOrders

type MsgCancelOrders = types.MsgCancelOrders

nolint types aliases

type MsgNewOrder

type MsgNewOrder = types.MsgNewOrder

nolint types aliases

type MsgNewOrders

type MsgNewOrders = types.MsgNewOrders

nolint types aliases

type Order

type Order = types.Order

nolint types aliases

type Params

type Params = types.Params

nolint types aliases

Directories

Path Synopsis
client
cli
rest
Package rest API.
Package rest API.
legacy

Jump to

Keyboard shortcuts

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