Launch your development career with project-based coaching on JS Mastery Pro.
cd web3
npx hardhat
-> y → typescript → enter → enternpm install @openzeppelin/contracts dotenv @nomiclabs/hardhat-ethers
+ Hardhat packagesnpm install --save-dev "hardhat@^2.12.0" "@nomicfoundation/hardhat-toolbox@^2.0.0"
- Install Core, a Metamask smart wallet alternative built for Avalanche dApps
- 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
- Fund your wallet from the Avax Faucet
- Create a
.env
file and specify a PRIVATE_KEY variable. - To get to the private key, do the following steps:
- 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
- Copy the
hardhat.config.ts
file from the GitHub gist down in the description - Copy the
deploy.ts
script from the GitHub gist down in the description - Copy the
AvaxGods.sol
smart contract code from the GitHub gist down in the description - Compile the contract by running the
npx hardhat compile
command - 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
- React.js
- Tailwind CSS
- Solidity
- Ethers
- Hardhat
- Web3Modal
- Avalanche
- Core
👉 Create and Join Live Battles: Enjoy the power of battling your friends creating and joining amazing battlegrounds.
👉 Choose your Battleground: Feel free to choose between four stunning battlegrounds at the start or in the middle of your quest to annihilate your opponent.
👉 Real-Time Battle: Keep track and watch every movement your adversary makes at every single moment with real-time synchronization.
👉 Interactive Gameplay: You will never be able to see the sunlight again, haha just jokes, but this game will immerse you into an incredible gameplay experience you've never seen.
👉 Live Interaction with Smart Contracts: Real-time web3 exchange between opponents to make every single move and win many ethereum on your battles.