Trustlines Smart Contract Platform
This documentation explains how to deploy Trustlines smart contracts, for creating your own currency network and trustlines exchange. The exchange functionality is not fully supported at this point. The current documentation is written for an Ubuntu Linux system.
#
Prerequisites- Python 3.6 or up and dev dependencies
- pip
- git
Run
One of the dependencies used is the secp256k1 library. If you're using python 3.5 on linux you can skip the following step, since pypi contains binary packages for secp256k1. If not, you'll have to run the following to install the secp256k1 C library:
#
Deployment toolsThis section runs through the tooling necessary for deploying the contracts.
#
Ethereum clientTo deploy the Trustlines smart contracts, you need access to an ethereum client, e.g. geth or parity, which is synced to the chain you want to use. The client needs to expose the JSON RPC endpoint. Additionally you need an account with enough ether to pay for the contract deployment.
#
Deployment setupPlease run pip install trustlines-contracts-deploy
to install the tl-deploy
tool from PyPI. Solidity itself isn't needed anymore.
#
tl-deployThe tool tl-deploy
allows you to deploy the relevant contracts.
Use tl-deploy --help
to find out about the relevant commands or read
further in the deploy documentation.
#
DevelopmentTo start developing install the development dependencies into a venv
with pip install -c constraints.txt -r requirements.txt
Download and install the solidity compiler solc into bin for compiling the contracts
#
CompilingThe contracts can be compiled with make compile
. This will create a
file contracts.json
with all the compiled contracts.
#
TestingFor testing we use pytest with an ethereum tester plugin. The tests can
be run with pytest
. Please not that this will recompile all contracts
automatically, there's no need to call make compile
manually.
#
InstallationPlease run make install
to install the trustlines-contracts-bin and
trustlines-contracts-deploy tool from the git checkout.
#
Change logSee CHANGELOG.