A decentralized dog court where AI Judge Barksworth delivers on-chain justice for sosig dogs.
Justice4SosigDogs is a fully functional decentralized court system where dogs who have been wrongfully denied entry to venues can file grievances on-chain. Every case is recorded on Hedera EVM, every dog receives a verifiable ENS identity (e.g. barkley.justice4sosigdogs.eth), and an AI judge named Judge Barksworth renders dramatic legal verdicts grounded in canine case law.
The core thesis: dachshunds and other elongated hounds face systematic discrimination at cafes, hotels, and events while poodles waltz in unchallenged. This injustice demands a transparent, immutable record.
The app is a three-chain dApp: cases are filed and verdicts stored on Hedera EVM testnet, USDC donations flow through a Justice Fund on Base Sepolia, and dog identities live as ENS subnames on Sepolia with text records for breed, case status, and verdict. When Judge Barksworth vindicates a dog, the AI agent autonomously sends an HBAR reward to the case filer on Hedera.
Users connect via WalletConnect AppKit, file a case, receive an ENS subname, request a verdict from the AI judge, and can donate USDC to support a dog's cause. The meme is the hook; the engineering is real.
Built on Scaffold-ETH 2 as the project foundation, providing typed contract hooks, hot reload, and a debug UI. The frontend is Next.js 14 with Tailwind CSS.
Smart contracts are written in Solidity 0.8.x and compiled/deployed with Hardhat. DogCourt.sol (case filing, verdict storage, HBAR reward payouts) is deployed on Hedera EVM testnet (chain 296). JusticeFund.sol (USDC donations tagged to case IDs) is deployed on Base Sepolia (chain 84532).
Wallet connection uses WalletConnect AppKit (@reown/appkit + @reown/appkit-adapter-wagmi) for multi-chain switching across Hedera, Base Sepolia, and Sepolia.
Dog identities use ENS subnames under justice4sosigdogs.eth on Sepolia, registered via the NameWrapper contract. Each subname stores text records for breed, case status, and venue using ethers.js on the server side.
The AI judge (Judge Barksworth) runs as a Next.js API route at /api/verdict. It reads case data from the Hedera chain, calls minimax-m2.7 through the Vercel AI SDK and Vercel AI Gateway to generate a dramatic legal verdict, then uses ethers.js with a server-held judge wallet to submit the verdict on-chain and send an HBAR reward to vindicated dogs.
Frontend chain interaction uses wagmi and viem. Server-side chain interaction (verdict submission, ENS writes, HBAR transfers) uses ethers.js. Circle USDC on Base Sepolia is the donation token.

