# Reading smart contract storage

It is easy to read any database field of any contract.

## Read a single field <a href="#read-a-single-field" id="read-a-single-field"></a>

To read a single field execute the following command:

```
docker run --rm qanplatform/qvmctl query $CONTRACT_ADDR $DB_SLOT
```

Make sure you replace `$CONTRACT_ADDR` and `$DB_SLOT` with the right values.

## Read multiple fields <a href="#read-multiple-fields" id="read-multiple-fields"></a>

To read multiple fields execute the following command:

```
docker run --rm qanplatform/qvmctl query $CONTRACT_ADDR $DB_SLOT1,$DB_SLOT2,$DB_SLOTN
```

Make sure you replace `$CONTRACT_ADDR` and `$DB_SLOT{N}` variables with the right values. Also pay attention that DB\_SLOT variable names are separated by a comma and there is no whitespace inbetween.


---

# Agent Instructions: 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:

```
GET https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/generic-workflow/reading-smart-contract-storage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
