pub fn from_request(
        request: CallRequest,
        allow_no_target: bool,
    ) -> Result<Self, SerializationTransactionError> {
        // L1 transactions have no limitations on the transaction size.
        let tx: L2Tx = L2Tx::from_request(request.into(), MAX_ENCODED_TX_SIZE, allow_no_target)?;

        // Note, that while the user has theoretically provided the fee for ETH on L1,
        // the payment to the operator as well as refunds happen on L2 and so all the ETH
        // that the transaction requires to pay the operator needs to be minted on L2.
        let total_needed_eth =
            tx.execute.value + tx.common_data.fee.max_fee_per_gas * tx.common_data.fee.gas_limit;

        // Note, that we do not set `refund_recipient` here, to keep it explicitly 0,
        // so that during fee estimation it is taken into account that the refund recipient may be a different address
        let common_data = L1TxCommonData {
            sender: tx.common_data.initiator_address,
            max_fee_per_gas: tx.common_data.fee.max_fee_per_gas,
            gas_limit: tx.common_data.fee.gas_limit,
            gas_per_pubdata_limit: tx.common_data.fee.gas_per_pubdata_limit,
            to_mint: total_needed_eth,
            ..Default::default()
        };

        let tx = L1Tx {
            execute: tx.execute,
            common_data,
            received_timestamp_ms: 0u64,
        };

        Ok(tx)
    }
Converts a request into a transaction.

# Arguments

- `allow_no_target` enables / disables transactions without target (i.e., `to` field).
This field can only be absent for EVM deployment transactions.
core/lib/types/src/transaction_request.rs