> For the complete documentation index, see [llms.txt](https://doc.cess.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.cess.network/developer/cess-sdk/sdk-rust/chain/file_bank/deal_map.md).

# deal Map

The `deal_map` is used to query file storage orders.

```rust
/// Asynchronously retrieves the `DealInfo` associated with a given hash.
///
/// # Parameters
/// - `hash`: A string slice that holds the hash identifier for the deal.
/// - `block_hash`: An optional `H256` hash representing the block hash to query the deal against.
///
/// # Returns
/// A `Result` which is:
/// - `Ok(Some(DealInfo))` if the deal is found and successfully retrieved.
/// - `Ok(None)` if the deal is not found.
/// - `Err(Box<dyn std::error::Error>)` if there is an error during retrieval.
///
pub async fn deal_map(
    hash: &str,
    block_hash: Option<H256>,
) -> Result<Option<DealInfo>, Box<dyn std::error::Error>>
```
