Freelance escrow dApp — Next.js frontend + smart contracts for secure on-chain payments.
This project is a freelance escrow dApp: a Next.js + React TypeScript frontend paired with on‑chain smart contracts to lock, release, and claim payments securely. Clients create escrows and deposit USDC; freelancers view claimable jobs in a dedicated portal and claim funds via MetaMask. Features include demo mode (self‑transfer and token watch), robust MetaMask flows (connect, switch chain, confirm transaction), RPC rate‑limit handling (caching, debouncing, exponential backoff), centralized escrow hooks (fast reads, minimized polling), responsive UI components (motion/react parallax/scroll effects), and end‑to‑end display of escrow state across dashboard, freelancer portal, and claim pages. Designed for secure UX, clear transaction feedback, and developer debugging (logs, retries).
I built this as a full-stack freelance escrow dApp. I used Next.js + React + TypeScript for the frontend, Solidity + Hardhat for contracts, and wagmi/ethers for blockchain interactions. I centralised reads in a useAllEscrows hook (publicClient reads) and solved Ankr/Base Sepolia rate limits with sessionStorage caching, a 10s debounce, and exponential backoff retries.
For UX I integrated MetaMask flows (eth_requestAccounts, wallet_switchEthereumChain, eth_sendTransaction for demo self‑transfers, wallet_watchAsset) so popups always appear and show exact claim amounts. I used motion/react (Motion One) for the ScrollVelocity/parallax components (useMotionValue, useScroll, useVelocity, useSpring, useAnimationFrame) to create smooth, responsive marquees. Demo mode and verbose logging speed up local testing; the self‑transfer hack forces visible confirmations without real token movement.

