Documentation ¶
Index ¶
- Constants
- Variables
- func EndBlocker(ctx sdk.Context, k Keeper) []abci.ValidatorUpdate
- func ExportGenesis(ctx sdk.Context, keeper Keeper) types.GenesisState
- func HandleMsgPostPrice(ctx sdk.Context, k Keeper, msg types.MsgPostPrice) sdk.Result
- func InitGenesis(ctx sdk.Context, keeper Keeper, data types.GenesisState)
- func NewHandler(k Keeper) sdk.Handler
- type AppModule
- func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
- func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (AppModule) QuerierRoute() string
- func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
- func (AppModule) Route() string
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(_ *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type Asset
- type Assets
- type CurrentPrice
- type GenesisState
- type Keeper
- type MsgAddAsset
- type MsgAddOracle
- type MsgPostPrice
- type MsgSetAsset
- type MsgSetOracles
- type Oracle
- type Oracles
- type ParamSubspace
- type Params
- type PostPriceParams
- type PostedPrice
- type QueryAssetsResp
- type QueryRawPricesResp
- type SortDecs
Constants ¶
const ( DefaultCodespace = types.DefaultCodespace ModuleName = types.ModuleName RouterKey = types.RouterKey QuerierRoute = types.QuerierRoute DefaultParamspace = types.DefaultParamspace StoreKey = types.StoreKey )
Variables ¶
var ( ModuleCdc = types.ModuleCdc NewKeeper = keeper.NewKeeper NewAsset = types.NewAsset RegisterCodec = types.RegisterCodec // functions aliases ErrEmptyInput = types.ErrEmptyInput ErrExpired = types.ErrExpired ErrNoValidPrice = types.ErrNoValidPrice ErrInvalidAsset = types.ErrInvalidAsset ErrInvalidOracle = types.ErrInvalidOracle NewGenesisState = types.NewGenesisState DefaultGenesisState = types.DefaultGenesisState ValidateGenesis = types.ValidateGenesis NewMsgPostPrice = types.NewMsgPostPrice ParamKeyTable = types.ParamKeyTable NewParams = types.NewParams DefaultParams = types.DefaultParams NewQuerier = keeper.NewQuerier )
Functions ¶
func EndBlocker ¶
func EndBlocker(ctx sdk.Context, k Keeper) []abci.ValidatorUpdate
nolint:errcheck EndBlocker updates the current oracle
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, keeper Keeper) types.GenesisState
ExportGenesis returns a GenesisState for a given context and keeper.
func HandleMsgPostPrice ¶
HandleMsgPostPrice handles prices posted by oracles
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, keeper Keeper, data types.GenesisState)
InitGenesis sets distribution information for genesis.
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule app module type
func NewAppModule ¶
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
BeginBlock performs a no-op.
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
EndBlock returns the end blocker for the bank module. It returns no validator updates.
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 ¶
NewHandler module handler
func (AppModule) NewQuerierHandler ¶
NewQuerierHandler module querier
func (AppModule) QuerierRoute ¶
QuerierRoute module querier route name
func (AppModule) RegisterInvariants ¶
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
RegisterInvariants register module invariants
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(_ *codec.Codec) *cobra.Command
GetQueryCmd returns no root query command for the bank module.
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
GetTxCmd returns the root tx command for the bank module.
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 registers the REST routes for the bank module.
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
ValidateGenesis module validate genesis
type CurrentPrice ¶
type CurrentPrice = types.CurrentPrice
type GenesisState ¶
type GenesisState = types.GenesisState
type MsgAddAsset ¶
type MsgAddAsset = types.MsgAddAsset
type MsgAddOracle ¶
type MsgAddOracle = types.MsgAddOracle
type MsgPostPrice ¶
type MsgPostPrice = types.MsgPostPrice
type MsgSetAsset ¶
type MsgSetAsset = types.MsgSetAsset
type MsgSetOracles ¶
type MsgSetOracles = types.MsgSetOracles
type ParamSubspace ¶
type ParamSubspace = types.ParamSubspace
type PostPriceParams ¶
type PostPriceParams = types.PostPriceParams
type PostedPrice ¶
type PostedPrice = types.PostedPrice
type QueryAssetsResp ¶
type QueryAssetsResp = types.QueryAssetsResp
type QueryRawPricesResp ¶
type QueryRawPricesResp = types.QueryRawPricesResp