Skip to content

dhirukumar/chai-dapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

how to make your firest Dapp

chai-dapp

First we need to make our smart contract in my case I use remix editor for making my smart contract and I use the solidity language because it is the best blockchain language for application hear's is my smart contract

Screenshot 2024-05-04 at 9 42 15 PM

After go to your dashboard and make a file for deploying your smart contract using vs code and open in your vs code

Screenshot 2024-05-04 at 9 41 33 PM

After open your file in vs code you need to install hardhat by the command in the following

npm install hardhat
Screenshot 2024-05-04 at 9 42 50 PM Screenshot 2024-05-04 at 9 44 04 PM

And then install the dependency for heart hardhat by this command

npm install --save-dev "hardhat@^2.22.3" "@nomicfoundation/hardhat-toolbox@^5.0.0"
Screenshot 2024-05-04 at 9 44 24 PM

after compile your hardhat by this command

npx hardhat compile
Screenshot 2024-05-04 at 9 46 54 PM Screenshot 2024-05-04 at 9 47 02 PM

After compile your hardhat you need to know your deployment address for that you use this command

npx hardhat ignition deploy ./ignition/modules/lock.js
Screenshot 2024-05-04 at 9 48 01 PM

After that you need to create your vite in your decentralized application by this command

npm create vite@latest
Screenshot 2024-05-04 at 9 48 49 PM

This is your opinion what you choose like Vanilla,vue I choose react After after that you choose JavaScript and then your vite project is launch

After that running this command a new file by the name vite-project is created in my case I change the name of this file with client

Screenshot 2024-05-04 at 9 49 30 PM

After that I go to my client folder by this command

cd client

After that I install all the dependency by the command

npm install

After that your work is finish if you want to check your application is deployed or not then you put this command the TerminalAnd you got a local http local host link by putting this link in your Chrome search bar you see your application running on localhost

npm run dev
Screenshot 2024-05-04 at 9 50 18 PM Screenshot 2024-05-04 at 9 50 29 PM

Okay this is the common step for creating a decentralized application after that you need to diploy your smart contract and create your application

Okay so here is the important part for making your decentralized application first you go to your client folder and then go to the src folder and click on app.jsx after making some changes you completed your app.jsx fine

Screenshot 2024-05-04 at 9 53 38 PM

After making changes in your app.jsx file you go to your hardhat.config.js file and make some changes in it also in my case I copy from some external website

Screenshot 2024-05-04 at 9 54 02 PM

After that you need two things first one is goerli_URL and the second one is private_key for store this to thinks you need to create your one separate file like.env and save it there

1.if you want your Goerli_URL you need to create a app in my case I use Alchemy for creating app after that creating your app you go to your API key and copy paste the https link in the Goerli_URL

Screenshot 2024-05-04 at 9 54 19 PM Screenshot 2024-05-04 at 9 54 24 PM

2.If you want your private key then you make your account in metamask after that creating your account in metamask you click on thetop right side and go to the account details and then create your private link and copy and paste it in .env file

Screenshot 2024-05-04 at 9 55 22 PM Screenshot 2024-05-04 at 9 57 03 PM

After that your application is deployed for see your application you need to go to your client folder and type this command

npm run dev

After paste the link in the search bar you saw your application

Screenshot 2024-05-04 at 10 08 40 PM

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published