Skip to content

Cash36 contracts - npm repository for element36 smart contracts and CHF36 and EUR36 tokens

License

Notifications You must be signed in to change notification settings

element36-io/cash36-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

invest36 Crypto-Backend

Smart Contracts

This is the decentralized backend for invest36 and contains all relevant Smart Contracts and Tests.

Build Status

Branch master:

pipeline status coverage report

Branch develop:

pipeline status coverage report

Smart Contract Development

Usage with dapp local

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'

Successfully built with node lts/dubnium (-> v10.18.1)

Install nvm - see https://github.com/nvm-sh/nvm

nvm install lts/carbon nvm use lts/carbon yarn install yarn testrpc yarn test

Migrate and new packages

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

Create local ganache docker image:

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

Network address from truffle migrate

Current network config is here

Public on github

github instructions

Start and connect via geth

Useful links

https://github.com/ConsenSys/smart-contract-best-practices

About

Cash36 contracts - npm repository for element36 smart contracts and CHF36 and EUR36 tokens

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages