Skip to content

Commit

Permalink
refactor - deprecate usage of config in favor of provider crate
Browse files Browse the repository at this point in the history
  • Loading branch information
Dvisacker committed Nov 29, 2024
1 parent ea379ad commit 6292ad0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dotenv = { workspace = true }

db = { path = "../db" }
types = { path = "../types" }
config = { path = "../config" }
provider = { path = "../provider" }

arraydeque = { version = "0.5", optional = true }
async-trait = "0.1"
Expand Down
6 changes: 2 additions & 4 deletions src/amm/uniswap_v2/batch_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,8 @@ where
mod tests {
use super::*;
use crate::amm::ExchangeType;
use alloy::providers::ProviderBuilder;
use alloy_chains::{Chain, NamedChain};
use config::get_chain_config;
use provider::get_basic_provider;
use std::{env, str::FromStr};
use types::exchange::ExchangeName;

Expand All @@ -274,8 +273,7 @@ mod tests {
async fn test_get_amm_data_batch_request() {
// Get RPC URL from environment variable, or use default
dotenv::dotenv().ok();
let config = get_chain_config(Chain::from_named(NamedChain::Base)).await;
let provider = config.ws;
let provider = get_basic_provider(Chain::from_named(NamedChain::Base)).await;

// Create a test pool
let pool_address = Address::from_str(VE33_POOL_ADDRESS).expect("Invalid address");
Expand Down

0 comments on commit 6292ad0

Please sign in to comment.