pub async fn launch_custom_provider_and_get_wallets(
wallet_config: WalletsConfig,
provider_config: Option<NodeConfig>,
chain_config: Option<ChainConfig>,
) -> Result<Vec<WalletUnlocked>>
Expand description
Launches a custom node and provider, along with a configurable number of wallets.
§Examples
use fuels_test_helpers::launch_custom_provider_and_get_wallets;
use fuels_test_helpers::WalletsConfig;
async fn multiple_wallets() -> Result<(), Box<dyn std::error::Error>> {
let num_wallets = 2;
let num_coins = 1;
let amount = 1;
let config = WalletsConfig::new(Some(num_wallets), Some(num_coins), Some(amount));
let mut wallets = launch_custom_provider_and_get_wallets(config, None, None).await?;
let first_wallet = wallets.pop().unwrap();
dbg!(first_wallet.address());
Ok(())
}