- Developing a Dapp using
Truffle-Solidity
, withReact-Typescript-ChakraUI
frontend. - Inspired from
Cryptozombies , Cryptokitties
. cleaned
Deployed at - https://hero-world-web3.netlify.app/
- A Fantast World where all species coexist and with no Evil.
- You can Own Heroes, Battle with Other Heroes, Trade Heroes.
- Summon heroes using Summoning Cards
- Buy summoning cards , Level up your heroes.
$ git clone https://github.com/Rohitkk432/Hero-World-with-no-Villian.git
$ cd Hero-World-with-no-Villian
Backend is in Solidity - Truffle
$ cd backend
# install dependancies/packages.
$ npm install
## testing with truffle test scripts (can find in test folder).
@notice- comment out development & Sepolia inside network in "truffle-config.js"
@notice- remove the x which ignores the tests. (xit => it) (xcontext => context)
$ truffle test
## testing using ganache
$ npm install -g ganache-cli
(in one terminal)
$ ganache-cli
(in 2nd terminal)
$ truffle migrate
## deploying with your own account
@notice- add your mnemonic and infura access token
$ truffle migrate --network Sepolia
Frontend is in React - Typescript - ChakraUi
$ cd frontend
@notice if you want to change contract address change it in "./src/contracts/functions.ts"
## running frontend locally
$ npm run start
- As a learning opportunity most of the code is taken from cryptozombies and built on it
- When one opens the website they must need metamask install
- Then one can connect to Sepolia network and click on
Connect
on landing page. - And create the first hero.
- The hero model consists of dna - which break downs to an ADJECTIVE and GREEK-NAME on frontend, species and rarity which maps to its value on frontend.
- In Arena can fight with other heroes on the game network but hero also has a cooldown period after each fight.
- If you win a fight you get a "summoning card" as a reward.
- After summoning card reaches its readyTime you can use it to summon a new hero on your team.
- You can also see all the heroes from
All Heroes
tab. - You can transfer/approve heroes to other players using their address, and also tak eownership of other's heroes if you are approved by them.
- you can also pay ether to "level up" a hero , and buy summoning cards
Made with ☕ and ❤️ by Rohit