An E2E encrypted chat with token gated group chats built on Oasis Sapphire with ROFL.
This is a demo application and should not be used in production.
CraneChat is a decentralized chat application that provides:
- Token Gated Group Chats: Create groups that require members to hold specific token amounts on supported chains to join
- Direct Messaging: Send encrypted messages directly to other users
- E2E Encryption: All messages are encrypted using Oasis Sapphire's confidential smart contracts
- ROFL Integration: Automated token balance verification using ROFL (Remote Offchain Fault-tolerant Logic)
The application consists of:
- Smart contracts deployed on Oasis Sapphire
- ROFL application for off-chain token balance verification
- Next.js frontend with Wagmi for web3 integration
app
: Next.js frontendroot
: Smart contractsrofl
: ROFL application
- Install dependencies:
pnpm install
cd app
pnpm install
- Configure environment variables:
cp .env.template .env
- Start the frontend development server:
cd app
pnpm dev
- For local ROFL development:
Check the (rofl/README.md
) for instructions on running the ROFL service.
- Deploy contracts:
npx hardhat deploy --network sapphire-localnet
- To populate test groups (optional):
npx hardhat populate --network sapphire-localnet --contract <CONTRACT_ADDRESS>