Inspiration
I was inspired by the desire to see what my favorite gameshow "who wants to be a millionaire" would look like in a decentralized context and so I went ahead designing a simple use scenario.
What it does
- Users are prompted to pay ether (amount to be specified by deployer), in order to enter the draw pool.
- Using chainlink vrf and keepers, 4 successful entrants are selected and prompted to the navigate to the trivia page to play.
- After playing users have their winnings transferred through chainlink any api logic, hardcoded in the solidity contracts. ## How we built it Firstly the logic for handling selection of participants and transfer of winnings is written using solidity, the frontend is linked to the contracts using react-moralis. the trivia questions are provided using triviadb api an are rendered in the frontend using Reactjs. jsonserver, an npm library was used to handle user details(session management) and players scores. ## Challenges we ran into most of the challenges came on the frontend as things weren't always linear, hence i had to make changes to certain design considerations, like;
- Rendering the trivia questions was a bit of a challenge as the response from the api did not come as i anticipated, i had to do some maneuvering to make things work. ## Accomplishments that we're proud of
- Pushing through the challenges encountered in designing the frontend and delivering a minimal use case required commendable effort on my part, and being able to succeed with it is something i'm proud of. ## What we learned
- Engineering a computer program, be it a mobile app, web app or cli tool is never linear and the programmer has to be ready to deal with nuances and complexities that come with each project. ## What's next for ETH TRIVIA
- Providing granularity to users so they can customize the trivia(i.e. categories they are interested in, question difficulty).
- Implementing a standard API for user data handling and session management as jsonserver won't suffice in a production environment
Built With
- chainlink
- hardhat
- javascript
- react
- solidity
- triviadb
Log in or sign up for Devpost to join the conversation.