Skip to content

sdswoc/multiparty-snap

Repository files navigation

MultiParty Payments dApp

This is my project repository developed during SDSLabs Winter of Code 2023

About

This is a dApp for multiparty transactions, i.e transactions in which more than one party is involved (particularly organisations) and aims at implementing this for organisations. This was made using node.js, solidity (Hardhat development environemnt), bootstrap along with the use of MetaMask API.

Features

  • Simple and elegant UI and easy to interact and understand.
  • Secure transactions on the blockchain.
  • Processes multiparty transactions upon majority consensus after gaining user signatures.

Relevance

This dApp is built to extend the functionality of MetaMask in order to exxpand it to serve to multiparty transactions, the transactions in which many parties are involved and all don't necessarily have the same 'weight' for their opinion.

Quick Start Guide

  1. Clone the repository to your local machine using the command
  git clone (SSH key)

in your terminal using the SSH key of the repository.

  1. Install all the required dependencies using
  npm install

in the root of the repository.

  1. Install MetaMask browser extension : Install MetaMask.

  2. Create a .env file and create a variable PRIVATE_KEY and assign it the value of private key of a MetaMask wallet (It is recommended to not use an actual wallet, instead make a new wallet).

  3. Deploy the contract on the Polygon Mumbai testnet by running the command yarn hardhat run --network polygon_mumbai scripts/deploy.js in the root of your directory. Now, copy the contract address in the terminal and paste that in the constants.js file.

  4. Use Polygon Faucet to get test MATIC cryptocurrrency by entering your wallet's address.

  5. Change your directory by running cd front-end-multiparty-payments and run the node server by running the command node ./server/server.js. Open localhost:5500/front-end-multiparty-payments/. Now you can interact with the dApp.

Description

You can add a new ShareHolder to the organisation by specifying their share, name and wallet address.

You can initiate a new transaction and notice that it will send signature requests to other ShareHolders which they can approve or disapprove, and if the total consensus is greater than 51%, the transaction will be successful (You need to have atleast two MetaMask wallet in diffefent browsers preferably!). Note that you can make multiple transactions after entering the relevant data of ShareHolders.

You can edit the relevant details like name of the organisation, required majority along with the data of CoFounders while deploying the contract in ./scripts/deploy.js .

Authors

Saurabh Rana

Mentors

License

Licensed under the MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published