> For the complete documentation index, see [llms.txt](https://docs.bonzo.finance/hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bonzo.finance/hub/developer/bonzo-lend/liquidation-bots-beta/environment-setup.md).

# Environment Setup

## Prerequisites

Before we begin, make sure you have the following:

* **Basic understanding** of Solidity, Hardhat, and JavaScript/TypeScript.
* **Node.js and npm** installed on your machine.
* [**HashPack**](https://hashpack.app) or another wallet configured for the Hedera network.
* **Hedera testnet** account credentials.

### 1. Clone the Repository

First, clone the repository containing the smart contract and script:

{% code overflow="wrap" %}

```bash
git clone https://github.com/Bonzo-Labs/bonzo-finance-contracts.git
cd bonzo-finance-contracts
```

{% endcode %}

### 2. Install Dependencies

Install the required npm packages (you may need to use the **`--legacy-peer-deps`** flag due to older versions of dependencies):

```bash
npm install --legacy-peer-deps
```

### 3. Configure Environment Variables

Create a **`.env`** file in the root directory and add your Hedera account details and other configurations:

```bash
PRIVATE_KEY=your-private-key
ACCOUNT_ID=your-account-id
PROVIDER_URL=https://testnet.hashio.io/api
LENDING_POOL_ADDRESS=0x...
DATA_PROVIDER_ADDRESS=0x...
PRICE_ORACLE_ADDRESS=0x...
LIQUIDATOR_CONTRACT_ADDRESS=0x...
```

* Replace **`your-private-key`** and **`your-account-id`** with your actual Hedera testnet account credentials.
* Replace **`0x...`** with the actual contract addresses. You can find the mainnet contract addresses [here](https://docs.bonzo.finance/hub/developer/contract-deployments).

### 4. Install Hedera SDK (if not already installed)

```bash
npm install @hashgraph/sdk
```


---

# 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.bonzo.finance/hub/developer/bonzo-lend/liquidation-bots-beta/environment-setup.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.
