[!IMPORTANT] eth-prices aims to provide ethereum price estimation only. It is not intended for nor provides guarantees of exchange rates.
Quickstart
use ;
// Define your data sources
let quoter = vec!;
// Create a router
let router = new;
// Compute a route
let token_in = ERC20 ;
let token_out = Fiat ;
let route = router.compute.await.unwrap;
// Get the latest block number
let block = provider.get_block_number.await.unwrap;
// Quote the rate
let quote = route.quote.await.unwrap;
Examples
This crate has a few examples you can toy around with: