eth-prices 0.0.3

A library for fetching Ethereum prices.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Builder API for constructing routers from loaded quoters.
//!
//! This provides a simple way to build a QuoterGraph from quoters that have already
//! been loaded/created. The loading itself is handled separately (e.g., by config
//! or by wasm bindings).

use crate::router::graph::QuoterGraph;

/// Build a QuoterGraph from loaded quoters.
pub fn build_graph(
    quoters: impl IntoIterator<Item = crate::quoter::QuoterInstance>,
) -> QuoterGraph {
    QuoterGraph::from_iter(quoters)
}