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.
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:
dapp-smart-contract repository using git:
git clone https://github.com/Privatix/dapp-smart-contract.git cd dapp-smart-contract git checkout master
Install truffle v 4.1.13:
npm install firstname.lastname@example.org -g
Running the tests
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.
rinkeby script to deploy contract to the testnet:
npm run rinkeby
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:
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
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
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.