Giter Club home page Giter Club logo

walletfather's Introduction

walletfather crypto application for practice

Developed by Juan Ignacio Balaguero

Stack:

solidity, hardhat, express, mongodb, angular 12

History

The mafia has arrived in the city and is demanding businesses to pay a commission for transacting ethereum in exchange for "security". You will become a WalletFather, the man at the head of your gang, and you'll have the ability of create wallets, control all transactions and charge for them. Nice business, uh? Transaction charges are going to be stored in the contract address (soon).

For now, the city is pretty small, and it needs to grow. So for now, the walletFather charges a really cheap amount for transactions. In a future, probably many walletFathers will arrive to the city, and you know what happens after, yes, war!. Stay tuned for that update!

Data Sources

User's email, password and main wallet address and privateKey are stored in mongodb. Those are used as login credentials and to sign transactions to the contract.

WalletFather and Wallets (address and privateKey) are stored in blockchain.

Basic Sample Hardhat Project

This project demonstrates a basic Hardhat use case. It comes with a sample contract, a sample script that deploys that contract, and an example of a task implementation.

The backend API stores the user's address and privateKey in order to perform different operations. I know this is not the safest way to operate but is just for practice. Since the main goal is to have a working API with some UI for a smooth journey. In a future, I plan to replicate dashboard view with web3 in order to interact directly with the contract, use metamask login and bypass some api calls.

tasks

Try running some of the following tasks:

yarn chain // start local ethereum testnet
yarn deploy // deploys contract on local testnet
yarn deploy:ropsten // Deploys contract to ropsten network

Try demo app

Or clone the repo and..

Run the app locally

1- Compile and deploy smart contract In a terminal window run go to walletfather/smart_contract and runnpm install && yarn chain In another terminal window go to walletfather/smart_contract and deploy the contract by rinning yarn deploy It outputs the contract address in console, copy it and paste in walletfather/backend/config/envivonment.js > contractAddress entries It also should create artifacts and typechain-types. Artifacts contains contract ABI used as interface in backend repository.

2- Run the backend Backend will connect to my personal mongodb account. With populated data. If you want an own database, you can modify the connection string on walletfather/backend/config/envivonment.js In a terminal window go to walletfather/backend run npm install run node ./bin/www

3- Run the frontend In a terminal window go to walletfather/frontend run npm install run npm start Open a browser and navigate to http://localhost:4200

Run the app in ropsten testnet

0- create an account in alchemy.com, associate your wallet and create an application. Put your app key on walletfather/backend/config/envivonment.js 1- Compile and deploy smart contract In a terminal window run go to walletfather/smart_contract and runnpm install && yarn chain In another terminal window go to walletfather/smart_contract and deploy the contract by rinning yarn deploy:ropsten It outputs the contract address in console, copy it and paste in walletfather/backend/config/envivonment.js > contractAddress entries It also should create artifacts and typechain-types. Artifacts contains contract ABI used as interface in backend repository.

2- Run the backend

3- Run the frontend

SSH

ssh -i "unmineropichi-1.pem" [email protected]

walletfather's People

Contributors

balaguero 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.