Coder Social home page Coder Social logo

codeluminary / simple-ether-wallet Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 499 KB

This is a simple ether wallet where you can create wallet, send and receive tokens

Solidity 1.07% HTML 2.33% CSS 13.31% JavaScript 83.30%
solidity smart-contracts web3js ganache-cli sequelize nodejs-api reactjs jwt

simple-ether-wallet's Introduction

SIMPLE ETHER WALLET

Overview

This project is about the creation of an Ether wallet platform where users can create accounts, send and receive ether, and view wallet balance.

It is a low level implementation of platforms like coinbase, luno etc.

Technology Stack & Tools

  • Solidity (Writing Smart Contract)
  • Javascript (React & Node.js)
  • Web3 (Blockchain Interaction)
  • Ganache (Local blockchain)
  • Remix (Web based solidity compiler)
  • MySql Workbench (Local database management tool for MySQL database)

Requirements For Initial Setup

Architecture (Data flow)

Below is the data flow pattern used in this project:

Frontend(React) <-> Fetch Api <-> Backend(Node.js) <-> Web3 <-> Ganache(Local blockchain)

Alternative Architecture

Apart from the above data flow or architectural pattern, the below architectural pattern can also be used with a couple of tweaks:

Frontend(React) <-> Web3 <-> MetaMask(Web3 connector) <-> Ganache(Local blockchain)

Start Development

Kindly fork and clone the repo

Installation

SET UP LOCAL BLOCKCHAIN

Download Ganache which is a local blockchain that you can run the smart contract or

Install Ganache-cli using the following command

npm install ganache-cli

After install of the Ganache-cli, run the following command to get access to your local blockchain

ganache-cli

SMART CONTRACT SETUP

You can copy the code in 'wallet.sol' and paste in Remix, then compile and deploy to local blockchain.

BACKEND INSTALLATION

cd or navigate to the backend folder from the root folder in your terminal and install backend dependencies

#Goto backend
cd frontend

#Install dependencies
npm install

Setup

Create a .env file in the root directory of the backend folder and add the following properties

DB_USER = ?
DB_HOST = ?
DB_DATABASE = ?
DB_PASSWORD = ?
#Set timezone, put 1 if it's GMT+1 or -1 if it's GMT-1
TIME_ZONE = ?
SECRET_KEY=?
#Local blockchain url
WEB3_URL =?
#Smart contract address
CONTRACT_ADDRESS=?

FRONTEND INSTALLATION

cd or navigate to the frontend folder from the root folder in your terminal and install backend dependencies

#Goto frontend
cd frontend

#Install dependencies
npm install

TEST

TEST BACKEND PROJECT

The backend test include database connect and table creation test, web3 test and account creation test.

NB: Please some test cases are commented out and the reasons for the comment are at the top of each comment. Please check the test cases in the test folder for details

It's advisable to run the test files one after the order in the following order

  • errorLogger.test.js
  • db.test.js
  • accountController.test.js
  • web3Controller.test.js

cd to the backend folder in your terminal and enter the following command

npm run test

STARTING PROJECT

STARTING BACKEND PROJECT

cd to the backend folder in your terminal and enter the following command

npm start

Backend opens at port 8000

STARTING FRONTEND PROJECT

cd to the frontend folder in your terminal and enter the following command

npm start

You can access the project in your browser by entering - localhost:3000;

If your backend test is successful, then you should have the following login details

๐ŸŽฉ Author

  • IJONI VICTOR

Don't forget to star the project :) :) . Thanks

simple-ether-wallet's People

Contributors

codeluminary avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.