Getting started

Last updated 7 months ago

Monorepo

The repository of the protocol is a monorepo, using lerna. Familiarize yourself with lerna's main commands (bootstrap, add, publish).

Packages

The monorepo holds these packages:

  • requestNetworkSmartContracts: the smart contracts of the protocol

  • requestNetworkArtifacts: the artifacts of the smart contracts. Public npm package

  • requestNetwork.js: the javascript wrapper for the smart contracts. Public npm package

The links are:

  • requestNetwork.js depends on requestNetworkArtifacts

  • The artifacts are created using the script exportArtifacts.js of requestNetworkSmartContracts and copied to requestNetworkArtifacts

How to...

Report an problem

OK, but how to...

Run the smart contract tests

  1. npm install -g lerna

  2. lerna bootstrap

  3. npm install -g ganache-cli

  4. (from the smart contract directory) npm run ganache

  5. (from the smart contract directory) npm run test

Run the javascript library tests

  1. npm install -g lerna

  2. lerna bootstrap

  3. npm install -g ganache-cli

  4. (from the js lib directory) npm run ganache (keep open)

  5. (from the js lib directory) ipfs daemon (keep open)

  6. (from the js lib directory) npm run testdeploy

  7. (from the js lib directory) npm run test

Build

We use Travis-CI to build the projects of the monorepo: https://travis-ci.org/RequestNetwork/requestNetwork

Readings

Good readings for anyone interested in developing on the protocol: