# Setting up your workspace

A workspace is nothing else but a folder which will be mounted into the `qvm-compiler-*` and `qvmctl` docker containers.

It will contain:

* A private key used for deployment and contract calls
* The smart contract binary to be deployed

To create the workspace create the `ws` directory in your current directory like this:

```
mkdir ws && cd ws
```

## Generate a random private key <a href="#generate-a-random-private-key" id="generate-a-random-private-key"></a>

First you need a random secp256k1 private key, which is (almost) any random 32 byte sequence in a hexadecimal format with `0x` prepended to it. If you have OpenSSL installed (most likely you have it if you are running Linux or macOS) then you can generate one easily with the following command:

```
echo "0x"$(openssl rand -hex 32) > privkey.txt
```

## Determine your wallet address <a href="#determine-your-wallet-address" id="determine-your-wallet-address"></a>

Based on the randomly generated key you will end up with a wallet address. Run the following command in your terminal:

```
docker run --rm -v $(pwd):/ws qanplatform/qvmctl deploy --privkey privkey.txt .
```

Mind the dot (".") at the end of the command!

If you did it correctly you will receive a message like `"Connected to QVM Repository with 0xYOURADDRESS"`. The message is followed by an insufficient balance notification, which is of course normal.

## Get some sETH for your wallet <a href="#get-some-reth-for-your-wallet" id="get-some-reth-for-your-wallet"></a>

As stated previously, QVM is tested as a Layer2 smart contract execution engine on the Sepolia Ethereum testnet. First you will need at least 1 sETH so you can play around with QVM, because fees related to the operations must be paid on the testnet as well.

You can get some sETH for your wallet on these Faucet websites for example:&#x20;

<https://sepolia-faucet.pk910.de>\
<https://grabteeth.xyz>\
<https://fauceth.komputing.org>

Enter the wallet address you obtained in the previous step and wait for your sETH to arrive.


---

# 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/setting-up-your-workspace.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.
