Coder Social home page Coder Social logo

adrianhajdin / project_web3_battle_game Goto Github PK

View Code? Open in Web Editor NEW
422.0 4.0 138.0 15.74 MB

With a stunning design, interactive gameplay, smart wallet pairing, live interaction with smart contracts, and, most importantly, the ability to battle other players in real-time, AvaxGods is the best and the only Web3 battle-style online multiplayer card game that you can currently find on YouTube.

Home Page: https://jsmastery.pro

HTML 0.68% JavaScript 65.89% CSS 10.39% Solidity 17.14% TypeScript 5.90%
avalanche blockchain nft solidity web3

project_web3_battle_game's Introduction

Avax Gods - Online Multiplayer Web3 NFT Card Game

Gameplay

Launch your development career with project-based coaching on JS Mastery Pro.

Instructions on setting up the Web3 part of the project

  1. cd web3
  2. npx hardhat -> y → typescript → enter → enter
  3. npm install @openzeppelin/contracts dotenv @nomiclabs/hardhat-ethers + Hardhat packages npm install --save-dev "hardhat@^2.12.0" "@nomicfoundation/hardhat-toolbox@^2.0.0"
  4. Install Core, a Metamask smart wallet alternative built for Avalanche dApps
  5. Turn on the testnet mode by: opening up the Core extension -> click the hamburger menu on the top left -> go to advanced -> turn on the testnet mode
  6. Fund your wallet from the Avax Faucet
  7. Create a .env file and specify a PRIVATE_KEY variable.
  8. To get to the private key, do the following steps:
  9. Open up the Core extension -> click the hamburger menu on the top left -> go to security and privacy -> click show recovery phase -> enter your password -> copy the phrase -> go to wallet.avax.network -> click access wallet -> choose mnemonic key phrase -> paste what the words we’ve copied from Core -> on the sidebar click manage keys -> view c-chain private key -> copy -> paste it in the .env file
  10. Copy the hardhat.config.ts file from the GitHub gist down in the description
  11. Copy the deploy.ts script from the GitHub gist down in the description
  12. Copy the AvaxGods.sol smart contract code from the GitHub gist down in the description
  13. Compile the contract by running the npx hardhat compile command
  14. Deploy the smart contract on the Fuji test network by running the npx hardhat run scripts/deploy.ts --network fuji command Move the /artifacts/contracts/AVAXGods.json file to the /contract folder on the frontend Copy the address of the deployed contract from the terminal and paste it into the /contract/index.js file of the frontend application

project_web3_battle_game's People

Contributors

adrianhajdin avatar tidbitsjs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

project_web3_battle_game's Issues

Metamask RPC error resource unavailable

uncaught ( in promise ) code 32002 index.jsx :21

i tried 7-8 time in last 10 days and getting stucked due to them aftr exactly 1 hour of video
i mean i type test but it continue sho0w me isplayer is not a function tried almost everything
AFDF1087-1A4A-4A97-A430-AB8004919634_1_105_c

Can't able deploy contract on fuji

Hey Bro,
Hope you are doing Well. First of all thanks for the video you created for us leaners.
I got an error, hope you can help me.
I unable to deploy the contract on testnet because it exceeds the contract size limit.
I looked on google for solutions and it says try to separate the code in 2 files.
I can separate it but since You didn't explained the contract, I don't know which function is related to other.

What's the solution for it?

contract.isplayer is not a function

I'm getting the "contract.isplayer is not a function" error but it's not because of the providers.getSigner . The error is coming from UpdateCurrentWalletAddress function. It shows that there is an "uncaught (in primise) object" in that function.

Error HH502: Couldn't download compiler version list. Please check your internet connection and try again.

HardhatError: HH502: Couldn't download compiler version list. Please check your internet connection and try again.
at D:\Aryan\NF3\Card_Game\web3\node_modules\hardhat\src\internal\solidity\compiler\downloader.ts:157:17
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async CompilerDownloader.downloadCompiler (D:\Aryan\NF3\Card_Game\web3\node_modules\hardhat\src\internal\solidity\compiler\downloader.ts:150:5)
at async SimpleTaskDefinition.action (D:\Aryan\NF3\Card_Game\web3\node_modules\hardhat\src\builtin-tasks\compile.ts:551:9)
at async Environment._runTaskDefinition (D:\Aryan\NF3\Card_Game\web3\node_modules\hardhat\src\internal\core\runtime-environment.ts:308:14)
at async SimpleTaskDefinition.action (D:\Aryan\NF3\Card_Game\web3\node_modules\hardhat\src\builtin-tasks\compile.ts:678:36)
at async Environment._runTaskDefinition (D:\Aryan\NF3\Card_Game\web3\node_modules\hardhat\src\internal\core\runtime-environment.ts:308:14)
at async Environment.run (D:\Aryan\NF3\Card_Game\web3\node_modules\hardhat\src\internal\core\runtime-environment.ts:156:14)
at async Environment._runTaskDefinition (D:\Aryan\NF3\Card_Game\web3\node_modules\hardhat\src\internal\core\runtime-environment.ts:308:14)

Caused by: ConnectTimeoutError: Connect Timeout Error
    at onConnectTimeout (D:\Aryan\NF3\Card_Game\web3\node_modules\undici\lib\core\connect.js:182:24)
    at D:\Aryan\NF3\Card_Game\web3\node_modules\undici\lib\core\connect.js:129:46
    at Immediate._onImmediate (D:\Aryan\NF3\Card_Game\web3\node_modules\undici\lib\core\connect.js:168:33)
    at processImmediate (node:internal/timers:471:21)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.