uni-obrv 0.1.3

A library for querying Uniswap V3 using On-chain helper contract.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use alloy::{
    providers::{ProviderBuilder, RootProvider},
    transports::http::reqwest::Url,
};
use dotenv::dotenv;
use once_cell::sync::Lazy;

pub(crate) static RPC_URL: Lazy<Url> = Lazy::new(|| {
    dotenv().ok();
    std::env::var("ETH_RPC_URL").unwrap().parse().unwrap()
});
pub(crate) static PROVIDER: Lazy<RootProvider> = Lazy::new(|| {
    ProviderBuilder::new()
        .disable_recommended_fillers()
        .connect_http(RPC_URL.clone())
});