Documentation ¶
Index ¶
- Constants
- Variables
- func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState) []abci.ValidatorUpdate
- func NewHandler(k Keeper) sdk.Handler
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Context, req 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 (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (am AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (am AppModule) Route() string
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GetQueryCmd(cdc *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 GenesisState
- type Keeper
- type MsgActivate
- type MsgAddReporter
- type MsgCreateDataSource
- type MsgCreateOracleScript
- type MsgEditDataSource
- type MsgEditOracleScript
- type MsgRemoveReporter
- type MsgReportData
- type MsgRequestData
- type OracleRequestPacketData
- type OracleResponsePacketData
Constants ¶
const ( ModuleName = types.ModuleName DefaultParamspace = types.DefaultParamspace RouterKey = types.RouterKey StoreKey = types.StoreKey PortID = types.PortID )
Variables ¶
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 ¶
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 ¶
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 ¶
func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
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 ¶
NewHandler returns the function to process oracle messages (SDK AppModule interface).
func (AppModule) NewQuerierHandler ¶
NewQuerierHandler returns the function to process ABCI queries (SDK AppModule interface).
func (AppModule) QuerierRoute ¶
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.
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"` }
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 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