This project uses the Silverback framework to run a bot that interacts with a SQLite database. This guide will help you set up your environment and run the bot.
- Python 3.8 or higher
pip
(Python package installer)- Silverback framework installed
Create a .env file in your project directory to define environment variables with touch .env
Add variables like these to the file:
WEB3_ALCHEMY_PROJECT_ID=
ERC4626_VAULT_ADDRESS=
Ensure you have all necessary dependencies installed. You can typically do this with: pip install -r requirements.txt
Ensure you have all necessary dependencies installed. You can typically do this with:
ape plugins install . -U
Ensure that your ape-config.yaml
default network is mainnet and alchemy.
Once the setup is complete, you can run your bot using the Silverback CLI. Use the following command: silverback run bots.silverback_yield:bot --network ethereum:mainnet:alchemy
-
Ensure your .env file is properly formatted and located in the root of your project.
-
FileNotFoundError: The bots directory '/path/to/silverback/bots' does not exist. You should have a
bots/
folder in the root of your project. -
ProviderNotConnectedError: Not connected to a network provider. You have to specify a network in the cli command ex:
silverback run bots.silverback_yield:bot --network ethereum:mainnet:alchemy