ZombieChain is a decentralized application (dApp) based on the Ethereum blockchain. This project leverages smart contracts written in Solidity to create a unique gaming experience where players can collect, breed, and battle zombies.
ZombieChain is a web3 application that combines the excitement of zombie games with the innovation of blockchain technology. Players can engage in various activities, including collecting unique zombies, breeding new types of zombies, and battling other players' zombies. The game logic is enforced through Ethereum smart contracts, ensuring transparency and fairness.
- Collect Zombies: Acquire unique zombie NFTs with distinct attributes and traits.
- Breed Zombies: Combine zombies to create new offspring with inherited traits.
- Battle Zombies: Engage in battles with other players' zombies to earn rewards.
- Decentralized: All game logic and data are stored on the Ethereum blockchain, ensuring security and transparency.
- Smart Contracts: Core functionalities are implemented using Solidity smart contracts.
- Ethereum Blockchain: The decentralized platform powering the dApp.
- Solidity: The programming language used for writing smart contracts.
- Web3.js: A JavaScript library for interacting with the Ethereum blockchain.
- React: A JavaScript library for building the user interface.
- Truffle: A development framework for Ethereum.
- Ganache: A personal blockchain for Ethereum development.
- MetaMask: A browser extension for managing Ethereum wallets.
To set up the project locally, follow these steps:
- Clone the repository:
git clone https://github.com/your-username/zombiechain.git cd zombiechain
- Install dependencies:
npm install
- Start Ganache:
ganache-cli
- Compile and migrate smart contracts:
truffle compile truffle migrate
- Run the development server:
npm start
- Connect MetaMask: Ensure you have MetaMask installed and connected to the local Ethereum network provided by Ganache.
- Collect Zombies: Navigate to the "Collect Zombies" section to acquire new zombies.
- Breed Zombies: Go to the "Breed Zombies" section to create new zombie offspring.
- Battle Zombies: Head to the "Battle Zombies" section to engage in battles and earn rewards.
The core functionality of ZombieChain is implemented through the following smart contracts:
- ZombieFactory.sol: Handles the creation and storage of zombies.
- ZombieBreeding.sol: Manages the breeding process and generation of new zombies.
- ZombieBattle.sol: Facilitates battles between zombies.
- These contracts are located in the contracts directory and can be interacted with using Web3.js.
This project is licensed under the MIT License. See the LICENSE file for more details.