This project use solc (Solidity compiler) and truffle framework.
To install them execute:
$ npm install -g solc truffle
Project also required connection to rsk blockchain. For development it is possible to use testrpc:
$ npm install -g ganache-cli
-
After that go to the project root directory and install dependencies:
$ npm install
-
Copy
truffle.js.example
totruffle.js
-
Copy
src/data/config.json.dist
tosrc/data/config.json
-
Compile and deploy contracts:
$ truffle compile $ truffle --network test migrate
-
Launch server:
$ npm run start
After that open localhost:3000
in a browser
It is necessary to use metamask browser extension to work with a wallet. It is possible to use original metamask, but there are few problems with it:
- Invalid currency name. Should be SBTC
- Invalid exchange rate
This problems solved in our fork of the original metamask.
We are using elastic search to store some information in it. It is necessary to install babel cli before. Then execute this command to launch this script:
$ ./node_modules/babel-cli/bin/babel-node.js scripts/app.js
This script will handle blockchain events and save them in elastic search
$ truffle --network test test
$ npm run test
To create html
and js
files execute:
$ npm run build
After that files will be in the ./build_webpack
folder.