{"id":26582948,"url":"https://github.com/capybara003/web3-battle-game","last_synced_at":"2025-03-23T08:19:09.373Z","repository":{"id":281957476,"uuid":"946984609","full_name":"Capybara003/Web3-battle-game","owner":"Capybara003","description":"Avax Gods is a Web3 multiplayer NFT card game built on the Avalanche blockchain, where players battle using unique NFT cards in a decentralized gaming experience. 🚀🃏","archived":false,"fork":false,"pushed_at":"2025-03-12T02:34:53.000Z","size":16134,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T03:28:59.725Z","etag":null,"topics":["avalanche","avax","battleship-game","blockchain","casino","dapp","game","nft","nftcard","wallet","web3"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Capybara003.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-12T01:22:54.000Z","updated_at":"2025-03-12T02:49:44.000Z","dependencies_parsed_at":"2025-03-12T03:39:14.471Z","dependency_job_id":null,"html_url":"https://github.com/Capybara003/Web3-battle-game","commit_stats":null,"previous_names":["capybara003/web3-battle-game"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capybara003%2FWeb3-battle-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capybara003%2FWeb3-battle-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capybara003%2FWeb3-battle-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capybara003%2FWeb3-battle-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Capybara003","download_url":"https://codeload.github.com/Capybara003/Web3-battle-game/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245072888,"owners_count":20556456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avalanche","avax","battleship-game","blockchain","casino","dapp","game","nft","nftcard","wallet","web3"],"created_at":"2025-03-23T08:19:08.617Z","updated_at":"2025-03-23T08:19:09.360Z","avatar_url":"https://github.com/Capybara003.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **🔥 Avax Gods - Online Multiplayer Web3 NFT Card Game**  \n![Gameplay](https://i.ibb.co/4P2C08x/image.png)  \n\nWelcome to **Avax Gods**, an immersive **Web3-powered multiplayer NFT card game** built on the **Avalanche blockchain**! 🃏⚡ This game lets players battle in a **decentralized** environment, trade unique NFT cards, and experience the power of smart contracts in gaming.  \n\n## **🚀 Ready to build and play? Let’s dive in!**  \n\n---\n\n## **🛠️ Setting Up the Web3 Environment**  \n\nTo deploy and interact with the smart contract, follow these steps carefully:  \n\n### **📌 Step 1: Navigate to the Web3 Directory**  \nMove into the Web3 folder where the smart contract and blockchain logic are stored:  \n```sh\ncd web3\n```\n\n### **📌 Step 2: Initialize Hardhat**  \nSet up **Hardhat**, the Ethereum development environment, by running:  \n```sh\nnpx hardhat\n```\n- Select **TypeScript** when prompted (`y → typescript → enter → enter`).  \n- This sets up a project with TypeScript support for better security and development experience.  \n\n### **📌 Step 3: Install Dependencies**  \nYou'll need several dependencies to work with smart contracts and blockchain interactions:  \n\n🔹 **OpenZeppelin Contracts** for secure smart contract development:  \n```sh\nnpm install @openzeppelin/contracts dotenv @nomiclabs/hardhat-ethers\n```\n🔹 **Hardhat Development Toolbox** to ease contract deployment and testing:  \n```sh\nnpm install --save-dev \"hardhat@^2.12.0\" \"@nomicfoundation/hardhat-toolbox@^2.0.0\"\n```\n\n---\n\n## **🔗 Connecting Your Wallet to Avalanche Testnet**  \n\n### **📌 Step 4: Install Core Wallet Extension**  \nFor seamless interaction with the **Avalanche blockchain**, install [Core Wallet](https://chrome.google.com/webstore/detail/core/agoakfejjabomempkjlepdflaleeobhb), a **Metamask alternative** designed for Avalanche dApps.  \n\n### **📌 Step 5: Enable Testnet Mode**  \nAfter installing Core Wallet:  \n1. Open the **Core extension**.  \n2. Click the **hamburger menu (☰) in the top left**.  \n3. Navigate to **Advanced Settings**.  \n4. Turn on **Testnet Mode** to interact with the Fuji test network.  \n\n### **📌 Step 6: Fund Your Wallet with AVAX**  \nYou need testnet AVAX tokens to deploy and interact with the smart contract.  \n1. Visit the [AVAX Faucet](https://faucet.avax.network/).  \n2. Enter your wallet address and request **free testnet AVAX**.  \n\n---\n\n## **🔑 Setting Up Private Keys Securely**  \n\n### **📌 Step 7: Create a `.env` File**  \nTo securely store your private key, create a **.env** file inside the `web3` directory:  \n```sh\ntouch .env\n```\nInside `.env`, add your **PRIVATE_KEY**:  \n```sh\nPRIVATE_KEY=your_private_key_here\n```\n\n### **📌 Step 8: Extract Your Private Key from Core Wallet**  \n1. Open **Core Wallet** → Click ☰ (menu).  \n2. Go to **Security \u0026 Privacy** → Click **Show Recovery Phrase**.  \n3. Enter your password and copy the **mnemonic phrase**.  \n4. Go to [wallet.avax.network](https://wallet.avax.network/) → Click **Access Wallet**.  \n5. Select **Mnemonic Key Phrase** → Paste your recovery phrase.  \n6. In the sidebar, go to **Manage Keys** → **View C-Chain Private Key**.  \n7. Copy your private key and paste it into the `.env` file.  \n\n🔴 **WARNING**: Never share your **private key**—treat it like your password!  \n\n---\n\n## **📜 Deploying the Smart Contract**  \n\n### **📌 Step 9: Copy the Required Files**  \n- **`hardhat.config.ts`** → Configuration file for Hardhat.  \n- **`deploy.ts`** → Deployment script.  \n- **`AvaxGods.sol`** → The actual smart contract.  \n\n### **📌 Step 10: Compile the Smart Contract**  \nEnsure there are no syntax errors before deployment:  \n```sh\nnpx hardhat compile\n```\nIf everything is correct, you’ll see a success message confirming compilation.  \n\n### **📌 Step 11: Deploy to Avalanche Fuji Testnet**  \nRun the following command to deploy your smart contract:  \n```sh\nnpx hardhat run scripts/deploy.ts --network fuji\n```\nAfter deployment, copy the **contract address** displayed in the terminal.  \n\n---\n\n## **📂 Integrating the Smart Contract with the Frontend**  \n\n### **📌 Step 12: Move the Compiled Contract JSON File**  \nOnce the contract is deployed, move the compiled **AVAXGods.json** file into the frontend:  \n```sh\nmv artifacts/contracts/AVAXGods.json frontend/contract\n```\n\n### **📌 Step 13: Link the Contract Address in the Frontend**  \nOpen `/contract/index.js` in the frontend and paste the **contract address** you copied earlier.  \n\n---\n\n## **🎮 You’re Ready to Play!**  \n\n🚀 Now your **Avax Gods** NFT card game is fully deployed on the **Avalanche Fuji Testnet**! Players can **battle, trade NFTs, and experience decentralized gaming** like never before.  \n\n💡 Want to customize the game? Modify the **Solidity smart contract** and **React frontend** to add new features!  \n\n💬 If you run into any issues, feel free to ask for help or contribute to the project!  \n\n**Happy coding, and may the best player win!** 🃏🔥  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapybara003%2Fweb3-battle-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapybara003%2Fweb3-battle-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapybara003%2Fweb3-battle-game/lists"}