Skip to content

DCORP-BV/tokens

Repository files navigation

CircleCI JavaScript Style Guide

Latest Coverage Report. Note: this links to the latest report for the master branch, which is not necessarily associated with the current branch.

Welcome to the DCORP Tokens and Token-changer repository

This VC platform token changer will allow anyone with a current balance of DRP, to deposit it and in return receive DRPU, or DRPS.

DRPU as indicated by its ‘U’ designation is Dcorp’s utility token for those who are under strict compliance within their country of residence, and does not entitle holders to profit sharing.

DRPS as indicated by its ‘S’ designation, maintaining the primary security functions of the DRP token as outlined within the Dcorp whitepaper. Those who bear DRPS will be entitled to profit sharing in the form of dividends as per a voting process, and is considered the "Security" token of Dcorp.

Also see this article

Preparing development environment

  1. git clone this repository.
  2. Install Docker. This is needed to run the Test RCP client in an isolated environment.
  3. Install Node Package Manager (NPM). See installation instructions
  4. Install the Solidity Compiler (solc). See installation instructions.
  5. Run npm install to install project dependencies from package.json.

Dependency Management

NPM dependencies are defined in package.json. This makes it easy for all developers to use the same versions of dependencies, instead of relying on globally installed dependencies using npm install -g.

To add a new dependency, execute npm install --save-dev [package_name]. This adds a new entry to package.json. Make sure you commit this change.

Code Style

Solidity

We strive to adhere to the Solidity Style Guide as much as possible. The Solium linter has been added to check code against this Style Guide. The linter is run automatically by Continuous Integration.

Javascript

For plain Javascript files (e.g. tests), the Javascript Standard Style is used. There are several plugins available for widely-used editors. These also support automatic fixing. This linter is run automatically by Continuous Integration.

Run tests, linter, etc.

  • Linter: run npm run linter. See Section Code Style.
  • Test Linter: run npm run test-linter. This runs the standard linter on all files in the test directory. See Section Code Style.
  • Test Linter Fix: run npm run test-linter-autofix. This will run the standard linter in --fix mode. Many, but not all, errors can be fixed automatically.
  • Tests: To run tests in the test directory, follow these steps:
    • Run npm testrpc_boot once. This starts an Ethereum client for testing. See testrpc for more information.
    • Run npm test to run the tests as often as you need.
  • Code Coverage: npm run coverage. This runs solidity-coverage. You need to stop all instances of testrpc first. Coverage report will be generated in /coverage. The coverage report for the latest build is also accessible through the link at the top of this page.

Continuous Integration

This repository has been set up for Continuous Integration. This means that tests, linters, code coverage, etc. are automatically executed after every commit. CircleCI has been setup to serve as a CI server for this project.

Releases

No releases published

Packages

No packages published