Pactum is a decentralized escrow dApp on Ethereum that secures funds between clients and freelancers using smart contracts, complete with a built-in dispute resolution system.
- Factory-Based Deployment: Creates a unique
Escrowcontract for each agreement. - Secure State Machine: Manages funds through a strict lifecycle (
AwaitingDeposit->InProgress->Complete/Cancelled). - Role-Based Access: Restricts actions to the Client, Freelancer, and Arbiter.
- Web Dashboard: A dApp to create and track all personal escrow agreements.
- Blockchain: Solidity, Foundry
- Frontend: Next.js, Wagmi, RainbowKit, TypeScript
-
Clone & Install:
git clone <your-repo-url> cd <repo-name> forge install && npm install
-
Run Local Blockchain (Terminal 1):
anvil
-
Deploy Contracts (Terminal 2):
forge script script/DeployEscrow.s.sol --rpc-url [http://127.0.0.1:8545](http://127.0.0.1:8545) --broadcast
-
Configure Frontend: Update the deployed factory contract address and ABI in your frontend code.
-
Run Frontend (Terminal 3):
npm run dev
Run the full smart contract test suite with Foundry:
forge test