Documentation ¶
Index ¶
- Constants
- Variables
- func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState)
- func NewHandler(k Keeper) sdk.Handler
- func NewQuerier(keeper Keeper) sdk.Querier
- func ValidateGenesis(data GenesisState) error
- type AppModule
- func (a AppModule) BeginBlock(sdk.Context, abci.RequestBeginBlock)
- func (a AppModule) EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate
- func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (a AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (a AppModule) NewHandler() sdk.Handler
- func (a AppModule) NewQuerierHandler() sdk.Querier
- func (a AppModule) QuerierRoute() string
- func (a AppModule) RegisterInvariants(sdk.InvariantRegistry)
- func (a AppModule) Route() string
- type AppModuleBasic
- func (a AppModuleBasic) DefaultGenesis() json.RawMessage
- func (a AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (a AppModuleBasic) GetTxCmd(*codec.Codec) *cobra.Command
- func (a AppModuleBasic) Name() string
- func (a AppModuleBasic) RegisterCodec(*codec.Codec)
- func (a AppModuleBasic) RegisterRESTRoutes(context.CLIContext, *mux.Router)
- func (a AppModuleBasic) ValidateGenesis(b json.RawMessage) error
- type GenesisState
- type IteratorCB
- type Keeper
- func (k Keeper) CreateMarket(ctx sdk.Context, nominee, baseAsset, quoteAsset string) (types.Market, sdk.Error)
- func (k Keeper) Get(ctx sdk.Context, id store.EntityID) (types.Market, sdk.Error)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) Has(ctx sdk.Context, id store.EntityID) bool
- func (k Keeper) IsNominee(ctx sdk.Context, nominee string) bool
- func (k Keeper) Iterator(ctx sdk.Context, cb IteratorCB)
- func (k Keeper) Pair(ctx sdk.Context, id store.EntityID) (string, sdk.Error)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
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 NewQuerier ¶
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 ¶
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (a AppModule) BeginBlock(sdk.Context, abci.RequestBeginBlock)
func (AppModule) EndBlock ¶
func (a AppModule) EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate
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 (AppModule) NewQuerierHandler ¶
func (AppModule) QuerierRoute ¶
func (AppModule) RegisterInvariants ¶
func (a AppModule) RegisterInvariants(sdk.InvariantRegistry)
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) 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 ¶
Click to show internal directories.
Click to hide internal directories.