async fn get_tx(
        self,
        client: &mut TxClient<Channel>,
        hex_encoded_tx_hash: String,
    ) -> anyhow::Result<Option<u64>> {
        let request = GetTxRequest {
            hash: hex_encoded_tx_hash,
        };
        let response = client.get_tx(request).await;

        let ok_response = match response {
            Ok(resp) => resp,
            Err(status) => {
                if status.code() == tonic::Code::NotFound {
                    tracing::trace!(msg = status.message(), "transaction still pending");
                    return Ok(None);
                }
                return Err(anyhow::anyhow!(
                    "failed to get tx, code: {}, message: {}",
                    status.code(),
                    status.message()
                ));
            }
        };
        let tx_response = ok_response
            .into_inner()
            .tx_response
            .ok_or_else(|| anyhow::anyhow!("Empty get tx response"))?;
        if tx_response.code != 0 {
            return Err(anyhow::anyhow!(
                "failed to get tx, tx_hash: {}, code: {}, namespace: {}, log: {}",
                tx_response.txhash,
                tx_response.code,
                tx_response.codespace,
                tx_response.raw_log,
            ));
        }
        if tx_response.height == 0 {
            tracing::trace!(tx_hash = %tx_response.txhash, "transaction still pending");
            return Ok(None);
        }

        let height = u64::try_from(tx_response.height).map_err(|_| {
            anyhow::anyhow!("GetTxResponseNegativeBlockHeight: {}", tx_response.height)
        })?;

        tracing::debug!(tx_hash = %tx_response.txhash, height, "transaction succeeded");
        Ok(Some(height))
    }
Returns the height of the block in which the transaction was included (if it was).
core/node/da_clients/src/celestia/sdk.rs