https://github.com/bumi/truffle-exercise-starshop
https://github.com/bumi/truffle-exercise-starshop
Last synced: about 15 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/bumi/truffle-exercise-starshop
- Owner: bumi
- Created: 2018-03-07T23:09:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-08T08:27:41.000Z (over 8 years ago)
- Last Synced: 2025-03-21T22:03:12.635Z (about 1 year ago)
- Language: JavaScript
- Size: 381 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.mdown
Awesome Lists containing this project
README
## StarShopPremium dApp
You can use `python2 -m SimpleHTTPServer 8000` (`python -m http.server 8000` with python 3) to serve the app on `http://localhost:8000`
### ToDos:
#### Create a truffle migration for the StarShopPremium contract
* Use the truffle create command to create the migration file
* http://truffleframework.com/docs/getting_started/migrations
#### Write a JavaScript test for the StarShopPremium contract
* Use the truffle create command to create the test file
* Write a test that checks the owner of the contract
* Write a test that a payment with the correct amount is accepted
* http://truffleframework.com/docs/getting_started/javascript-tests
* https://mochajs.org/
* http://chaijs.com/
#### Write a UI for the Shop
* Have a look at the template in ./app:
- index.html: the template containing placeholders for data that needs to be loaded from Ethereum
- app.js: JS to interact with the smart contract through web3.js
* Fill the missing parts in the ./app/app.js
* web3js documentation: http://web3js.readthedocs.io/en/1.0/