Memory Puzzle using Blockchain
by kandikits Updated: Apr 27, 2023
Blockchain games are using various levels of decentralization as part of their mechanics. Blockchain technology also enables cross-game interoperability, player-driven economy, and play-to-earn gaming models. Through the tokenization of gameplay and smart contracts, memory puzzle will increase the number of tokens for each matches.
By using the below libraries you can create the Memory Puzzle Game. The entire solution is available as a package to download from the source code repository.
- Download the Metamask extension for chrome, edge, firefox .
- Download Ganache for your windows. Click here to download Ganache.
Zip File Setup Instructions:
- Download the 'kit_installer.zip' then unzip the folder.
- Then Double-tap the 'kit_installer' and the command prompt opens. After successful installation of the kit, press 'Y' to run the kit, and it will install the dependencies.
- Then press any key to migrate contracts and run the development server in ' http://localhost:3000/'.
- To run the kit manually, press 'N' and locate the zip file and extract the 'blockchain-memory-game'.
- Double-click 'matchpuzz' to install node modules, and dependencies, and double-click 'start' to run the development server in 'http://localhost:3000/' .
- Before running this project open the Ganache and click on account logo at right corner in metamask to import one account using private key from ganache to Metamask. To connect metamask follow the instructions in "metamask connections" given above.
- Then connect metamask using the Ganache account with localhost:3000. Now you can see the account id in right side of the app if not ensure you are connected to metamask.
- Now you're all set Enjoy playing!!!.
- You can find matches now! if matches are found it will ask for confirming 'amount & gas fee 'in metamask, then click 'confirm'.
- Now the tokens will be collected and continue playing.
Click on the button below to download the solution and follow the deployment instructions to begin set-up. This 1-click kit has all the required dependencies and resources you may need to build your Memory Puzzle App.
- After adding Metamask extension to your browser, click get started there you will see 'IMPORT WALLET' and ' CREATE WALLET' there click the create wallet.
- There you select I agree and it asks you to create the password. After creating the password it shows you the recovery phrase.
- If you forget the password you can use the recovery phrase.
- Then one Account will be created, and the default network will be there 'ETHEREUM MAINNET'.
- At the top there is a Network tab there click show/hide network there find and select the "show test networks".
- Then delete 'Localhost:8545'.
- lick 'Add Network' and fill the Network name : 'Ganache' ,RPC URL: 'HTTP://127.0.0.1:7545', Chain Id :'1337' then save. Now you can see 'Ganache Network' in metamask.
- While running batch file, if you encounter Windows protection alert, select More info --> Run anyway.
- During kit installer, if you encounter a Windows security alert, click Allow.
- Ensure Ganache is open before running the 1-Click Installer.
- Make sure you have chosen the Ganache Network in the Metamask Extension.
- Sometimes you may face the "out of gas error" to resolve this error, edit the "Gas Limit".
- Sometimes after npm start it throw's an error as create the .env file. For that create the .env file inside the project SKIP_PREFLIGHT_CHECK=true.
For a detailed tutorial on installing & executing the solution as well as learning resources including training & certification opportunities, please visit the OpenWeaver Community
Ethereum Development Tools
A tool for developing smart contracts. Crafted with the finest cacaos.
TypeScript 13937 Version:v5.9.4 License: Permissive (MIT)
Fast Ethereum RPC client for testing and development
OpenZeppelin, a framework to build secure smart contracts on Ethereum
MetaMask-extension library is a software cryptocurrency wallet used to interact with the Ethereum blockchain.
:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites