fn try_from(req: abi::NewPriorityRequest) -> anyhow::Result<Self> {
        anyhow::ensure!(req.transaction.tx_type == PRIORITY_OPERATION_L2_TX_TYPE.into());
        anyhow::ensure!(req.transaction.nonce == req.tx_id); // serial id from decoded from transaction bytes should be equal to one from event
        anyhow::ensure!(req.transaction.max_priority_fee_per_gas == U256::zero());
        anyhow::ensure!(req.transaction.paymaster == U256::zero());
        anyhow::ensure!(req.transaction.hash() == H256::from_slice(&req.tx_hash));
        let factory_deps_hashes: Vec<_> = req
            .factory_deps
            .iter()
            .map(|b| BytecodeHash::for_bytecode(b).value_u256())
            .collect();
        anyhow::ensure!(req.transaction.factory_deps == factory_deps_hashes);
        for item in &req.transaction.reserved[2..] {
            anyhow::ensure!(item == &U256::zero());
        }
        anyhow::ensure!(req.transaction.signature.is_empty());
        anyhow::ensure!(req.transaction.paymaster_input.is_empty());
        anyhow::ensure!(req.transaction.reserved_dynamic.is_empty());

        let common_data = L1TxCommonData {
            serial_id: PriorityOpId(req.transaction.nonce.try_into().unwrap()),
            canonical_tx_hash: H256::from_slice(&req.tx_hash),
            sender: u256_to_address(&req.transaction.from),
            layer_2_tip_fee: U256::zero(),
            to_mint: req.transaction.reserved[0],
            refund_recipient: u256_to_address(&req.transaction.reserved[1]),
            full_fee: U256::zero(),
            gas_limit: req.transaction.gas_limit,
            max_fee_per_gas: req.transaction.max_fee_per_gas,
            gas_per_pubdata_limit: req.transaction.gas_per_pubdata_byte_limit,
            op_processing_type: OpProcessingType::Common,
            priority_queue_type: PriorityQueueType::Deque,
            // DEPRECATED.
            eth_block: 0,
        };

        let execute = Execute {
            contract_address: Some(u256_to_address(&req.transaction.to)),
            calldata: req.transaction.data,
            factory_deps: req.factory_deps,
            value: req.transaction.value,
        };
        Ok(Self {
            common_data,
            execute,
            received_timestamp_ms: 0,
        })
    }
Note that this method doesn't set `eth_block` and `received_timestamp_ms`
because `req` doesn't contain those. They can be set after this conversion.
core/lib/types/src/l1/mod.rs