Thank you for wanting to contribute! This project reviews PRs that have an associated issue with them. If you have not make an issue for your PR, please make one first.
Issues, feedback, and sharing that you're using Titanoboa and Vyper on social media is always welcome!
You must have the following installed to proceed with contributing to this project.
- git
- You'll know you did it right if you can run
git --version
and you see a response likegit version x.x.x
- You'll know you did it right if you can run
- python
- You'll know you did it right if you can run
python --version
and you see a response likePython x.x.x
- You'll know you did it right if you can run
- pip
- You'll know you did it right if you can run
pip --version
and you see a response likepip x.x.x
- You'll know you did it right if you can run
- Linux and/or MacOS
- This project is not tested on Windows, so it is recommended to use a Linux or MacOS machine, or use a tool like WSL for windows users.
Follow the steps to clone the repo for you to make changes to this project.
- Clone the repo
git clone https://github.com/curvefi/titanoboa
cd titanoboa
- Setup virtual environment and install dependencies
You can learn more about activating and deactivating virtual environments here.
python -m venv venv
source venv/bin/activate
pip install -r dev-requirements.txt
Note: When you delete your terminal/shell, you will need to reactivate this virtual environment again each time. To exit this python virtual environment, type deactivate
- Create a new branch
git checkout -b <branch_name>
And start making your changes! Once you're done, you can commit your changes and push them to your forked repo.
git add .
git commit -m 'your commit message'
git push <your_forked_github>
Once you have your environment setup, you can run the tests to make sure everything is working as expected. You'll need to have your virtual environment activated to run the tests.
Run the following:
pytest tests/unitary -x
This will skip the integration tests, which need extra "stuff".
Once you have setup your virtual environment, to run integration tests, you'll need to add environment variables.
You can see the .env.unsafe.example
for environment variables you'll want to use.
MAINNET_ENDPOINT=<eth_mainnet_rpc_url>
SEPOLIA_ENDPOINT=<sepolia_rpc_url>
SEPOLIA_PKEY=<sepolia_private_key> # DO NOT USE A KEY ASSSOCIATED WITH REAL FUNDS
You can optionally copy .env.unsafe.example
and create a new file called .env.unsafe
file and run the following command to load the environment variables.
source .env.unsafe
Then, you can just run:
pytest tests/integration/ -x
Thank you for wanting to participate in titanoboa!