polymath-apps
polymath-apps copied to clipboard
Monorepo containing Polymath's Apps
Polymath Apps
This is a monorepo containing the webapps and libraries in Polymath. In each package you will find a Readme that describes it.
Apps and packages
Setup
In the root of the repository run:
yarn install
Installing MongoDB
You will need to run MongoDB in your machine to run the dApps locally
Windows
Follow this guide to install mongodb on windows
MacOS
You can install mongodb with Homebrew
brew update
brew install mongodb
Mongodb uses /data/db as its data folder. If you don't have it you must create
it
sudo mkdir -p /data/db
Finally, to start mongodb run:
brew services restart mongodb
Running an app
Start the local blockchain emulator
yarn local-blockchain:start
You may want to retrieve a MetaMask account with ETH prepopulated. Look for the Private Keys section in the local blockchain logs from the previous command. You can then pick up any private key and import a new MetaMask account with it.
Once the process finishes, run:
yarn start:<app> (for example yarn start:issuer)
Testing
Unit tests
To run unit tests for all apps in parallel (for CI for example) run in root:
yarn test
To run unit tests for a specific app run:
yarn test:<app> (for example yarn test:ui)
To generate coverage files add run yarn test --coverage
You can set the junit report directory with the env variable JEST_JUNIT_OUTPUT_DIR
E2E Tests
To also enable test coverage reports for E2E tests set COVERAGE=true in
your environment
Instructions pending
How to contribute
Please read our contribution guidelines
Deployments
- Any merge to
masterautomatically deploys to Production - Any merge to
developautomatically deploys to Staging - Any merge to
release/*(i.e.release/2.1.1) automatically deploys to Beta
Environments
Production
What the final user sees, this is tokenstudio.polymath.network
Staging
Production-like environment, this runs code that has not yet made its way into the master branch.
Beta
This environment runs the code that is stable enough for an upcoming release. This is betastudio.polymath.network
Upgrading Smart Contracts
To upgrade the repository to a newer version of the smart contracts you must do the following:
- Upgrade the
polymath-coreversion in @polymathnetwork/shared - Run
local-blockchain:generate-fixturesinsidepackages/polymath-shared - Commit new fixtures