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.
Deployment Information
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.
PREREQUISITES:
- 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.
Metamask Extension
- 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.
Troubleshoot
- 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
Development Environment
VSCode is used for development and debugging. Node.js is an open-source, cross-platform, JavaScript runtime environment. It executes JavaScript code outside of a browser, whereas VSCode is used to get a typical experience of IDE for developers. npm is the default package manager for the JavaScript runtime environment Node.js.
nodeby nodejs
Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:
nodeby nodejs
JavaScript 95980 Version:v20.3.0 License: Others (Non-SPDX)
Ethereum Development Tools
Truffle is a development environment, testing framework and asset pipeline for Ethereum. Web3.js is the Ethereum JavaScript API which connects to the Generic JSON-RPC spec. Solidity is a component to build custom contracts and more complex decentralized systems.Ganache-CLI is the latest version of TestRPC and a fast and customizable blockchain emulator.
truffleby trufflesuite
A tool for developing smart contracts. Crafted with the finest cacaos.
truffleby trufflesuite
TypeScript 13947 Version:v5.9.4 License: Permissive (MIT)
ganache-cliby trufflesuite
Fast Ethereum RPC client for testing and development
ganache-cliby trufflesuite
JavaScript 3220 Version:v6.12.2 License: Permissive (MIT)
openzeppelin-solidityby prahaladbelavadi
OpenZeppelin, a framework to build secure smart contracts on Ethereum
openzeppelin-solidityby prahaladbelavadi
JavaScript 0 Version:Current License: Permissive (MIT License)
Crypto Wallet
MetaMask-extension library is a software cryptocurrency wallet used to interact with the Ethereum blockchain.
metamask-extensionby MetaMask
:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
metamask-extensionby MetaMask
JavaScript 10096 Version:v10.31.1 License: Others (Non-SPDX)
Kit Solution Source
blockchain-memory-gameby kandi1clickkits
blockchain-memory-gameby kandi1clickkits
JavaScript 0 Version:v1.0.0 License: Permissive (MIT)
Support
If you need help using this kit, you may reach us at the OpenWeaver Community