JarethRader / CryptoLib

Updated repository for CryptoLib
0 stars 0 forks source link

Create Checkout and return methods in Smart Contract #13

Open JarethRader opened 4 years ago

JarethRader commented 4 years ago

Right now there are transfer/transferFrom and an approve functions on the smart contract. The former will transfer ownership of a book/token to another user account, and the approve function will grant them an approved status for that specific book/token. Currently, the transfer/transferFrom functions are being used.

We need to create a checkout function that will take in the user address and the bookID, then run both the transfer and approve functions on the smart contract side. I plan on utilizing the approved characteristic in the future.

We will also need a return method that will transfer both ownership and approval back to the chief address.