Skip to content

Instantly share code, notes, and snippets.

@jonathunne
Created April 17, 2020 02:59
Show Gist options
  • Select an option

  • Save jonathunne/7e134bf79ac758cb109a86c407ef551d to your computer and use it in GitHub Desktop.

Select an option

Save jonathunne/7e134bf79ac758cb109a86c407ef551d to your computer and use it in GitHub Desktop.
## Milestone 1:
There are two main steps in this milestone:
- Connect to or set up an IPFS node
- HTML and JS to upload a file to IPFS and download it
In order to do this you will need to create:
1. JavaScript that implements functions to
- upload a file to IPFS,
- retrieve files from IPFS.
2. a webpage that
- takes an IPFS hash and displays the corresponding file.
- has an upload form that allows uploading a file to IPFS using `JSIPFS`.
## Milestone 2:
Steps:
- Complete artifacts from milestone 1
- Smart contract to hold IPFS hashes, strings and addresses for uploads
By the end, students should have:
(a) an `Ethergram` smart contract which
- contains a mapping of user `address`es to IPFS hashes in the form of a bytes32 array,
- implements the provided `EthergramInterface` to store and retrieve file hashes for multiple users.
(b) a test suite for all SC functions.
## Milestone 3:
Steps:
- Complete artifacts from milestone 2
- Implement a web page to display users' pictures, with web3 event listener to update the website upon new upload
By the end, students should have:
(a) a webpage that
- displays images that were uploaded and store in the SC, separated by user
- has an upload form that allows uploading a file to IPFS using `JSIPFS` and adding the hash to the SC.
- implements an event listener so that new uploads are automatically displayed.
## Milestone 4:
Steps:
- Complete artifacts from milestone 3
- Update dapp to include comment and like functionality. Argue for and against architecture including distributed storage.
- Discuss the security and privacy of your dapp design. Suggest improvements.
By the end, students should have:
(a) a smart contract that implements the extended `EthergramInterface`, which extends the `Ethergram` by functions to add
- comments and
- "likes"
to images.
(b) tests for the new functions,
(c) a webpage that extends the previous web page to also show
- comments and
- likes for each picture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment