GitHub - TPII-smART/smART (original) (raw)

smART logo smART - Freelance Audiovisual Marketplace (Scaffold-ETH 2 based)

A blockchain-native freelancing platform focused on audiovisual services. smART leverages smart contracts, decentralized arbitration, and transparent on-chain workflows to create clear work agreements, guarantee payment conditions, and provide impartial dispute resolution, fostering trust between freelancers and clients. The project is built on top of Scaffold-ETH 2 tooling and integrates contracts, a Next.js frontend, and a Ponder indexer for on-chain event processing.

Key ideas

Links


Requirements


Quickstart (local / development)

  1. Install dependencies:
  2. Start a local chain (if using local Hardhat):
  3. Deploy contracts to the local chain:
  4. Start the Next.js app:
  5. Start the Ponder indexer (development):
    In production/deployed indexer use:

Visit the app at: http://localhost:3000


Deploying to Sepolia (step-by-step)

Before deploying on Sepolia ensure your environment and RPC keys are configured (see packages/nextjs/scaffold.config.ts and Hardhat config). Also ensure you have the necessary API keys for Alchemy, Pinata and Etherscan set in your .env files (see .env.example files in each package).

Follow these steps to deploy and wire the arbitration system:

  1. First, setup your deployer wallet (with Sepolia ETH already funded):
  2. Make sure the deployment script for ArbiterProxy is set to use the CentralizedKleros address for Sepolia (check packages/hardhat/deploy/03_arbiter_proxy_contract.ts) or KlerosLiquid address if using that arbitrator. Then deploy ArbiterProxy:
    yarn deploy --network sepolia --tags ArbiterProxy
  3. Copy the deployed ArbiterProxy address and paste it into the deploy arguments for HiredTalentsContract and GigsContract (update their deploy scripts to use the ArbiterProxy address in packages/hardhat/deploy/00_deploy_hired_talents_contract.ts and 01_deploy_gigs_contract.ts).
  4. Deploy HiredTalentsContract and GigsContract:
    yarn deploy --network sepolia --tags HiredTalentsContract
    yarn deploy --network sepolia --tags GigsContract
  5. Verify ArbiterProxy on Etherscan (example):
    yarn hardhat:hardhat-verify --network sepolia
  6. On Etherscan (ArbiterProxy contract page) call addOwners (using your shared deployer/owners wallet) and add the addresses of the deployed HiredTalents and Gigs contracts (these owners can perform specific owner-only operations).
  7. Deploy ProfileConfigContract:
    yarn deploy --network sepolia --tags ProfileConfigContract
  8. Look up Kleros contract (either CentralizedKleros or KlerosLiquid) on Sepolia and copy its address and abi to packages/nextjs/contracts/externalContracts.ts for frontend integration.
  9. Start the frontend and indexer:
    yarn start
    yarn ponder:dev # for local development indexer

or

yarn ponder:start # to run the production indexer (deployed environment)

Notes:


Using Ponder (indexer)


Important scripts (project root & workspaces)

Common scripts (run from repo root; internal workspace scripts call into packages):

See package.json for the full list of scripts.


Local Hardhat vs Remote Networks

The project supports both local Hardhat development and external networks (e.g., Sepolia). When deploying locally you may need to adjust:

If you opt to run a purely local setup, ensure the ArbiterProxy and other addresses are set consistently across frontend, deploy scripts, and Ponder config.


Architecture & Components


License

MIT. This project and many supporting utilities leverage Scaffold-ETH; please retain attributions where appropriate.