Skip to content

chankapure/dapp

Repository files navigation

My first dapp - decentralised application

PreRequisite:

  1. Solidity
  2. ReactJS
  3. Ganache [https://trufflesuite.com/ganache/]
  4. Truffle [https://trufflesuite.com/docs/truffle/getting-started/installation]
  5. Meta Mask account

===================================================

REACT APP

create new folder 'fund-transfer'
run below command

npm install create-react-app
npx create-react-app funding-project
npm install @metamask/detect-provider
npm install --save react-scrpts@4.0.3

used bootstrap for frontend design.
Added 'Connect', 'Transfer' & 'WIthdraw' actions.

TRUFFLE

Go to Root Folder i.e dapp
run below command

truffle init


GANACHE

Go to Ganache App ==> New WorkSpace ==> Give Name ==> Add truffle-config.js file to the workspace, which is generated by truffle.

Test the app using below command

truffle migrate --reset

Verify migration by checking transactions in ganache.

SOLIDITY

File: contracts/dapp.sol

  1. transfer() - Transfer funds to receipient account.
  2. withdraw() - withdraw funds from account.
  3. receive() - receive funds.

META MASK PLUGIN

Go to metamask plugin in chrome browser.
Connect to local ganache using local ip address. i.e, http://127.0.0.1:7545
Import any one account from ganache to metamask account.

RUN THE APPLICATION

go to react folder and run below command

npm start

access app using local ip

http://localhost:3000

This is an image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published