[][src]Trait pallet_plasm_lockdrop::PriceOracle

pub trait PriceOracle<T: FromStr> {
    fn uri() -> &'static str;

    fn fetch() -> Result<T, ()> { ... }
}

HTTP source of currency price.

Required methods

fn uri() -> &'static str

HTTP request URI

Loading content...

Provided methods

fn fetch() -> Result<T, ()>

Fetch price data, parse it and return raw dollar rate. Note: this method requires off-chain worker context.

Loading content...

Implementors

impl<T: FromStr> PriceOracle<T> for BitcoinPrice[src]

impl<T: FromStr> PriceOracle<T> for EthereumPrice[src]

Loading content...