Package | Description |
---|---|
ĐApp |
RigoBlock Decentralized App v2 (currently frozen) |
API |
TypeScript API to interact with our smart contracts |
Contracts |
RigoBlock solidity smart contracts & tests |
Deployer |
Tool for smart contracts compilation and deployment |
Ganache Bootstrap |
Bootstrapping package to deploy smart contracts and seed Ganache |
Exchange Connector |
API to interact with token exchanges |
Stats |
RigoBlock pools statistics collection |
Data Collector |
Ethereum tokens data collection system |
Ubuntu pre-requisites:
apt-get install build-essential libusb libudev-dev
apt-get install build-essential libusb-1.0-0-dev libudev-dev
Install nvm and use the correct node version
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.1/install.sh | bash
nvm use
If you are having issues following this step check out nvm's documentation
Install yarn
npm i -g yarn
Install lerna using yarn and the frozen lockfile option, so as not to accidentally update packages and break the build
yarn --frozen-lockfile
Bootstrap all packages and install all their dependencies
yarn bootstrap
Build all packages in order. Ganache needs to be launched first as it is required for our contracts to be compiled. Optionally you can open the Ganache client instead of using the CLI.
npx lerna run --loglevel silent --scope @rgbk/dapp ganache &> /dev/null &
yarn build
kill %1
Lint all packages
yarn lint
To publish the packages in the monorepo to NPM you need to create a new branch and let lerna do the job.
:warning: Make sure to start from a clean-state ganache when publishing! Otherwise staging won't be able to connect to the smart contracts deployed on ganache
git checkout master
git checkout -b feature/publish-# # Use an incremental number
git push -u origin feature/publish-#
yarn build
npx lerna publish
Lerna will ask you for new versions and:
package@version
So at the end you'll need to create a PR with your feature/publish-#
branch and merge it to master in order to tag properly the main branch.