async fn mint(&mut self) -> anyhow::Result<()> {
        tracing::info!("Master Account: Minting ERC20 token...");
        let mint_amount = self.amount_to_deposit() + self.amount_for_l1_distribution();

        let master_wallet = &self.pool.master_wallet;
        let mut ethereum = master_wallet.ethereum(&self.config.l1_rpc_address).await?;
        ethereum.set_confirmation_timeout(ETH_CONFIRMATION_TIMEOUT);
        ethereum.set_polling_interval(ETH_POLLING_INTERVAL);

        let token = self.config.main_token;

        let eth_balance = ethereum
            .erc20_balance(master_wallet.address(), token)
            .await?;

        // Only send the mint transaction if it's necessary.
        if eth_balance > U256::from(mint_amount) {
            tracing::info!("There is already enough money on the master balance");
            return Ok(());
        }

        let mint_tx_hash = ethereum
            .mint_erc20(token, U256::from(u128::MAX), master_wallet.address())
            .await;

        let mint_tx_hash = match mint_tx_hash {
            Err(error) => {
                let balance = ethereum.balance().await;
                let gas_price = ethereum.query_client().get_gas_price().await;

                anyhow::bail!(
                    "{:?}, Balance: {:?}, Gas Price: {:?}",
                    error,
                    balance,
                    gas_price
                );
            }
            Ok(value) => value,
        };

        tracing::info!("Mint tx with hash {mint_tx_hash:?}");
        let receipt = ethereum.wait_for_tx(mint_tx_hash).await?;
        self.assert_eth_tx_success(&receipt).await;

        let erc20_balance = ethereum
            .erc20_balance(master_wallet.address(), token)
            .await?;
        assert!(
            erc20_balance >= mint_amount.into(),
            "Minting didn't result in tokens added to balance"
        );

        tracing::info!("Master Account: Minting is OK (balance: {erc20_balance})");
        Ok(())
    }
Mints the ERC-20 token on the main wallet.
core/tests/loadnext/src/executor.rs