/Ethereum-with-React

An attempt to make a simple todo-list using Ethereum Smart Contracts and React

Primary LanguageJavaScriptMIT LicenseMIT

Ethereum-with-React

A simple todo-list dApp (de-centralized application) made with Ethereum smart contracts and Reactjs.

Preview


TodoList dApp

Tech-Stack


How to develop locally?


Firstly clone this repo, and install the npm dependencies:

$ git clone https://github.com/Maharshi-Pandya/Ethereum-with-React.git

$ cd Ethereum-with-React/todo-list
$ npm install 

Now open a different terminal session and run ganache-cli for a local development blockchain running in the terminal itself.

$ ganache-cli

which results in (something similar to this):

Ganache CLI img

Next go into the tl-smartcontract directory inside the project repo and migrate the contracts to the Ganache CLI blockchain.

$ cd Ethereum-with-React/tl-smartcontract

$ truffle migrate --reset

With this, the contract will be deployed on the local development blockchain and we will be given a contract address needed further.

Truffle Migrate img

Next, open the build/contracts/TodoList.json inside any text editor and copy the ABI of the deployed contract.

Now, open the todo-list/src/config.js file inside any text editor and paste the contract address and the contract ABI in there.

code

With this, navigate to todo-list/ directory and run:

$ npm start

After that import and connect the first ganache-cli account in metamask and interact with the dApp.

And done!

You can develop locally!