Trait pallet_chainlink_feed::pallet::FeedInterface[][src]

pub trait FeedInterface<T: Config> {
    type Value: Parameter + BaseArithmetic;
    fn first_valid_round(&self) -> Option<RoundId>;
fn latest_round(&self) -> RoundId;
fn data_at(
        &self,
        round: RoundId
    ) -> Option<RoundData<T::BlockNumber, Self::Value>>;
fn latest_data(&self) -> RoundData<T::BlockNumber, Self::Value>;
fn decimals(&self) -> u8; }
Expand description

Trait for read-only access to a feed.

Associated Types

Required methods

Returns the id of the first round that contains non-default data.

Check this if you want to make sure that the data returned by latest_data is sensible.

Returns the id of the latest oracle round.

Returns the data for a given round.

Will return None if there is no data for the given round.

Returns the latest data for the feed.

Will always return data but may contain default data if there has not been a valid round, yet. Check first_valid_round to determine whether there is useful data, yet.

Represents the number of decimals with which the feed is configured

Implementors