Setup Project

Create project directory and venv

First you need to create a directory to contain your project files and create a virtualenv.

$ mkdir -p ~/projects/MyNewProject
$ python3.10 -m venv venv
$ source venv/bin/activate

Install PAB and initialize project

Then install the PyAutoBlockchain dependency in your virtualenv and run pab init to create the basic project structure.

(venv) $ pip install PyAutoBlockchain
(venv) $ pab init  # Initialize project in current directory

Project Structure

Barebones

This is an example of the most basic structure required by a PAB project.

MyPABProject
├── abis
│   └── SomeSmartContract.abi
├── .env
├── config.json
├── contracts.json
├── tasks.json
└── strategies.py

This structure does not have tests.