Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/volumefi/twap_bot_python_script


https://github.com/volumefi/twap_bot_python_script

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# PancakeSwap Bot

This repository contains scripts to interact with decentralized exchanges such as PancakeSwap, Uniswap, and Apeswap. The scripts utilize `web3` and `paloma_sdk` to connect with the blockchain and perform specific tasks.

## Setup

1. **Clone the repository** `git clone https://github.com/your-github-username/pancakeswap-bot.git`
2. **Navigate to the cloned directory** `cd pancakeswap-bot`
3. **Install dependencies** `pip install -r requirements.txt`

## Environment Variables

The scripts rely on certain environment variables. To set them up, create a `.env` file in the project root with the following entries:

```
PALOMA_LCD=
PALOMA_CHAIN_ID=
PALOMA_KEY=
```

Replace ``, ``, and `` with actual values.

## Network Configuration

The scripts use a `networks.json` file for network-specific configurations. This file should contain an array of objects, each representing a network. The networks are cycled through when the scripts are run.

Here's the structure of a network configuration:

```json
[{
"NODE": "",
"ABI": "",
"ADDRESS": "",
"JOB_ID": "",
"CHAIN_TYPE": "",
"CHAIN_REFERENCE_ID": "",
"COINGECKO_CHAIN_ID": "",
"NETWORK_NAME": "",
"WETH": "",
"FROM_BLOCK": "",
"CW": "",
"DEX": ""
}]
```
Replace the placeholders with actual values.

## Running the Scripts

The following scripts are available:

bot_execute.py: Runs the PancakeSwap bot.
bot_init.py: Calls the triggerable deposit function and performs swaps if applicable.
bot_set_paloma.py: Executes a set_paloma command.

To run a script, use the following command:
`python .py`