Inspiration

I took inspiration from zed.run a virtual horse race game and a tradition of my country cockfight to bring a virtual game where users can have a like experience of raise and train a nice looking rooster and compete with others.

What it does

RoosterFight is an NFT game where you can claim and train a Rooster to fight and reach the top of the tournaments.

User Story: I can connect my wallet using Metamask/Moralis.

User Story: I can claim Roosters for free.

User Story: I can join in tournaments paying a tournament fee.

User Story: I can fight with other roosters to win points and climb to the top positions.

User Story: I can win if at the end of the tournament I have more points.

How we built it

On the frontend I used:

  • Vue.js 3 as framework Framework
  • Moralis to manage auth and store some off-chain data as well as IPFS provider for the assets
  • ethers.js JS library for interacting with the Ethereum Blockchain and its ecosystem

Blockchain Environment and scripts:

  • Hardhat - Flexible, extensible and fast Ethereum development environment for professionals.
  • hardhat-deploy - Provided utilities for deployments and tasks
  • Chainlink VRF - To get random numbers to generate damage
  • Open Zepplin - and their contracts and utilities forn ERC721, String, SafeMath, Counters, Ownable and not reentrancy guard
  • hashlip nft engine - to generate arts
  • Moralis IPFS to store the NFT images

Challenges we ran into

  • I reached the Smart Contract limits so I have difficulty to deploy to the mumbai testnet i manage to reduce and remove the code that were not so important and use public vars as getters

  • VRF Coordinator locally I found a template by patrick and adapted it to my code.

Accomplishments that we're proud of

  • Pre mint logic without using a lot of contracts
  • typescript usage on backend and frontent
  • tested above 90% of the code
  • finish the project

What we learned

  • VRF Coordinator usage to generate random numbers and expand them
  • Configure deployments with hardhat-deploy
  • use hardhat with typescript
  • to use moralis auth and object DB, and its IPFS

What's next for RoosterFight

  • 3D Roosters fighting
  • Let users sell and buy roosters
  • Different tournaments

Built With

Share this project:

Updates