oracle

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: GPL-3.0 Imports: 15 Imported by: 8

Documentation

Index

Constants

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

Variables

View Source
var (
	NewKeeper     = keeper.NewKeeper
	NewQuerier    = keeper.NewQuerier
	ModuleCdc     = types.ModuleCdc
	RegisterCodec = types.RegisterCodec
)

Functions

func InitGenesis

func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState) []abci.ValidatorUpdate

InitGenesis performs genesis initialization for the oracle module.

func NewHandler

func NewHandler(k Keeper) sdk.Handler

NewHandler creates the msg handler of this module, as required by Cosmos-SDK standard.

Types

type AppModule

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

AppModule represents the AppModule for this module.

func NewAppModule

func NewAppModule(k Keeper) AppModule

NewAppModule creates a new AppModule object.

func (AppModule) BeginBlock

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

BeginBlock implements the AppModule interface.

func (AppModule) EndBlock

EndBlock implements the AppModule interface.

func (AppModule) ExportGenesis

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

ExportGenesis returns the current state as genesis raw bytes.

func (AppModule) InitGenesis

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

InitGenesis performs genesis initialization for the oracle module.

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

NewHandler implements the AppModule interface.

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler implements the AppModule interface.

func (AppModule) QuerierRoute

func (am AppModule) QuerierRoute() string

QuerierRoute implements the AppModule interface.

func (AppModule) RegisterInvariants

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

RegisterInvariants implements the AppModule interface.

func (AppModule) Route

func (am AppModule) Route() string

Route implements the AppModule interface.

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic is Band Oracle's module basic object.

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

DefaultGenesis returns the default genesis state as raw bytes.

func (AppModuleBasic) GetQueryCmd

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

GetQueryCmd implements AppModuleBasic interface.

func (AppModuleBasic) GetTxCmd

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

GetTxCmd implements AppModuleBasic interface.

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name implements AppModuleBasic interface.

func (AppModuleBasic) RegisterCodec

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

RegisterCodec implements AppModuleBasic interface.

func (AppModuleBasic) RegisterRESTRoutes

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

RegisterRESTRoutes implements AppModuleBasic interface.

func (AppModuleBasic) ValidateGenesis

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

ValidateGenesis performs genesis state validation for the oracle module.

type GenesisState

type GenesisState struct {
	Params        types.Params         `json:"params" yaml:"params"`
	DataSources   []types.DataSource   `json:"data_sources"  yaml:"data_sources"`
	OracleScripts []types.OracleScript `json:"oracle_scripts"  yaml:"oracle_scripts"`
}

GenesisState is the oracle state that must be provided at genesis.

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState returns the default oracle genesis state.

func ExportGenesis

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

ExportGenesis returns a GenesisState for a given context and keeper.

func GetGenesisStateFromAppState

func GetGenesisStateFromAppState(cdc *codec.Codec, appState map[string]json.RawMessage) GenesisState

GetGenesisStateFromAppState returns x/oracle GenesisState given raw application genesis state.

type Keeper

type Keeper = keeper.Keeper

type MsgActivate

type MsgActivate = types.MsgActivate

type MsgAddReporter

type MsgAddReporter = types.MsgAddReporter

type MsgCreateDataSource

type MsgCreateDataSource = types.MsgCreateDataSource

type MsgCreateOracleScript

type MsgCreateOracleScript = types.MsgCreateOracleScript

type MsgEditDataSource

type MsgEditDataSource = types.MsgEditDataSource

type MsgEditOracleScript

type MsgEditOracleScript = types.MsgEditOracleScript

type MsgRemoveReporter

type MsgRemoveReporter = types.MsgRemoveReporter

type MsgReportData

type MsgReportData = types.MsgReportData

type MsgRequestData

type MsgRequestData = types.MsgRequestData

type OracleRequestPacketData

type OracleRequestPacketData = types.OracleRequestPacketData

type OracleResponsePacketData

type OracleResponsePacketData = types.OracleResponsePacketData

Directories

Path Synopsis
client
cli
Code generated by protoconstructorgen.py.
Code generated by protoconstructorgen.py.

Jump to

Keyboard shortcuts

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