Inspiration

Blending art and technology has always been a profound and facinating concept to me. This is a fun was to engage with others online socially, by recommend great books and knowledge resources in a decentralized fashion!

What it does

Users add their favorite book titles to the Ethereum blockchain for the chance to win Ether! A user connects their Metamask wallet, adds a book to the website, and signs the transaction which is published to the blockchain! The sender has a 50/50 chance of earning 0.0001 ETH for their recommendation, which is handled by Chainlink VRF. All messages written to the contract are updated to the front-end UI in real-time, including the sender's address, timestamp, and book title!

How I built it

This was built with sweat, Solidity, Hardhat, React, Javascript, and Chainlink's VRFV2WrapperConsumerBase.sol contract, and GitHub pages.

Challenges I ran into

Swapping out a simple hand-coded RNG for the Chainllink VRF engine, and making sure account balances truly reflected the outcome of contract interactions took the longest time troubleshoot. Migrating the front-end from Replit to GitHub Pages brought its own set of compatibility/rendering challenges. Both of which, ultimately, were no match.

Accomplishments that I'm proud of

Successful shipment of a functioning dApp that utilizes a provably fair and verifiable random number generator (RNG), at a live website! Deeper understanding of Chainlink services overall.

What I learned

Best laid plans often go astray. Finding workarounds that work just as well when the first design in mind doesn't seem to come to fruition! Ethereum StackExchange, Discord, and other online resources proved to be very helpful!

What's next for BookShelf

The ability to tip those users that you found to have added books to the library that one found to be exceptionally good! More of a cozy social platform UI, with the ability to interact with other users (addresses), and post notes along with their favorite books (i.e. favorite takeaways...etc.).

Built With

Share this project:

Updates