1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#[cfg(feature = "runtime-benchmarks")]
use frame_support::dispatch::DispatchResultWithPostInfo;
use frame_support::dispatch::DispatchError;
use primitives::{AssetPricePair, Price};
pub trait PriceFeed<AssetId> {
fn get_price(base: AssetId) -> Result<Price, DispatchError>;
fn get_relative_price_pair(base: AssetId, quote: AssetId) -> Result<AssetPricePair<AssetId>, DispatchError>;
}
#[cfg(feature = "runtime-benchmarks")]
pub trait PriceFeedBenchmarks<AccountId, AssetId> {
fn create_feed(caller: AccountId, asset_id: AssetId) -> DispatchResultWithPostInfo;
}