Skip to content

Allows the user to deploy Escrow Smart Contracts by adding a beneficiary

Notifications You must be signed in to change notification settings

EPW80/Escrow-DApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decentralized Escrow Application

Overview

This DApp allows the user (deployer and arbiter) to deploy Escrow Smart Contracts by adding a beneficiary. Only the arbiter can approve the contract, and when this happens the beneficiary is allowed to withdraw the contract funds. The app has the contract code and test, the frontend React App, and a server that allows persistent data to be retrieved in the UI.

Content

  1. Frontend - /app
  2. Backend - /server
  3. Escrow contract - /contracts
  4. Contract tests - /tests

Local Configuration

  • Run npm install for hardhat dependencies
  • Run cd app && npm install for frontend dependencies
  • Run cd server && npm install for backend dependencies

Hardhat

  • Configuration - hardhat.config.js

  • Compile contracts (artifacts will go to /app/src/artifacts):

    # With hardhat
    npx hardhat compile
    # With npm scripts
    npm run compile
  • Test contracts:

    # With hardhat
    npx hardhat test
    # With npm scripts
    npm run test
  • Start local node:

    # With hardhat
    npx hardhat node
    # With npm scripts
    npm run node

Frontend

  • Start development host npm start
    • At the root level it runs the npm script start which runs cd app && npm start
    • You can cd app and run npm start as well
  • Go to http://localhost:3000

Backend

  • Start the express server npm run server
    • At the root level it runs the npm script server which runs cd app && npm run dev
    • You can cd server and run npm run dev as well
  • The server's purpose is to provide persistent data to have easier access to the deployed contracts

Image

About

Allows the user to deploy Escrow Smart Contracts by adding a beneficiary

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published