market

package
v0.0.2-0...-13a971e Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName        = types.ModuleName
	StoreKey          = types.StoreKey
	DefaultParamspace = types.DefaultParamspace
	DefaultCodespace  = types.DefaultCodespace
)
View Source
const (
	QueryList = "list"
)

Variables

View Source
var (
	ModuleCdc = types.ModuleCdc
)

Functions

func InitGenesis

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

func NewHandler

func NewHandler(k Keeper) sdk.Handler

NewHandler handles all oracle type messages

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

Types

type AppModule

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

AppModule implements an application module for the crisis module.

func NewAppModule

func NewAppModule(keeper Keeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

func (a AppModule) BeginBlock(sdk.Context, abci.RequestBeginBlock)

func (AppModule) EndBlock

func (AppModule) ExportGenesis

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

func (AppModule) InitGenesis

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

func (AppModule) NewHandler

func (a AppModule) NewHandler() sdk.Handler

func (AppModule) NewQuerierHandler

func (a AppModule) NewQuerierHandler() sdk.Querier

func (AppModule) QuerierRoute

func (a AppModule) QuerierRoute() string

func (AppModule) RegisterInvariants

func (a AppModule) RegisterInvariants(sdk.InvariantRegistry)

func (AppModule) Route

func (a AppModule) Route() string

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic defines the basic application module used by the market module.

func (AppModuleBasic) DefaultGenesis

func (a AppModuleBasic) DefaultGenesis() json.RawMessage

func (AppModuleBasic) GetQueryCmd

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

func (AppModuleBasic) GetTxCmd

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

func (AppModuleBasic) Name

func (a AppModuleBasic) Name() string

func (AppModuleBasic) RegisterCodec

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

func (AppModuleBasic) RegisterRESTRoutes

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

func (AppModuleBasic) ValidateGenesis

func (a AppModuleBasic) ValidateGenesis(b json.RawMessage) error

type GenesisState

type GenesisState struct {
	Markets  types.Markets `json:"markets" yaml:"markets"`
	Nominees []string      `json:"nominees" yaml:"nominees"`
}

func DefaultGenesisState

func DefaultGenesisState() GenesisState

func ExportGenesis

func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState

func NewGenesisState

func NewGenesisState(markets types.Markets, nominees []string) GenesisState

type IteratorCB

type IteratorCB func(mkt types.Market) bool

type Keeper

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

func NewKeeper

func NewKeeper(sk sdk.StoreKey, cdc *codec.Codec, paramstore subspace.Subspace, codespace sdk.CodespaceType) Keeper

func (Keeper) CreateMarket

func (k Keeper) CreateMarket(ctx sdk.Context, nominee, baseAsset, quoteAsset string) (types.Market, sdk.Error)

func (Keeper) Get

func (k Keeper) Get(ctx sdk.Context, id store.EntityID) (types.Market, sdk.Error)

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams gets the auth module's parameters.

func (Keeper) Has

func (k Keeper) Has(ctx sdk.Context, id store.EntityID) bool

func (Keeper) IsNominee

func (k Keeper) IsNominee(ctx sdk.Context, nominee string) bool

func (Keeper) Iterator

func (k Keeper) Iterator(ctx sdk.Context, cb IteratorCB)

func (Keeper) Pair

func (k Keeper) Pair(ctx sdk.Context, id store.EntityID) (string, sdk.Error)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams sets the auth module's parameters.

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

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