oracle

package
v1.2.7-0...-4cd777e Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: GPL-3.0 Imports: 16 Imported by: 0

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, supplyKeeper types.SupplyKeeper, 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, sk types.SupplyKeeper) AppModule

NewAppModule creates a new AppModule object.

func (AppModule) BeginBlock

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

BeginBlock processes ABCI begin block message for this oracle module (SDK AppModule interface).

func (AppModule) EndBlock

EndBlock processes ABCI end block message for this oracle module (SDK 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 returns the function to process oracle messages (SDK AppModule interface).

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler returns the function to process ABCI queries (SDK AppModule interface).

func (AppModule) QuerierRoute

func (am AppModule) QuerierRoute() string

QuerierRoute returns the module's path for querier route (SDK AppModule interface).

func (AppModule) RegisterInvariants

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

RegisterInvariants is a noop function to satisfy SDK AppModule interface.

func (AppModule) Route

func (am AppModule) Route() string

Route returns the module's path for message route (SDK 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 returns cobra CLI command to query chain state (SDK AppModuleBasic interface).

func (AppModuleBasic) GetTxCmd

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

GetTxCmd returns cobra CLI command to send txs for this module (SDK AppModuleBasic interface).

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name returns this module's name - "oracle" (SDK AppModuleBasic interface).

func (AppModuleBasic) RegisterCodec

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

RegisterCodec registers codec encoders and decoders for oracle messages (SDK AppModuleBasic interface).

func (AppModuleBasic) RegisterRESTRoutes

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

RegisterRESTRoutes adds oracle REST endpoints to the main mux (SDK 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"`
	OraclePool    types.OraclePool     `json:"oracle_pool" yaml:"oracle_pool"`
}

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 OraclePool

type OraclePool = types.OraclePool

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