Buy and Sell cocktail ingredients to craft your own Cocktail Creations!
This NFT dapp allows you to buy and sell both the ingredients and the end results of a cocktail. The premise is that you buy what ingredients you have in your home, or you want to use, and then you can exchange the base ingredients needed for a cocktail, for a bigger more impressive cocktail NFT. The cocktail NFT will come with some instructions on how to make that cocktail as well. The marketplace lets you buy whatever ingredients you want, and then you can see what cocktails potentially could be made out of them and you choose your favorite. In the future, we were looking to be able to have games that sell random ingredients, so you could get a deal on a random box, or win a prize and get some ingredients as a reward. You can also sell your fully formed cocktail NFT to whoever you want.
How it's made
Our project uses a React front end in combination with the Moralis API to interact with our two smart contracts that we wrote in solidity. We also hosted our images on IPFS. Our project consists of an IngredientNFTMarketplace contract and a CocktailNFT contract. The IngredientNFTMarketplace handles the minting of the "building block" ingredient ERC721 tokens, the selling of these ingredientNFTs, as well as creating a cocktailNFT by calling the mint function in the CocktailNFT contract(ingredient NFTs used in the cocktail get burned/marked as used so cannot be used again). We used Moralis API to call our contract functions from the Front End which was really cool, as well as keep track of the Ingredient NFTs events being emitted. I was impressed that we were able to put together what we did with what little time we had. Our implementation turned out a little clunky in the frontend, but our smart contracts have most of the functionality needed to fully nail our project idea.