diff --git a/packages/fuels-accounts/src/provider.rs b/packages/fuels-accounts/src/provider.rs index af0e2833d0..5cfca1f5b1 100644 --- a/packages/fuels-accounts/src/provider.rs +++ b/packages/fuels-accounts/src/provider.rs @@ -4,8 +4,6 @@ mod retry_util; mod retryable_client; use chrono::{DateTime, Utc}; -#[cfg(feature = "fuel-core-lib")] -use fuel_core::service::{Config, FuelService}; use fuel_core_client::client::{ pagination::{PageDirection, PaginatedResult, PaginationRequest}, types::{balance::Balance, contract::ContractBalance, TransactionStatus}, @@ -36,7 +34,6 @@ use tai64::Tai64; use thiserror::Error; use crate::provider::retryable_client::RetryableClient; - type ProviderResult = std::result::Result; #[derive(Debug)] @@ -260,13 +257,6 @@ impl Provider { Ok(status) } - #[cfg(feature = "fuel-core-lib")] - /// Launches a local `fuel-core` network based on provided config. - pub async fn launch(config: Config) -> Result { - let srv = FuelService::new_node(config).await.unwrap(); - Ok(FuelClient::from(srv.bound_address)) - } - pub async fn chain_info(&self) -> ProviderResult { Ok(self.client.chain_info().await?.into()) } diff --git a/packages/fuels/Cargo.toml b/packages/fuels/Cargo.toml index 6fbe0d0c86..483c4cf6e0 100644 --- a/packages/fuels/Cargo.toml +++ b/packages/fuels/Cargo.toml @@ -10,6 +10,9 @@ repository = { workspace = true } rust-version = { workspace = true } description = "Fuel Rust SDK." +#[package.metadata.cargo-machete] +#ignored = ["fuel-core"] + [dependencies] fuel-core = { workspace = true, default-features = false, optional = true } fuel-core-client = { workspace = true, optional = true } diff --git a/packages/fuels/tests/types_contracts.rs b/packages/fuels/tests/types_contracts.rs index 35f96ccc81..9eeaf4caae 100644 --- a/packages/fuels/tests/types_contracts.rs +++ b/packages/fuels/tests/types_contracts.rs @@ -832,7 +832,9 @@ async fn strings_must_have_correct_length() { "#, )); - let wallet = launch_provider_and_get_wallet().await.unwrap(); + let wallet = launch_provider_and_get_wallet() + .await + .expect("Should have wallet"); let contract_instance = SimpleContract::new(null_contract_id(), wallet); let _ = contract_instance .methods() @@ -1063,7 +1065,9 @@ async fn strings_must_have_all_ascii_chars_custom_types() { foo: inner_struct, }; - let wallet = launch_provider_and_get_wallet().await.unwrap(); + let wallet = launch_provider_and_get_wallet() + .await + .expect("Should have wallet"); let contract_instance = SimpleContract::new(null_contract_id(), wallet); let _ = contract_instance.methods().takes_nested_struct(input); } @@ -1998,7 +2002,7 @@ async fn test_contract_std_lib_string() -> Result<()> { #[tokio::test] async fn test_heap_type_in_enums() -> Result<()> { - let wallet = launch_provider_and_get_wallet().await; + let wallet = launch_provider_and_get_wallet().await?; setup_program_test!( Abigen(Contract( name = "HeapTypeInEnum",