Smart contracts used by MedX Protocol.
OpenCare dApp readme is location here
$ npm install
Prior to running the ganache-cli server, you will need to set up your environment variables:
-
cp .envrc.example .envrc
-
Enter your own twelve random words in the .envrc. Do not use the words in the example file, if you do that there will be collisions with encryption data.
-
Also, we'll leverage Infura's Ethereum Ropsten testnet node, so make sure to set up an account and paste your private key in your .envrc.
-
Use
direnv allow
to export the env vars into your current terminal shell.
To run the truffle tests:
$ npm run test
$ npm run ganache
Install the npm packages in the lambda
dir:
$ cd lambda
$ npm i
$ cd ..
Then compile the functions and run the server with:
$ npm run lambda
(boots up lambda compute endpoints)
Install the npm packages in the dapp
dir:
$ cd dapp
$ npm i
$ cd ..
$ npm run dapp
Addresses for mainnet and test nets are stored in networks/ and merged using the truffle-deploy-registry
command apply-registry build/contracts
. There is an npm script for compilation you can run that combines truffle compile
with the merge command:
$ npm run compile
To deploy/migrate the contracts:
$ truffle migrate