Skip to main content

OracleAdapterPlugin

Trait OracleAdapterPlugin 

Source
pub trait OracleAdapterPlugin: Send + Sync {
    // Required methods
    fn adapter_id(&self) -> OracleAdapterId;
    fn discover<'a>(
        &'a self,
        ctx: OracleDiscoveryContext<'a>,
    ) -> AdapterFuture<'a, OracleDiscoveryReport>;
    fn reactive_handler(
        &self,
        registrations: Vec<FeedRegistration>,
        storage_sync: OracleStorageSync,
    ) -> Arc<dyn ReactiveHandler<Ethereum>> ;
}
Expand description

Public plugin interface for oracle families layered over evm-fork-cache.

Required Methods§

Source

fn adapter_id(&self) -> OracleAdapterId

Stable adapter id.

Source

fn discover<'a>( &'a self, ctx: OracleDiscoveryContext<'a>, ) -> AdapterFuture<'a, OracleDiscoveryReport>

Discover and seed feed registrations through an EvmCache.

Source

fn reactive_handler( &self, registrations: Vec<FeedRegistration>, storage_sync: OracleStorageSync, ) -> Arc<dyn ReactiveHandler<Ethereum>>

Build the reactive handler that owns this adapter’s event routing.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl OracleAdapterPlugin for EulerOracleAdapter

Available on crate feature euler only.
Source§

impl OracleAdapterPlugin for MorphoBlueOracleAdapter

Available on crate feature morpho only.
Source§

impl OracleAdapterPlugin for PythOracleAdapter

Available on crate feature pyth only.
Source§

impl OracleAdapterPlugin for RedstoneOracleAdapter

Available on crate feature redstone only.