Skip to content

hardikgoyal/Pix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pix

ITP499 Blockchain
Fall 2018

Transaction? Buyer would request to buy a token in exchange for ether. The buyer would receive a copy of the token to use. This token would have an attribute that says it is not the original token, but a bought one.

Front End would have display all the photos, which are actually the hashed photo inside each coin.

MintableToken.sol needs to edited so that it only creates tokens when it gets an input for photo and price. It also needs to have an orignal/duplicate attribute, and it needs to make sure it only creates one per process. Also, we don't need the wes to token ratio thing. When minting the token, we need to know if it's a copy of an original or new creation.

MintableCrowdsale.sol needs to be changed to something else that handles transactions and creation of tokens.

Instructions to Run:

  1. First Run Pix token with an address
  2. Then deploy the contract, and change ownership of pix token to the address of pix contract
  3. use upload photo button to enter the address of token and the number of ether as selling price.
  4. you can confirm that you the picture is uploaded by looking at displayphotos, it will return an array of the photographs that the owner owns.
  5. now change the address of the user
  6. Using the amount shown in display photos, put the amount and the index of the photograph you want to buy
  7. Ownership of the photo can be confirmed using token's amount

Assumptions:

  • The code should not be able to handle a user uploading same photographs
  • Multiple users can also upload same photographs right now

Team: Hardik Goyal
Hyuck Ju Kim
Ping Au Lin

note: the code has been adapted from the crowdsale contract done in class

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published