Trait hydradx_traits::oracle::AggregatedOracle
source · 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§
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
Implementations on Foreign Types§
source§impl<AssetId, Balance, BlockNumber, Price> AggregatedOracle<AssetId, Balance, BlockNumber, Price> for ()
impl<AssetId, Balance, BlockNumber, Price> AggregatedOracle<AssetId, Balance, BlockNumber, Price> for ()
Default implementation of the oracle trait that always returns Err
.