Skip to content

Latest commit

 

History

History
137 lines (96 loc) · 5.18 KB

File metadata and controls

137 lines (96 loc) · 5.18 KB

Workchain

A Decentralized Freelance Marketplace Built on Ethereum


Workchain is a next-generation decentralized application (DApp) that connects freelancers with clients. By leveraging Ethereum smart contracts, it eliminates intermediaries, ensures transparent escrow payments, and builds a verifiable reputation system on the blockchain.

✨ Core Features

  • 🔐 Trustless Escrow: Payments are locked in smart contracts and released automatically upon task completion.
  • 👥 Dual-Role System: Seamlessly switch between Client and Freelancer profiles.
  • 🦊 Web3 Integration: Full MetaMask support for secure, seamless wallet connections and transactions.
  • 📜 Immutable Reputation: Work history, reviews, and completed tasks are permanently recorded on the blockchain.
  • 🛠 End-to-End Task Management: A complete lifecycle from task creation and bidding to delivery and review.

🏗 Architecture & Tech Stack

🚀 Getting Started

Follow these steps to set up the project locally for development and testing.

Prerequisites

Ensure you have the following installed:

1. Installation

Clone the repository and navigate into the project directory:

git clone https://github.com/tisha-varma/workchain.git
cd workchain

Install the required Python dependencies:

pip install flask flask-sqlalchemy flask-login web3 pycryptodome solcx

Install the required Solidity compiler version:

# In your Python shell or via a quick script:
from solcx import install_solc
install_solc('0.8.0')

2. Blockchain Configuration

  1. Open Ganache and select Quickstart or create a new workspace.
  2. Ensure your Ganache server is running on HTTP://127.0.0.1:7545 with Chain ID 1337.
  3. Open MetaMask in your browser:
    • Go to Settings > Networks > Add a Network manually.
    • Network Name: Ganache Local
    • New RPC URL: http://127.0.0.1:7545
    • Chain ID: 1337
    • Currency Symbol: ETH
  4. Import at least two accounts from Ganache into MetaMask using the private keys provided by Ganache (one for the Client, one for the Freelancer).

3. Running the Application

Initialize the local database:

flask shell
>>> from main import db
>>> db.create_all()
>>> exit()

Start the Flask server:

python main.py

The application will be available at http://127.0.0.1:5000.


📖 User Workflows

For Clients 💼

  1. Connect: Link your MetaMask wallet.
  2. Fund & Post: Create a detailed task and deposit the required ETH budget into the smart contract escrow.
  3. Review & Approve: Once the freelancer submits the work, review it.
  4. Release: Approve the work to release the funds from the smart contract directly to the freelancer's wallet.

For Freelancers 🧑‍💻

  1. Browse: Search for open tasks that match your skill set.
  2. Accept & Work: Accept a task (verifying that funds are safely in escrow).
  3. Submit: Deliver the work through the platform.
  4. Get Paid: Receive your ETH payment automatically upon client approval.

🔐 Smart Contract Implementation

Our Ethereum smart contracts are designed for absolute security and transparency. They handle:

  • State Management: Tracking task status (Open, In Progress, Completed, Disputed).
  • Escrow Mechanics: Securing client deposits and guaranteeing freelancer payouts.
  • Access Control: Ensuring only authorized parties (the specific client or assigned freelancer) can execute state-changing functions.

(Note: Contracts in this repository are optimized for local demonstration. Before any mainnet deployment, a comprehensive professional security audit is strongly advised.)

🛠 Troubleshooting

  • Transactions Failing/Stuck: In MetaMask, go to Settings > Advanced > "Clear activity tab data" (Reset Account). This resolves nonce mismatch issues common when restarting Ganache.
  • Wrong Network: Ensure MetaMask is connected to your local Ganache RPC (1337), not Ethereum Mainnet or a public testnet.
  • Contract Compilation Errors: Verify that solcx successfully downloaded v0.8.0.

🤝 Contributing

We welcome contributions to make Workchain better!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.