Transition to Web3 - Course 3 | How Smart Contracts Work
Function: buyBook When someone sends me money:
1. If the money is equal or above the price of the book ($10)
i. Send the writer $10
ii. Get the sender's account address
iii. Send that sender's address the digital copy of the book
Contract storage
bookBuyers = [Alice]
booksSent=1
Comments
You need to enroll in the course to be able to comment!