The project used python >= 3.8
In a virtual env install the project requirements
$ pip install -e .
Create a .env
file using .env.sample
and fill up the lsi of environment variables.
The project uses postgres and redis. The env vars for these can be found in the .env.sample
file.
To run db migration:
$ alembic upgrade head
To compile the contracts run:
$ brownie compile
The project uses celery to run tasks asynchronously and celery-beat for scheduling tasks.
To run the celery worker:
$ celery -A bot beat -l info
To deploy the liquidation contract:
brownie run deploy.py --network kovan
To run the celery scheduler
$ celery -A bot beat -l info
The project has been built using foundry. To install foundry:
$ curl -L https://foundry.paradigm.xyz | bash
$ foundryup
Install forge std library
$ forge install foundry-rs/forge-std
Install openzeppelin
$ forge install openzeppelin/openzeppelin-contracts
Install python test rqeuirements
$ pip install -e ".[dev]"
To run smart contract tests
$ forge test --fork-url YOUR_Kovan_RPC_URL
To run python tests
$ brownie test