pub trait AggregatedOracle<AssetId, Balance, BlockNumber, Price> {
    type Error;

    fn get_entry(
        asset_a: AssetId,
        asset_b: AssetId,
        period: OraclePeriod,
        source: Source
    ) -> Result<AggregatedEntry<Balance, BlockNumber, Price>, Self::Error>; fn get_entry_weight() -> Weight; }
Expand description

An oracle returning an entry of oracle data aggregated over period.

Required Associated Types§

Required Methods§

source

fn get_entry(
    asset_a: AssetId,
    asset_b: AssetId,
    period: OraclePeriod,
    source: Source
) -> Result<AggregatedEntry<Balance, BlockNumber, Price>, Self::Error>

source

fn get_entry_weight() -> Weight

Implementations on Foreign Types§

Default implementation of the oracle trait that always returns Err.

source§

fn get_entry(
    _asset_a: AssetId,
    _asset_b: AssetId,
    _period: OraclePeriod,
    _source: Source
) -> Result<AggregatedEntry<Balance, BlockNumber, Price>, Self::Error>

source§

fn get_entry_weight() -> Weight

Implementors§