# Deploying a Smart Contract

## Prerequisites

Ensure Olatte is installed correctly:

```shell
olatte --version
```

If this command fails, see [Setting up your environment.](/ola-developer-documents/quick_start/setup_environment.md)

## Deploying a smart contract

You can write Ola smart contracts using [Ola-lang](https://olang.gitbook.io/ola-lang/) and compile them with olatte, Taking the [vote\_simple.ola](https://github.com/Sin7Y/ola-lang/blob/main/examples/source/storage/vote_simple.ola) contract as an example:

```shell
olatte compile path/to/vote_simple.ola path/of/output/dir
```

This command will generate a bin file and an abi file; the bin file is used for the deployment of the contract:

```shell
olatte deploy --network pre-alpha path/to/MyContract_bin.json
```


---

# 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://ola-2.gitbook.io/ola-developer-documents/quick_start/deploy_contract.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.
