This is the decentralized backend for invest36 and contains all relevant Smart Contracts and Tests.
Needs yarn to be installed globaly. see https://yarnpkg.com/lang/en/docs/install/
- Clone repo
- Checkout Branch develop
- run 'yarn'
- run 'yarn testrpc'
Add MNENOMIC environment variable for HD Wallet.
- run 'yarn deploy:testrpc'
This starts a local testrpc client and deploys the contracts.
Start with exising blockchain data
- run 'yarn testrpcdata'
Install nvm - see https://github.com/nvm-sh/nvm
nvm install lts/carbon nvm use lts/carbon yarn install yarn testrpc yarn test
With Metamask (chrome)- go to Settings/Security/Reveal pass phrase words and set MNENOMIC to the passphase: export MNENOMIC="blat"
yarn deploy:kovan yarn deploy:rinkeby yarn deploy:main
Update the local ganche-docker blockchain:
sudo docker ps export contid="your Container ID" sudo docker exec -it $contid ls sudo docker exec -it $contid tar -zcvf data.tar.gz ./data/ sudo docker cp $contid:/app/data.tar.gz /home/w/workspace/contracts/
w@x1:/workspace/contracts/data$ mv data data_old
w@x1:/workspace/contracts/data$ tar -xvzf data.tar.gz
mv ./data ./data-sik; mkdir ./data; yarn testrpcdata & yarn deploy:local
sudo docker login registry.gitlab.com/cash36/contracts sudo docker build -t registry.gitlab.com/cash36/contracts:latest . sudo docker push registry.gitlab.com/cash36/contracts:latest
yarn networks > networks.md
Check in contrats and merge master which creates a new tag in gitlab and deployment of the package on github
Add new version to package.json:
- cash36-admin-frontend
- cash36-frontend
- cash36-compliance
- cash36-exchange
And rebuild dependencies and stubs (eventually set NPM_TOKEN=...2bb)
( cd cash36-admin-frontend; git pull; nvm use lts/dubnium; yarn; ) ( cd cash36-frontend; git pull; nvm use lts/dubnium; yarn; ) ( cd cash36-exchange; git pull; nvm use lts/dubnium; gradle build; gradle genToken36Controller genCash36Exchange ;gradle test ) ( cd cash36-compliance; git pull; nvm use lts/dubnium; gradle build; gradle genCash36Compliance genCash36Company; gradle test )
Push & merge to master to create new docker images, test local installation with cd cash36-docker docker-compose up