Skip to main content

This documentation explains how to deploy Trustlines smart contracts, for creating your own currency network and trustlines exchange. The current documentation is written for an Ubuntu Linux system.

Prerequisites

  • Python 3.6 or up and dev dependencies

  • pip

  • git

Run apt install build-essential python3-dev python3-virtualenv virtualenv pkg-config libssl-dev automake autoconf libtool git

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:

git clone https://github.com/bitcoin-core/secp256k1.git
cd secp256k1
./autogen.sh
./configure --enable-module-recovery
make
sudo make install
sudo ldconfig

Deployment tools

This section runs through the tooling necessary for deploying the contracts.

Ethereum client

To deploy the Trustlines smart contracts, you need 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 unlocked account with enough ether to pay for the contract deployment.

Deployment setup

  • Download and install the solidity compiler solc into bin for compiling the contracts curl -L -o $HOME/bin/solc https://github.com/ethereum/solidity/releases/download/v0.4.21/solc-static-linux && chmod +x $HOME/bin/solc

  • Clone this repository with git clone https://github.com/trustlines-network/contracts.git cd contracts

  • Install the deploy tool with pip install . -c constraints.txt

tl-deploy

The 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

Development

To start developing install the development dependencies into a venv with pip install -c constraints.txt -r requirements.txt

Compiling

The contracts can be compiled with populus compile

Testing

For testing we use pytest with an ethereum tester plugin. The tests can be run with python -m pytest tests

Change log

See CHANGELOG.

Release files for trustlines-contracts 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trustlines-contracts 0.1.3
File Size Uploaded
trustlines-contracts-0.1.3.tar.gz 50.8 kB Details

Release files / trustlines-contracts-0.1.3.tar.gz

Download URL trustlines-contracts-0.1.3.tar.gz
Size 50.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8b6efc717a5f90a308f26e4dd341d317f12d2cfc28826e6c43ef9aa33cc855bf
BLAKE2b-256 checksum
How to use checksums
df632d52296c8ff0b79d643e7d88bc61bc01fa00c5d7b3dd87c7f98affaa2c19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.3

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

0.1.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page