/blockchain-homework

This repository is part of a homework submission of a blockchain course

Primary LanguageJavaScript

blockchain-homework

This repository is part of a homework submission of a blockchain course

How to duplicate results

  1. Make sure you have node and python installed on your machine
  2. run npm install -g solc && npm install
  3. register an account at metamask and infura.io
  4. create a .env file, see an example at .env.example
  5. replace WEB3_PROVIDER in .env with an infura generated url, e.g. https://ropsten.infura.io/v3/loremipsum
  6. replace PRIVATE_KEY in .env with your metamask private key
  7. replace HASH_SECRET in .env with any secret, e.g. TaiHasBigLegs
  8. replace studentID in p3.sol
  9. run solcjs --bin --abi p3.sol
  10. run node p2.js to finish question 2
  11. run node p3.js to finish question 3