diff --git a/src/config.rs b/src/config.rs index c7d93bb8..01975686 100644 --- a/src/config.rs +++ b/src/config.rs @@ -91,7 +91,7 @@ pub struct BuilderConfig { var = "FLASHBOTS_ENDPOINT", desc = "Flashbots endpoint for privately submitting Signet bundles" )] - pub flashbots_endpoint: Option, + pub flashbots_endpoint: url::Url, /// URL for remote Quincey Sequencer server to sign blocks. /// NB: Disregarded if a sequencer_signer is configured. @@ -219,11 +219,9 @@ impl BuilderConfig { &self, config: &BuilderConfig, ) -> Result { - let endpoint = - config.flashbots_endpoint.clone().expect("flashbots endpoint must be configured"); let signer = config.connect_builder_signer().await?; let flashbots: FlashbotsProvider = - ProviderBuilder::new().wallet(signer).connect_http(endpoint); + ProviderBuilder::new().wallet(signer).connect_http(config.flashbots_endpoint.clone()); Ok(flashbots) } diff --git a/src/test_utils.rs b/src/test_utils.rs index c2393667..c5c5ef43 100644 --- a/src/test_utils.rs +++ b/src/test_utils.rs @@ -32,7 +32,7 @@ pub fn setup_test_config() -> Result { .unwrap() .try_into() .unwrap(), - flashbots_endpoint: Some("https://relay-sepolia.flashbots.net:443".parse().unwrap()), + flashbots_endpoint: "https://relay-sepolia.flashbots.net:443".parse().unwrap(), quincey_url: "http://localhost:8080".into(), sequencer_key: None, builder_key: env::var("SEPOLIA_ETH_PRIV_KEY")