# 2️⃣ Environment setup

Kinto supports Foundry, Hardhat, and Truffe. You can pick one and follow the instructions in [<mark style="color:purple;">this section to install it</mark>](/kinto-the-modular-exchange/building-on-kinto/tools/build-tools.md).

The rest of this documentation assumes Foundry and Forge/Cast.

## 1. Clone the repo

To start, execute git clone for our main repository [<mark style="color:purple;">**kinto-core**</mark>](https://github.com/KintoXYZ/kinto-core)**.**  This repository contains all of the smart contracts of the project and most importantly some scripts and helpers to interact with the chain.

```shell-session
git clone git@github.com:KintoXYZ/kinto-core.git
```

## 2. Installing dependencies and running the tests

Make sure that [<mark style="color:purple;">foundry CLI</mark>](/kinto-the-modular-exchange/building-on-kinto/tools/build-tools.md#foundry) is installed and run the following:

```shell-session
forge test
... when the script finishes, you should see ...

Ran X test suites: Y tests passed, 0 failed, 0 skipped (Z total tests)
```

## 3. Setup your env file&#x20;

Set your .env variables next:

```shell-session
cp .env.sample .env
```

Fill (at least) the following variables:

```json
KINTO_RPC_URL="https://rpc.kinto-rpc.com"
MAINNET_NETWORK_ID="7887"
KINTO_DEV_KEY= //Private key for your deployer EOA
KINTO_WALLET= //Kinto wallet public address
KINTO_WALLET_SIGNER_KEY= //EOA signer of your Kinto Wallet
```

## 4. Setting up a remote chain (optional)

{% hint style="info" %}
You can develop using forge tests directly.

When you are ready to test things in a natural environment, we recommend using Anvil to fork mainnet and work against it.

More information about the complete process can be found on the repositories [README](https://github.com/KintoXYZ/kinto-core/blob/aa/README.md).
{% endhint %}

```
anvil -f <KINTO_REMOTE_URL> --fork-block-number <OPTIONAL_BLOCK>
```

Copy your local fork URL and override KINTO\_RPC\_URL with your fork.&#x20;


---

# 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://docs.kinto.xyz/kinto-the-modular-exchange/building-on-kinto/development-setup/environment-setup.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.
