The Deleuze package comprises the following tools. Please feel free to use them (in any combination) to deploy your own 4-token-model, ant-fragile lending ecosystem.
Lendroid Protocol version 2.0
The smart contracts have been written in Vyper version 0.1.16 and compiled using using the Brownie Framework. Unit and functional test cases have been written using the Pytest framework.
Nodejs implementation for user interface to interact with the smart contracts.
A base template of the user interface.
Technical Documentation on how to use the Javascript library
-
Clone this repository
git clone <repo> -
cd into the cloned repo
cd protocol.2.0 -
Install dependencies via npm
npm install ganache-cli@istanbul -g -
Install Python and Vyper v0.1.0-beta.16
-
Python 3.7 is a pre-requisite, and can be installed from here
-
Install virtualenv from pip
pip install virtualenvorpip3 install virtualenv -
Create a virtual environment
virtualenv -p python3.7 --no-site-packages ~/vyper-venv -
Activate Vyper's virtual environment
source ~/vyper-venv/bin/activate -
Install dependencies from requirements.txt via pip
pip install -r requirements.txt
-
-
Activate Vyper's virtual environment
source ~/vyper-venv/bin/activate -
Compile using brownie
brownie compile -
Run the tests with coverage
brownie test --coverageNote : Version 1.5.1 of brownie requires the following patch:
- Within the virtual env, navigate to the brownie package installed in python3 site-packages.
- edit
brownie/network/transaction.pyand add atry, catcharound the linepc = last["pc_map"][trace[i]["pc"]]like this
try: pc = last["pc_map"][trace[i]["pc"]] except KeyError: continue
Note: When the development / testing session ends, deactivate the virtualenv
(vyper-venv) $ deactivate