pair_sync 0.4.3

A simple library to get all pairs from any supported Dex and sync reserves.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::{error::Error, sync::Arc};

use ethers::providers::{Http, Provider};

use pair_sync::checkpoint::sync_pools_from_checkpoint;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    //Add rpc endpoint here:
    let rpc_endpoint = "";
    let provider = Arc::new(Provider::<Http>::try_from(rpc_endpoint).unwrap());

    let _pools = sync_pools_from_checkpoint("./pool_sync_checkpoint.json".into(), provider).await?;

    Ok(())
}