Commit 819c13ce authored by Quentin Bramas's avatar Quentin Bramas

readme

parent aa23a8b7
......@@ -46,3 +46,40 @@ cd tutorial-sss
npm install
npm install -g solc@0.4.26
```
## Execution
#### init and start the blockchain
```
sh init_node.sh
sh start_node.sh
```
then in the geth console
```
miner.start(1)
```
#### install nodejs packages
```
npm install
```
#### deploy the contract
```
node cli.js .accountSSS createContract
```
then update the contract address in `common/command.js`
#### interact with the contract
either using the cli:
```
node cli.js .accountA1 addPaper 0x5353531074558f4B7fCf0d52Fc3b11be1f07b6c1 "$(cat paper1.json)"
```
or the website:
```
npm start
```
plan:
node index.js .accountJ createContract
node cli.js .accountSSS createContract
# update contract address
node index.js .accountJ addPaper 0xD70536239C9617b4A645E6a5be966b508b3b9e22 "$(cat paper1.json)"
node index.js .accountReviewer1 signPaper "$(cat paper1.json)"
node index.js .accountJ addReviewer 0 0xe2f8acbce3f33d47a8013bd897c3f0df6b2ff455651a7d56c868d2c4b96a7c8b07b3016d92efc9e66e5d79a1ea5eb04a6d011f9202b2922c1466e6c5eead64911c
node index.js .accountReader journalPaper 0xD70536239C9617b4A645E6a5be966b508b3b9e22 0
node index.js .accountJ payReviewers 0xa39d9C075001647fc5E8C2c4c149167F2d733158 0x90D51d9Da0Bb0E9F0bDFCbbA00e6Ab73866D8FC7
node cli.js .accountSSS addPaper 0x5353531074558f4B7fCf0d52Fc3b11be1f07b6c1 "$(cat paper1.json)"
node cli.js .accountRV1 signPaper "$(cat paper1.json)"
node cli.js .accountSSS addReviewer 0 0xe2f8acbce3f33d47a8013bd897c3f0df6b2ff455651a7d56c868d2c4b96a7c8b07b3016d92efc9e66e5d79a1ea5eb04a6d011f9202b2922c1466e6c5eead64911c
node index.js .accountA3 journalPaper 0x5353531074558f4B7fCf0d52Fc3b11be1f07b6c1 0
node index.js .accountSSS payReviewers 0xa39d9C075001647fc5E8C2c4c149167F2d733158 0x90D51d9Da0Bb0E9F0bDFCbbA00e6Ab73866D8FC7
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment