oracle

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 19 Imported by: 18

Documentation

Index

Constants

View Source
const ConsensusVersion = 1

ConsensusVersion is the x/oracle module's current version, as modules integrate and updates are made, this value determines what version of the module is being run by the chain.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppModule

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

AppModule represents an application module for the x/oracle module.

func NewAppModule

func NewAppModule(cdc codec.Codec, k keeper.Keeper) AppModule

NewAppModule returns an application module for the x/oracle module.

func (AppModule) BeginBlock

func (am AppModule) BeginBlock(goCtx context.Context) error

BeginBlock calls the x/oracle keeper's BeginBlocker function.

func (AppModule) ConsensusVersion

func (AppModule) ConsensusVersion() uint64

ConsensusVersion implements AppModule/ConsensusVersion.

func (AppModule) EndBlock

func (am AppModule) EndBlock(_ context.Context) error

EndBlock is a no-op for x/oracle.

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage

ExportGenesis returns the oracle module's exported genesis state as raw JSON bytes. This method panics on any error.

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, bz json.RawMessage)

InitGenesis performs the genesis initialization for the x/oracle module. It determines the genesis state to initialize from via a json-encoded genesis-state. This method returns no validator set updates. This method panics on any errors.

func (AppModule) IsAppModule

func (am AppModule) IsAppModule()

IsAppModule implements the appmodule.AppModule interface.

func (AppModule) IsOnePerModuleType

func (am AppModule) IsOnePerModuleType()

IsOnePerModuleType implements the depinject.OnePerModuleType interface.

func (AppModule) RegisterInvariants

func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)

RegisterInvariants registers the invariants of the oracle module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted). No invariants exist for the oracle module.

func (AppModule) RegisterServices

func (am AppModule) RegisterServices(cfc module.Configurator)

RegisterServices registers the module's services with the app's module configurator.

type AppModuleBasic

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

AppModuleBasic defines the base interface that the x/oracle module exposes to the application.

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage

DefaultGenesis returns default genesis state as raw bytes for the oracle module.

func (AppModuleBasic) GetQueryCmd

func (amb AppModuleBasic) GetQueryCmd() *cobra.Command

GetQueryCmd returns the x/oracle module base query cli-command.

func (AppModuleBasic) GetTxCmd

func (amb AppModuleBasic) GetTxCmd() *cobra.Command

GetTxCmd is a no-op, as no txs are registered for submission (apart from messages that can only be executed by governance).

func (AppModuleBasic) Name

func (amb AppModuleBasic) Name() string

Name returns the name of this module.

func (AppModuleBasic) RegisterGRPCGatewayRoutes

func (amb AppModuleBasic) RegisterGRPCGatewayRoutes(cliCtx client.Context, mux *runtime.ServeMux)

RegisterGRPCGatewayRoutes registers the necessary REST routes for the GRPC-gateway to the x/oracle module QueryService on mux. This method panics on failure.

func (AppModuleBasic) RegisterInterfaces

func (amb AppModuleBasic) RegisterInterfaces(ir codectypes.InterfaceRegistry)

RegisterInterfaces registers the necessary implementations / interfaces in the x/oracle module w/ the interface-registry ir.

func (AppModuleBasic) RegisterLegacyAminoCodec

func (amb AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary types from the x/oracle module for amino serialization.

func (AppModuleBasic) ValidateGenesis

ValidateGenesis performs genesis state validation for the oracle module.

type Inputs

type Inputs struct {
	depinject.In

	// keepers
	types.MarketMapKeeper

	// module-dependencies
	Config       *oraclemodulev1.Module
	Cdc          codec.Codec
	StoreService store.KVStoreService
}

type Outputs

type Outputs struct {
	depinject.Out

	OracleKeeper *keeper.Keeper
	Module       appmodule.AppModule
	Hooks        marketmaptypes.MarketMapHooksWrapper
}

func ProvideModule

func ProvideModule(in Inputs) Outputs

Directories

Path Synopsis
client
cli
Package types is a reverse proxy.
Package types is a reverse proxy.

Jump to

Keyboard shortcuts

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