Skip to content
Privatix Service Contract (PSC)
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github add CODEOWNERS Nov 26, 2018
contracts remove legacy Mar 29, 2019
migrations remove legacy Mar 29, 2019
targets typo Oct 11, 2018
test balance&deposit are uint64 Mar 27, 2019
.codeclimate.yml decrease method lines count Apr 3, 2018
.gitignore add *.iml Jun 29, 2018
.travis.yml add contributing,md Mar 7, 2018 add PR rule Mar 10, 2018
LICENSE.txt Hotfix/at bv 98 (#5) Mar 6, 2018
package.json security audit Apr 29, 2019
truffle-config.js remove legacy May 14, 2018
truffle.js fix getChannelInfo Mar 12, 2019

Build Status FOSSA Status Maintainability

Smart contracts

Ethereum smart contracts used during offering discovery and payment processing:

  • Privatix token contract (PTC) - holds all PRIX tokens, compliant with ERC20 standard.
  • Privatix service contract (PSC) - state channels and offering announcement

Privatix Service Contract (PSC)

PSC contract implements state channels features, service offering discovery, helps to negotiate on service setup, incentivize fair usage and controls supply visibility.


Smart contracts

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.


Install prerequisite software:

Installation steps

Clone the dapp-smart-contract repository using git:

git clone
cd dapp-smart-contract
git checkout master

Install dependencies:

npm install

Install truffle v 4.1.13:

npm install truffle@4.1.13 -g


Running the tests

Install ganache-cli:

npm install -g ganache-cli

Tests are run using the following command:

TARGET=test npm run test

Available targets you can see in targets directory. Setting the environment variable may differ on your system.


Please, use rinkeby script to deploy contract to the testnet:

npm run rinkeby


  • TARGET=<target>, where <target> is dev or stage:
    TARGET=dev npm run rinkeby
  • MNEMONIC="<mnemonic phrase>", where <mnemonic phrase> is 12 word mnemonic which addresses are created from.

After deploying, abi files are saved to current directory (root of project).

It's necessary to point out which configuration you want to use. Available configurations are:

  • dev
  • stage

You can see them in targets directory. Of course, you can add your own configuration.

if you already have Sale contract deployed you can specify it in the configuration (saleAddress property). In that case deployed contract will be used instead of deploying new one.

Before deploying make sure you have enough funds on wallet (1 eth will be enough).

You can request ethers for free here:

Example of deploy

  • Dev:
  • Stage:


Please read for details on our code of conduct, and the process for submitting pull requests to us.


We use SemVer for versioning. For the versions available, see the tags on this repository.


See also the list of contributors who participated in this project.


This project is licensed under the MIT License - see the LICENSE file for details.

You can’t perform that action at this time.