Skip to content

Smart Contract, convenient and reliable decentralized system that helps to define monetary agreement between a client and an agent.

Notifications You must be signed in to change notification settings

dmitrijs-voronovs/SmartDeal

Repository files navigation

Multi-step payment tracking dapp "Smart deal"

Problem

Multi-step business deals, agile projects, complex agreements have a common issue of payment tracking and fulfillment. Usually a 3rd party has to be involved to control if deliverables are completed and an agreed sum of money for each stage is paid in time.

Solution

"Smart deal" is a convenient and reliable decentralized system that helps to define monetary agreement between a client and an agent. Moreover, It helps to prevent deals with unqualified agents by storing history of completed deals, reviews and ratings.

"Smart deal" solution includes a convenient web-based portal with authorized consultants that help to create an agreement and resolve all the issues.

Installation

Prerequisites

  1. Ganache
  2. truffle
  3. npm
  4. Metamask extension (optional)

Dapp launch (with ganache's web3 provider)

  1. Launch ganache
  2. Clone project and install dependencies (first time only):
    git clone https://github.com/dmitrijs-voronovs/SmartDeal.git && cd SmartDeal && npm i && cd app && npm i && cd ..
  3. Launch project:
    npm run launch

For generating new contract use command

npm run migrate

Dapp launch (with Metamask's web3 provider)

  1. Launch ganache
  2. Connect Metamask to ganache
    1. New RPC URL: http://localhost:7545
    2. Chain ID: 1337
    3. Network Name: SmartDeal
  3. Clone project and install dependencies (first time only):
    git clone https://github.com/dmitrijs-voronovs/SmartDeal.git && cd SmartDeal && npm i && cd app && npm i && cd ..
  4. Launch project:
    npm run launchM
  5. Metamask extension will appear and ask to log in, use mnemonic from ganache for that

For generating new contract use command

npm run migrateM

Important note

During the initial contract deployment, ganache’s 1st account is used for Authorized consultant role (creator), 2nd - for the Agent and 3rd - for the Client.
Also the initial protection percent is set to 30%. To change it modify this line.

Additinal commands

Running tests:

npm run test

Diagrams

Use case diagram

smartDeals-Use case diagram drawio

State diagram

smartDeals-State diagram drawio

Sequence diagram

SequenceDiagram

Interface

image image image

About

Smart Contract, convenient and reliable decentralized system that helps to define monetary agreement between a client and an agent.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published