Skip to content

tundx0/Escrow-blockchain-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

🔐 Escrow Blockchain App

License: MIT

This repository contains a blockchain-based escrow application. The project is divided into two main parts:

  1. Escrow Contracts: Solidity smart contracts stored in the escrow folder, developed using Foundry.
  2. Escrow Frontend: A Next.js frontend application located in the escrow-frontend folder.

📑 Table of Contents

🌟 Overview

The Escrow Blockchain App is designed to facilitate secure transactions between buyers and sellers by using smart contracts on the Ethereum blockchain. The contracts handle the creation, funding, service rendering, dispute opening, and settlement of escrow transactions.

🛠 Prerequisites

To run this project, you need to have the following installed:

🚀 Setup

  1. Clone the repository:

    git clone https://github.com/tundx0/escrow-blockchain-app.git
    cd escrow-blockchain-app
  2. Install dependencies for the frontend:

    cd escrow-frontend
    npm install
    # or
    yarn install
  3. Return to the root directory:

    cd ..

📜 Deploying Contracts

To deploy the smart contracts:

  1. Navigate to the escrow directory:

    cd escrow
  2. Compile the contracts:

    forge build
  3. Deploy the contracts to your chosen network:

    forge script script/DeployEscrow.s.sol:DeployEscrow --rpc-url <YOUR_RPC_URL> --private-key <YOUR_PRIVATE_KEY> --broadcast

    ⚠️ Replace <YOUR_RPC_URL> with your Ethereum node's RPC URL and <YOUR_PRIVATE_KEY> with your wallet's private key.

💻 Running the Frontend

To run the frontend application:

  1. Navigate to the escrow-frontend directory:

    cd escrow-frontend
  2. Create a .env.local file and add the necessary environment variables:

    NEXT_PUBLIC_CONTRACT_ADDRESS=<YOUR_DEPLOYED_CONTRACT_ADDRESS>
    NEXT_PUBLIC_RPC_URL=<YOUR_RPC_URL>
    
  3. Start the development server:

    npm run dev
    # or
    yarn dev
  4. Open your browser and navigate to http://localhost:3000 to interact with the application.

📁 Project Structure

escrow-blockchain-app/
├── escrow/
│   ├── src/
│   │   └── Escrow.sol
│   ├── test/
│   │   └── Escrow.t.sol
│   └── script/
│       └── DeployEscrow.s.sol
├── escrow-frontend/
│   ├── src/
|     ├── app/
│       ├── components/
│       ├── styles/
|       └── page.tsx
|       └── layout.tsx
│   └── public/
└── README.md
  • escrow/: Contains the Solidity smart contracts and related Foundry files.
  • escrow-frontend/: Houses the Next.js frontend application.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❤️ by [tundx0]

About

An Escrow site built with Solidity, Foundry, NextJS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published