eth-prices 0.0.9

A library for fetching Ethereum prices.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use alloy::providers::{Provider, ProviderBuilder};

use crate::provider::RpcProvider;

pub async fn get_test_provider() -> RpcProvider {
    let rpc_url =
        std::env::var("RPC_URL").expect("RPC_URL environment variable must be set to run tests");

    let provider = ProviderBuilder::new().connect(&rpc_url).await.unwrap();

    provider.erased()
}