> For the complete documentation index, see [llms.txt](https://docs-launchpad.energyweb.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-launchpad.energyweb.org/ewx-ecosystem/pallets/preimages-pallet.md).

# Preimages Pallet

The **Preimages Pallet** is a specialized component in the Substrate runtime that facilitates the storage, retrieval, and management of large data blobs (preimages) on-chain. It is particularly useful for governance and other modules requiring access to detailed proposals or large datasets while minimizing storage costs.

Key functionalities:

* **Efficient Storage of Preimages**: Allows users to submit and store large preimage data off-chain initially, ensuring cost-effective on-chain storage.
* **On-Demand Retrieval**: Enables on-chain modules, such as governance proposals, to reference and retrieve preimages only when they need to be executed or evaluated.
* **Preimage Validation**: Includes a framework to validate and verify the integrity of preimages against hashes before use and ensures that the preimage data corresponds accurately to its referenced hash.
* **Access and Ownership Control**: Supports fine-grained access controls, ensuring only authorized entities can submit or clear preimages and allows multiple modules and users to leverage preimages securely without conflict.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-launchpad.energyweb.org/ewx-ecosystem/pallets/preimages-pallet.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
