oracle

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
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

func HandleMsgPostPrice(
	ctx sdk.Context,
	k Keeper,
	msg types.MsgPostPrice) sdk.Result

HandleMsgPostPrice handles prices posted by oracles

func InitGenesis

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

InitGenesis sets distribution information for genesis.

func NewHandler

func NewHandler(k Keeper) sdk.Handler

NewHandler handles all oracle type messages

Types

type AppModule

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

AppModule app module type

func NewAppModule

func NewAppModule(keeper Keeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

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

BeginBlock performs a no-op.

func (AppModule) EndBlock

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) Name

func (AppModule) Name() string

Name module name

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 (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)

RegisterInvariants register module 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(_ *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) Name

func (AppModuleBasic) Name() string

Name get 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 registers the REST routes for the bank module.

func (AppModuleBasic) ValidateGenesis

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

ValidateGenesis module validate genesis

type Asset

type Asset = types.Asset

type Assets

type Assets = types.Assets

type CurrentPrice

type CurrentPrice = types.CurrentPrice

type GenesisState

type GenesisState = types.GenesisState

type Keeper

type Keeper = keeper.Keeper

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 Oracle

type Oracle = types.Oracle

type Oracles

type Oracles = types.Oracles

type ParamSubspace

type ParamSubspace = types.ParamSubspace

type Params

type Params = types.Params

type PostedPrice

type PostedPrice = types.PostedPrice

type QueryAssetsResp

type QueryAssetsResp = types.QueryAssetsResp

type QueryRawPricesResp

type QueryRawPricesResp = types.QueryRawPricesResp

type SortDecs

type SortDecs = types.SortDecs

Directories

Path Synopsis
cli
internal

Jump to

Keyboard shortcuts

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