async fn send_initial_transfers(&mut self) -> anyhow::Result<LoadtestResult> {
        tracing::info!("Master Account: Sending initial transfers");
        // How many times we will resend a batch.
        const MAX_RETRIES: usize = 3;

        // Prepare channels for the report collector.
        let (mut report_sender, report_receiver) = mpsc::channel(256);

        let report_collector = ReportCollector::new(
            report_receiver,
            self.config.expected_tx_count,
            self.config.duration(),
            self.config.prometheus_label.clone(),
            self.config.fail_fast,
        );
        let report_collector_future = tokio::spawn(report_collector.run());

        let config = &self.config;
        let accounts_amount = config.accounts_amount;
        let addresses = self.pool.addresses.clone();
        let paymaster_address = self
            .pool
            .master_wallet
            .provider
            .get_testnet_paymaster()
            .await?
            .expect("No testnet paymaster is set");

        let mut retry_counter = 0;
        let mut accounts_processed = 0;
        let limiters = Arc::new(RequestLimiters::new(config));

        let mut account_tasks = vec![];
        while accounts_processed != accounts_amount {
            if retry_counter > MAX_RETRIES {
                anyhow::bail!("Reached max amount of retries when sending initial transfers");
            }

            let accounts_left = accounts_amount - accounts_processed;
            let max_accounts_per_iter = MAX_OUTSTANDING_NONCE;
            let accounts_to_process = std::cmp::min(accounts_left, max_accounts_per_iter);

            if let Err(err) = self.send_initial_transfers_inner(accounts_to_process).await {
                tracing::warn!("Iteration of the initial funds distribution failed: {err}");
                retry_counter += 1;
                continue;
            }

            accounts_processed += accounts_to_process;
            tracing::info!("[{accounts_processed}/{accounts_amount}] Accounts processed");

            retry_counter = 0;

            let contract_execution_params = self.execution_config.contract_execution_params.clone();
            // Spawn each account lifespan.
            let main_token = self.l2_main_token;

            anyhow::ensure!(
                !report_sender.is_closed(),
                "test aborted; see reporter logs for details"
            );

            let new_account_futures =
                self.pool
                    .accounts
                    .drain(..accounts_to_process)
                    .map(|wallet| {
                        let account = AccountLifespan::new(
                            config,
                            contract_execution_params.clone(),
                            addresses.clone(),
                            wallet,
                            report_sender.clone(),
                            main_token,
                            paymaster_address,
                        );
                        let limiters = Arc::clone(&limiters);
                        tokio::spawn(async move { account.run(&limiters).await })
                    });
            account_tasks.extend(new_account_futures);
        }

        report_sender
            .send(ReportBuilder::build_init_complete_report())
            .await
            .map_err(|_| anyhow!("test aborted; see reporter logs for details"))?;
        drop(report_sender);
        // ^ to terminate `report_collector_future` once all `account_futures` are finished

        assert!(
            self.pool.accounts.is_empty(),
            "Some accounts were not drained"
        );
        tracing::info!("All the initial transfers are completed");

        tracing::info!("Waiting for the account futures to be completed...");
        future::try_join_all(account_tasks).await?;
        tracing::info!("All the spawned tasks are completed");

        Ok(report_collector_future.await?)
    }
Initializes the loadtest by doing the following:

- Spawning the `ReportCollector`.
- Distributing ERC-20 token in L2 among test wallets via `Transfer` operation.
- Distributing ETH in L1 among test wallets in order to make them able to perform priority operations.
- Spawning test account routine futures.
- Completing all the spawned tasks and returning the result to the caller.
core/tests/loadnext/src/executor.rs