Inspiration
The biggest inspiration for this game was the early 90s Amiga 500 game I used to play, "A Rockstar Ate My Hamster". In that game, players were able to create new bands out of parody rip-offs of real artists. I took this idea and reimagined it in a web3 world taking in elements of Fantasy Football.
What it does
A Rockstar Ate My NFT allows users to create NFTs that consist of 2 real music acts in real life. A snapshot is made using Chainlink at the time of minting which encodes the number of followers they have combined. The owner is then able to "disband" the group at a later point and is paid "royalties" using an ERC20 token to the amount of the increase in followers.
How we built it
We used the new Nextjs app router and the NES.css styling framework to style the UI. WAGMI and Rainbow kit were used to connect up web3. The smart contracts were developed in Hardhat and the whole monorepo is managed using Turborepo. The Spotify API is used to keep track of the real-life music data, and Chainlink functions connect this to the contracts which are deployed on Polygon Testnet. When a supergroup is formed, a call is made to a Chainlink function which gets data from the Spotify API. When a supergroup is disbanded, the same Chainlink function is used to get the final data. The difference between start and end is compared, and users are minted tokens, and their NFT is burnt.
Challenges we ran into
The connection to Chainlink was the biggest challenge we faced, and we had to start fresh and upskill in the new Chainlink functions framework. We decided to pass in short-lived access tokens from our server for the Spotify API as opposed to securely passing in our Spotify API key.
Accomplishments that we're proud of
We're extremely proud of the aesthetic of the game. The way the Spotify images were made to look like pixel art. The ease of actions. The simplicity. The speed at which we were able to bring it all together, both on the on-chain and web components.
What we learned
As with any project we learned a lot in every framework and tool we used, and the way they work (or don't work) together. Most of all a whole heap was learned about Chainlink Functions. The subscription service was a lot easier to use than we had dealt with Chainlink before.
What's Next for A Rockstar Ate My NFT
We want to add a much better way to view all the supergroups and see which are performing well. We also want to add better error handling and UX flows. Having dynamic metadata for the NFTs would be great to make them better as standalone assets. We will also be adding a mechanism to add MATIC to a MATIC/RLTS (in-game royalties) LP pool so that the royalties you earn can be traded back for money.
Built With
- chainlink
- hardhat
- nextjs
- polygon
- rainbow-kit
- solidity
- tailwind
- turborepo
- typescript
- wagmi
Log in or sign up for Devpost to join the conversation.