Transitive Network Implementation
DISCLAIMER: THE CODE IN THIS REPOSITORY IS A RESEARCH PROTOTYPE. PLEASE DO NOT USE IT IN PRODUCTION.
This repository contains Ethereum smart contract code that is used in the Transitive Network. The following sections provide information on how to setup the development environment for the code. For more information about the contract code, please refer this document.
curl is installed in your system.
Download the repository here and extract it:
$ curl https://github.com/pedrorechez/transitivenetwork/archive/v0.0.1.zip $ unzip master.zip [directory_name]
Clone the repository:
$ git clone https://github.com/pedrorechez/transitivenetwork/archive/v0.0.1.zip
- NodeJS (v10.10.0)
Debian and it’s derivatives can install NodeJS by running:
$ sudo apt-get update $ sudo apt-get install nodejs npm
Arch Linux users can install NodeJS by running:
$ sudo pacman -S nodejs npm
After installing NodeJS, install the node modules in the project root folder using the Node Package Manager (npm):
$ npm install truffle $ npm install ganache-cli
ganache-cli in the project root folder.
This should instantiate a test ethereum network.
Note the address where the test network is hosted, for
If the port used is not 8545 which is the default port, use
the port displayed and edit the port value in
The contracts are located in
cd into truffle root directory at
$ # Compiles all the contracts in contracts/ $ truffle compile
$ truffle test test/TEST_SUITE.js # See the test/ folder for different test suites
Alternatively, you can use the console provided by truffle to compile, deploy and test contracts:
$ truffle console truffle(development)> compile --compile-all truffle(development)> compile truffle(development)> migrate --migrate-reset truffle(development)> migrate truffle(development)> test test/TEST_SUITE.js truffle(development)> exit $ # These are example commands. The order has no special meaning.
Warning: When testing/building the smart contract, always ensure that the test network is up and running.
For more information on
If there are any bugs or questions, please raise an issue in the repository.