diff --git a/crates/autopilot/src/run.rs b/crates/autopilot/src/run.rs index 18a5dfbb9a..4521e0228d 100644 --- a/crates/autopilot/src/run.rs +++ b/crates/autopilot/src/run.rs @@ -310,6 +310,7 @@ pub async fn run(args: Arguments) { .unwrap_or_else(|| BalancerFactoryKind::for_chain(chain_id)); let contracts = BalancerContracts::new(&web3, factories).await.unwrap(); match BalancerPoolFetcher::new( + &args.shared.graph_api_base_url, chain_id, block_retriever.clone(), token_info_fetcher.clone(), @@ -338,6 +339,7 @@ pub async fn run(args: Arguments) { }; let uniswap_v3_pool_fetcher = if baseline_sources.contains(&BaselineSource::UniswapV3) { match UniswapV3PoolFetcher::new( + &args.shared.graph_api_base_url, chain_id, web3.clone(), http_factory.create(), diff --git a/crates/driver/src/boundary/liquidity/balancer/v2/mod.rs b/crates/driver/src/boundary/liquidity/balancer/v2/mod.rs index a09315c254..561f8ea336 100644 --- a/crates/driver/src/boundary/liquidity/balancer/v2/mod.rs +++ b/crates/driver/src/boundary/liquidity/balancer/v2/mod.rs @@ -178,6 +178,7 @@ async fn init_liquidity( let balancer_pool_fetcher = Arc::new( BalancerPoolFetcher::new( + &config.graph_api_base_url, eth.network().chain.into(), block_retriever.clone(), token_info_fetcher.clone(), diff --git a/crates/driver/src/boundary/liquidity/mod.rs b/crates/driver/src/boundary/liquidity/mod.rs index b119382f34..f77cfefc72 100644 --- a/crates/driver/src/boundary/liquidity/mod.rs +++ b/crates/driver/src/boundary/liquidity/mod.rs @@ -9,6 +9,7 @@ use { futures::future, itertools::Itertools, model::TokenPair, + reqwest::Url, shared::{ baseline_solver::BaseTokens, current_block, diff --git a/crates/driver/src/boundary/liquidity/uniswap/v3.rs b/crates/driver/src/boundary/liquidity/uniswap/v3.rs index a6a251ff82..023e53efd0 100644 --- a/crates/driver/src/boundary/liquidity/uniswap/v3.rs +++ b/crates/driver/src/boundary/liquidity/uniswap/v3.rs @@ -14,6 +14,7 @@ use { contracts::{GPv2Settlement, UniswapV3SwapRouter}, ethrpc::current_block::BlockRetrieving, itertools::Itertools, + reqwest::Url, shared::{ http_solver::model::TokenAmount, interaction::Interaction, @@ -135,6 +136,7 @@ async fn init_liquidity( let pool_fetcher = Arc::new( UniswapV3PoolFetcher::new( + &config.graph_api_base_url, eth.network().chain.into(), web3.clone(), boundary::liquidity::http_client(), diff --git a/crates/driver/src/infra/cli.rs b/crates/driver/src/infra/cli.rs index 9159f990f7..5629014462 100644 --- a/crates/driver/src/infra/cli.rs +++ b/crates/driver/src/infra/cli.rs @@ -21,6 +21,10 @@ pub struct Args { #[clap(long, env)] pub ethrpc: Url, + /// The base URL to connect to subgraph clients. + #[clap(long, env, default_value = "https://api.thegraph.com/subgraphs/name/")] + pub graph_api_base_url: Url, + /// Path to the driver configuration file. This file should be in TOML /// format. For an example see /// https://github.com/cowprotocol/services/blob/main/crates/driver/example.toml. diff --git a/crates/driver/src/infra/config/file/load.rs b/crates/driver/src/infra/config/file/load.rs index 888ac25f76..99334a8e36 100644 --- a/crates/driver/src/infra/config/file/load.rs +++ b/crates/driver/src/infra/config/file/load.rs @@ -172,9 +172,11 @@ pub async fn load(network: &blockchain::Network, path: &Path) -> infra::Config { file::UniswapV3Config::Manual { router, max_pools_to_initialize, + graph_api_base_url, } => liquidity::config::UniswapV3 { router: router.into(), max_pools_to_initialize, + graph_api_base_url: graph_api_base_url.clone(), }, }) .collect(), @@ -204,6 +206,7 @@ pub async fn load(network: &blockchain::Network, path: &Path) -> infra::Config { liquidity_bootstrapping, composable_stable, pool_deny_list, + graph_api_base_url, } => liquidity::config::BalancerV2 { vault: vault.into(), weighted: weighted @@ -224,6 +227,7 @@ pub async fn load(network: &blockchain::Network, path: &Path) -> infra::Config { .map(eth::ContractAddress::from) .collect(), pool_deny_list: pool_deny_list.clone(), + graph_api_base_url: graph_api_base_url.clone(), }, }) .collect(), diff --git a/crates/driver/src/infra/config/file/mod.rs b/crates/driver/src/infra/config/file/mod.rs index 2508e38743..92c9d9f6cc 100644 --- a/crates/driver/src/infra/config/file/mod.rs +++ b/crates/driver/src/infra/config/file/mod.rs @@ -373,6 +373,8 @@ enum UniswapV3Config { /// How many pools to initialize during start up. #[serde(default = "uniswap_v3::default_max_pools_to_initialize")] max_pools_to_initialize: usize, + + graph_api_base_url: Url, }, } @@ -431,6 +433,8 @@ enum BalancerV2Config { /// Deny listed Balancer V2 pools. #[serde(default)] pool_deny_list: Vec, + + graph_api_base_url: Url, }, } diff --git a/crates/driver/src/infra/liquidity/config.rs b/crates/driver/src/infra/liquidity/config.rs index 92f8f2950e..18a7c58036 100644 --- a/crates/driver/src/infra/liquidity/config.rs +++ b/crates/driver/src/infra/liquidity/config.rs @@ -1,9 +1,12 @@ use { crate::{domain::eth, infra::blockchain::contracts::deployment_address}, hex_literal::hex, + reqwest::Url, std::{collections::HashSet, time::Duration}, }; +const DEFAULT_GRAPH_API_BASE_URL: &str = "https://api.thegraph.com/subgraphs/name/"; + /// Configuration options for liquidity fetching. #[derive(Clone, Debug)] pub struct Config { @@ -121,13 +124,16 @@ impl Swapr { } /// Uniswap V3 liquidity fetching options. -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Debug)] pub struct UniswapV3 { /// The address of the Uniswap V3 compatible router contract. pub router: eth::ContractAddress, /// How many pools should be initialized during start up. pub max_pools_to_initialize: usize, + + /// The base URL to connect to subgraph clients. + pub graph_api_base_url: Url, } impl UniswapV3 { @@ -137,6 +143,8 @@ impl UniswapV3 { Some(Self { router: deployment_address(contracts::UniswapV3SwapRouter::raw_contract(), network)?, max_pools_to_initialize: 100, + graph_api_base_url: Url::parse(&DEFAULT_GRAPH_API_BASE_URL) + .expect("invalid default Graph API base URL"), }) } } @@ -168,6 +176,9 @@ pub struct BalancerV2 { /// pools to get "bricked". This configuration allows those pools to be /// ignored. pub pool_deny_list: Vec, + + /// The base URL to connect to subgraph clients. + pub graph_api_base_url: Url, } impl BalancerV2 { @@ -205,6 +216,8 @@ impl BalancerV2 { contracts::BalancerV2ComposableStablePoolFactoryV5::raw_contract(), ]), pool_deny_list: Vec::new(), + graph_api_base_url: Url::parse(&DEFAULT_GRAPH_API_BASE_URL) + .expect("invalid default Graph API base URL"), }) } } diff --git a/crates/driver/src/infra/liquidity/fetcher.rs b/crates/driver/src/infra/liquidity/fetcher.rs index 71d2702cf9..84d1d1134d 100644 --- a/crates/driver/src/infra/liquidity/fetcher.rs +++ b/crates/driver/src/infra/liquidity/fetcher.rs @@ -4,6 +4,7 @@ use { domain::liquidity, infra::{self, blockchain::Ethereum, observe}, }, + reqwest::Url, std::{collections::HashSet, sync::Arc}, }; diff --git a/crates/driver/src/run.rs b/crates/driver/src/run.rs index 2fa0e35a4f..75dce0fcf9 100644 --- a/crates/driver/src/run.rs +++ b/crates/driver/src/run.rs @@ -16,6 +16,7 @@ use { }, clap::Parser, futures::future::join_all, + reqwest::Url, std::{net::SocketAddr, sync::Arc, time::Duration}, tokio::sync::oneshot, }; diff --git a/crates/orderbook/src/run.rs b/crates/orderbook/src/run.rs index 98a469f04a..4b354eae1f 100644 --- a/crates/orderbook/src/run.rs +++ b/crates/orderbook/src/run.rs @@ -291,6 +291,7 @@ pub async fn run(args: Arguments) { .unwrap_or_else(|| BalancerFactoryKind::for_chain(chain_id)); let contracts = BalancerContracts::new(&web3, factories).await.unwrap(); match BalancerPoolFetcher::new( + &args.shared.graph_api_base_url, chain_id, block_retriever.clone(), token_info_fetcher.clone(), @@ -319,6 +320,7 @@ pub async fn run(args: Arguments) { }; let uniswap_v3_pool_fetcher = if baseline_sources.contains(&BaselineSource::UniswapV3) { match UniswapV3PoolFetcher::new( + &args.shared.graph_api_base_url, chain_id, web3.clone(), http_factory.create(), diff --git a/crates/shared/src/arguments.rs b/crates/shared/src/arguments.rs index 9dc63df69e..9f62fc7467 100644 --- a/crates/shared/src/arguments.rs +++ b/crates/shared/src/arguments.rs @@ -162,6 +162,10 @@ pub struct Arguments { #[clap(long, env, default_value = "http://localhost:8545")] pub node_url: Url, + /// The base URL to connect to subgraph clients. + #[clap(long, env, default_value = "https://api.thegraph.com/subgraphs/name/")] + pub graph_api_base_url: Url, + /// An Ethereum node URL that supports `eth_call`s with state overrides to /// be used for simulations. #[clap(long, env)] @@ -415,6 +419,7 @@ impl Display for Arguments { self.logging.log_stderr_threshold )?; writeln!(f, "node_url: {}", self.node_url)?; + writeln!(f, "graph_api_base_url: {}", self.graph_api_base_url)?; display_option(f, "chain_id", &self.chain_id)?; display_option(f, "simulation_node_url", &self.simulation_node_url)?; writeln!(f, "gas_estimators: {:?}", self.gas_estimators)?; diff --git a/crates/shared/src/price_estimation/http.rs b/crates/shared/src/price_estimation/http.rs index 0da3e35447..3eba1d5cf4 100644 --- a/crates/shared/src/price_estimation/http.rs +++ b/crates/shared/src/price_estimation/http.rs @@ -765,8 +765,10 @@ mod tests { current_block_stream(Arc::new(web3.clone()), Duration::from_secs(10)) .await .unwrap(); + let base_url = Url::parse("https://api.thegraph.com/subgraphs/name/").expect("invalid url"); let balancer_pool_fetcher = Arc::new( BalancerPoolFetcher::new( + &base_url, chain_id, block_retriever.clone(), token_info.clone(), @@ -782,6 +784,7 @@ mod tests { ); let uniswap_v3_pool_fetcher = Arc::new( UniswapV3PoolFetcher::new( + &base_url, chain_id, web3.clone(), client.clone(), diff --git a/crates/shared/src/sources/balancer_v2/graph_api.rs b/crates/shared/src/sources/balancer_v2/graph_api.rs index f565d6a4db..ca23a9a570 100644 --- a/crates/shared/src/sources/balancer_v2/graph_api.rs +++ b/crates/shared/src/sources/balancer_v2/graph_api.rs @@ -13,7 +13,7 @@ use { crate::{event_handling::MAX_REORG_BLOCK_COUNT, subgraph::SubgraphClient}, anyhow::{bail, Result}, ethcontract::{H160, H256}, - reqwest::Client, + reqwest::{Client, Url}, serde::Deserialize, serde_json::json, serde_with::{serde_as, DisplayFromStr}, @@ -34,7 +34,7 @@ pub struct BalancerSubgraphClient(SubgraphClient); impl BalancerSubgraphClient { /// Creates a new Balancer subgraph client for the specified chain ID. - pub fn for_chain(chain_id: u64, client: Client) -> Result { + pub fn for_chain(base_url: &Url, chain_id: u64, client: Client) -> Result { let subgraph_name = match chain_id { 1 => "balancer-v2", 5 => "balancer-goerli-v2", @@ -42,6 +42,7 @@ impl BalancerSubgraphClient { _ => bail!("unsupported chain {}", chain_id), }; Ok(Self(SubgraphClient::new( + base_url, "balancer-labs", subgraph_name, client, @@ -485,8 +486,10 @@ mod tests { async fn balancer_subgraph_query() { for (network_name, chain_id) in [("Mainnet", 1), ("Goerli", 5)] { println!("### {network_name}"); - - let client = BalancerSubgraphClient::for_chain(chain_id, Client::new()).unwrap(); + let base_url = + Url::parse("https://api.thegraph.com/subgraphs/name/").expect("invalid url"); + let client = + BalancerSubgraphClient::for_chain(&base_url, chain_id, Client::new()).unwrap(); let result = client.get_registered_pools().await.unwrap(); println!( "Retrieved {} total pools at block {}", diff --git a/crates/shared/src/sources/balancer_v2/pool_fetching.rs b/crates/shared/src/sources/balancer_v2/pool_fetching.rs index ab68ea9867..af0340d3b4 100644 --- a/crates/shared/src/sources/balancer_v2/pool_fetching.rs +++ b/crates/shared/src/sources/balancer_v2/pool_fetching.rs @@ -49,7 +49,7 @@ use { ethcontract::{dyns::DynInstance, BlockId, Instance, H160, H256}, ethrpc::current_block::{BlockRetrieving, CurrentBlockStream}, model::TokenPair, - reqwest::Client, + reqwest::{Client, Url}, std::{ collections::{BTreeMap, HashMap, HashSet}, sync::Arc, @@ -279,6 +279,7 @@ impl BalancerContracts { impl BalancerPoolFetcher { #[allow(clippy::too_many_arguments)] pub async fn new( + base_url: &Url, chain_id: u64, block_retriever: Arc, token_infos: Arc, @@ -289,7 +290,7 @@ impl BalancerPoolFetcher { contracts: &BalancerContracts, deny_listed_pool_ids: Vec, ) -> Result { - let pool_initializer = BalancerSubgraphClient::for_chain(chain_id, client)?; + let pool_initializer = BalancerSubgraphClient::for_chain(base_url, chain_id, client)?; let fetcher = Arc::new(Cache::new( create_aggregate_pool_fetcher( web3, @@ -532,7 +533,9 @@ mod tests { "072f14b85add63488ddad88f855fda4a99d6ac9b000200000000000000000027" ))]; // let deny_list = vec![]; + let base_url = Url::parse("https://api.thegraph.com/subgraphs/name/").expect("invalid url"); let pool_fetcher = BalancerPoolFetcher::new( + &base_url, chain_id, Arc::new(web3.clone()), token_info_fetcher, @@ -590,9 +593,9 @@ mod tests { ), pool_id_deny_list: Default::default(), }; - + let base_url = Url::parse("https://api.thegraph.com/subgraphs/name/").expect("invalid url"); // see what the subgraph says. - let client = BalancerSubgraphClient::for_chain(chain_id, Client::new()).unwrap(); + let client = BalancerSubgraphClient::for_chain(&base_url, chain_id, Client::new()).unwrap(); let subgraph_pools = client.get_registered_pools().await.unwrap(); let subgraph_token_pairs = subgraph_pools_token_pairs(&subgraph_pools.pools).collect(); diff --git a/crates/shared/src/sources/uniswap_v3/graph_api.rs b/crates/shared/src/sources/uniswap_v3/graph_api.rs index 2a80031ee5..8c90901043 100644 --- a/crates/shared/src/sources/uniswap_v3/graph_api.rs +++ b/crates/shared/src/sources/uniswap_v3/graph_api.rs @@ -10,7 +10,7 @@ use { ethcontract::{H160, U256}, num::BigInt, number::serialization::HexOrDecimalU256, - reqwest::Client, + reqwest::{Client, Url}, serde::{Deserialize, Serialize}, serde_json::{json, Map, Value}, serde_with::{serde_as, DisplayFromStr}, @@ -107,12 +107,17 @@ pub struct UniV3SubgraphClient(SubgraphClient); impl UniV3SubgraphClient { /// Creates a new Uniswap V3 subgraph client for the specified chain ID. - pub fn for_chain(chain_id: u64, client: Client) -> Result { + pub fn for_chain(base_url: &Url, chain_id: u64, client: Client) -> Result { let subgraph_name = match chain_id { 1 => "uniswap-v3", _ => bail!("unsupported chain {}", chain_id), }; - Ok(Self(SubgraphClient::new("uniswap", subgraph_name, client)?)) + Ok(Self(SubgraphClient::new( + base_url, + "uniswap", + subgraph_name, + client, + )?)) } async fn get_pools(&self, query: &str, variables: Map) -> Result> { @@ -472,7 +477,8 @@ mod tests { #[tokio::test] #[ignore] async fn get_registered_pools_test() { - let client = UniV3SubgraphClient::for_chain(1, Client::new()).unwrap(); + let base_url = Url::parse("https://api.thegraph.com/subgraphs/name/").expect("invalid url"); + let client = UniV3SubgraphClient::for_chain(&base_url, 1, Client::new()).unwrap(); let result = client.get_registered_pools().await.unwrap(); println!( "Retrieved {} total pools at block {}", @@ -484,7 +490,8 @@ mod tests { #[tokio::test] #[ignore] async fn get_pools_by_pool_ids_test() { - let client = UniV3SubgraphClient::for_chain(1, Client::new()).unwrap(); + let base_url = Url::parse("https://api.thegraph.com/subgraphs/name/").expect("invalid url"); + let client = UniV3SubgraphClient::for_chain(&base_url, 1, Client::new()).unwrap(); let registered_pools = client.get_registered_pools().await.unwrap(); let pool_ids = registered_pools .pools @@ -505,7 +512,8 @@ mod tests { #[tokio::test] #[ignore] async fn get_ticks_by_pools_ids_test() { - let client = UniV3SubgraphClient::for_chain(1, Client::new()).unwrap(); + let base_url = Url::parse("https://api.thegraph.com/subgraphs/name/").expect("invalid url"); + let client = UniV3SubgraphClient::for_chain(&base_url, 1, Client::new()).unwrap(); let block_number = client.get_safe_block().await.unwrap(); let pool_ids = vec![ H160::from_str("0x9db9e0e53058c89e5b94e29621a205198648425b").unwrap(), @@ -521,7 +529,8 @@ mod tests { #[tokio::test] #[ignore] async fn get_pools_with_ticks_by_ids_test() { - let client = UniV3SubgraphClient::for_chain(1, Client::new()).unwrap(); + let base_url = Url::parse("https://api.thegraph.com/subgraphs/name/").expect("invalid url"); + let client = UniV3SubgraphClient::for_chain(&base_url, 1, Client::new()).unwrap(); let block_number = client.get_safe_block().await.unwrap(); let pool_ids = vec![ H160::from_str("0x9db9e0e53058c89e5b94e29621a205198648425b").unwrap(), diff --git a/crates/shared/src/sources/uniswap_v3/pool_fetching.rs b/crates/shared/src/sources/uniswap_v3/pool_fetching.rs index 5102d85cb6..269eb754ab 100644 --- a/crates/shared/src/sources/uniswap_v3/pool_fetching.rs +++ b/crates/shared/src/sources/uniswap_v3/pool_fetching.rs @@ -18,7 +18,7 @@ use { model::TokenPair, num::{rational::Ratio, BigInt, Zero}, number::serialization::HexOrDecimalU256, - reqwest::Client, + reqwest::{Client, Url}, serde::Serialize, serde_with::{serde_as, DisplayFromStr}, std::{ @@ -131,11 +131,12 @@ impl PoolsCheckpointHandler { /// state/ticks). Then fetches state/ticks for the most deepest pools /// (subset of all existing pools) pub async fn new( + base_url: &Url, chain_id: u64, client: Client, max_pools_to_initialize_cache: usize, ) -> Result { - let graph_api = UniV3SubgraphClient::for_chain(chain_id, client)?; + let graph_api = UniV3SubgraphClient::for_chain(base_url, chain_id, client)?; let mut registered_pools = graph_api.get_registered_pools().await?; tracing::debug!( block = %registered_pools.fetched_block_number, pools = %registered_pools.pools.len(), @@ -265,6 +266,7 @@ pub struct UniswapV3PoolFetcher { impl UniswapV3PoolFetcher { pub async fn new( + base_url: &Url, chain_id: u64, web3: Web3, client: Client, @@ -272,7 +274,8 @@ impl UniswapV3PoolFetcher { max_pools_to_initialize: usize, ) -> Result { let checkpoint = - PoolsCheckpointHandler::new(chain_id, client, max_pools_to_initialize).await?; + PoolsCheckpointHandler::new(base_url, chain_id, client, max_pools_to_initialize) + .await?; let init_block = checkpoint.pools_checkpoint.lock().unwrap().block_number; let init_block = block_retriever.block(init_block).await?; @@ -723,9 +726,11 @@ mod tests { let transport = ethrpc::create_env_test_transport(); let web3 = Web3::new(transport); let block_retriever = Arc::new(web3.clone()); - let fetcher = UniswapV3PoolFetcher::new(1, web3, Client::new(), block_retriever, 100) - .await - .unwrap(); + let base_url = Url::parse("https://api.thegraph.com/subgraphs/name/").expect("invalid url"); + let fetcher = + UniswapV3PoolFetcher::new(&base_url, 1, web3, Client::new(), block_retriever, 100) + .await + .unwrap(); assert!(!fetcher.checkpoint.pools_by_token_pair.is_empty()); assert!(!fetcher @@ -743,10 +748,17 @@ mod tests { let transport = ethrpc::create_env_test_transport(); let web3 = Web3::new(transport); let block_retriever = Arc::new(web3.clone()); - let fetcher = - UniswapV3PoolFetcher::new(1, web3.clone(), Client::new(), block_retriever, 100) - .await - .unwrap(); + let base_url = Url::parse("https://api.thegraph.com/subgraphs/name/").expect("invalid url"); + let fetcher = UniswapV3PoolFetcher::new( + &base_url, + 1, + web3.clone(), + Client::new(), + block_retriever, + 100, + ) + .await + .unwrap(); fetcher.run_maintenance().await.unwrap(); let token_pairs = HashSet::from([ TokenPair::new( @@ -769,8 +781,9 @@ mod tests { .unwrap(); pools.sort_by(|a, b| a.address.cmp(&b.address)); + let base_url = Url::parse("https://api.thegraph.com/subgraphs/name/").expect("invalid url"); // get the same pools using direct call to subgraph - let graph_api = UniV3SubgraphClient::for_chain(1, Client::new()).unwrap(); + let graph_api = UniV3SubgraphClient::for_chain(&base_url, 1, Client::new()).unwrap(); let pool_ids = pools.iter().map(|pool| pool.address).collect::>(); // first get at the block in history diff --git a/crates/shared/src/subgraph.rs b/crates/shared/src/subgraph.rs index 139b784b79..69fd1bc15d 100644 --- a/crates/shared/src/subgraph.rs +++ b/crates/shared/src/subgraph.rs @@ -19,9 +19,8 @@ pub struct SubgraphClient { } lazy_static! { - pub static ref DEFAULT_GRAPH_API_BASE_URL: Url = - Url::parse("https://api.thegraph.com/subgraphs/name/") - .expect("invalid default Graph API base URL"); + pub static ref DEFAULT_GRAPH_API_BASE_URL: String = + String::from("https://api.thegraph.com/subgraphs/name/"); } pub trait ContainsId { @@ -36,8 +35,13 @@ pub struct Data { impl SubgraphClient { /// Creates a new subgraph client from the specified organization and name. - pub fn new(org: impl AsRef, name: impl AsRef, client: Client) -> Result { - Self::with_base_url(DEFAULT_GRAPH_API_BASE_URL.clone(), org, name, client) + pub fn new( + base_url: &Url, + org: impl AsRef, + name: impl AsRef, + client: Client, + ) -> Result { + Self::with_base_url(base_url.clone(), org, name, client) } /// Creates a new subgraph client with the specified base URL. diff --git a/crates/solver/src/run.rs b/crates/solver/src/run.rs index 391d8e77ef..09fd848b1b 100644 --- a/crates/solver/src/run.rs +++ b/crates/solver/src/run.rs @@ -210,6 +210,7 @@ pub async fn run(args: Arguments) { .unwrap_or_else(|| BalancerFactoryKind::for_chain(chain_id)); let contracts = BalancerContracts::new(&web3, factories).await.unwrap(); match BalancerPoolFetcher::new( + &args.shared.graph_api_base_url, chain_id, block_retriever.clone(), token_info_fetcher.clone(), @@ -418,6 +419,7 @@ pub async fn run(args: Arguments) { if baseline_sources.contains(&BaselineSource::UniswapV3) { match UniswapV3PoolFetcher::new( + &args.shared.graph_api_base_url, chain_id, web3.clone(), http_factory.create(),