Skip to content

viktorcrypt/crypto_titatic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

34 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿšข Crypto Titanic โ€” ERC-7715 Edition

MetaMask Hackathon Project - Best Integration Category

Crypto Titanic is a MetaMask Smart Accountโ€“powered game running on Sepolia Testnet. The ship is sinking โ€” and players must decide which tokens to save before it's too late. Every "rescue" is recorded on-chain through a gasless Smart Account UserOperation, proving your conviction without paying gas.

This project demonstrates Account Abstraction (ERC-4337) and Advanced Permissions (ERC-7715) โ€” including custom calldata composition, bundler execution, agent authorization, and on-chain aggregation โ€” wrapped in a playful, story-driven UX.


๐Ÿ”‘ Advanced Permissions Usage

1. Requesting Advanced Permissions

Code: src/lib/smartAccount.js (Lines 98-138)

Players grant ERC-7715 permissions during onboarding (BoardingScreen.jsx line 67):

  • Create session account with local signer
  • Request permissions for periodic native token transfers
  • Store permission context for autonomous operations

2. Redeeming Advanced Permissions

Code: src/lib/smartAccount.js (Lines 210-253)

Session account executes operations using granted permissions:

  • Sends UserOperations with delegation context
  • Used by both players and AI agents
  • All operations are gasless via Pimlico Paymaster

Agent Implementation: src/pages/Agent.jsx (Lines 58-91)

AI agents autonomously execute rescues every hour using granted permissions.


Best Social Media Presence on X (Twitter) Twitter: https://x.com/MeganOe75615831


โœจ Features

Feature Description
Smart Account Integration MetaMask Hybrid Smart Account handles all contract calls.
Gasless Execution All rescues are gasless via Pimlico Paymaster.
Advanced Permissions Agent Mode uses ERC-7715 permissions for automated rescues.
On-chain Aggregation Contract maintains direct rescue counts (no log scanning).
Live Leaderboard Real-time on-chain stats per token with human/agent breakdown.
Sepolia Network Testing environment for ERC-7715 permissions.
5 AI Agent Strategies Delegate rescue decisions to automated bots.
Ocean UI Animated water effects, sinking coins, and smooth transitions.

๐ŸŽฎ Gameplay Flow

"The markets are sinking. Only the brave decide what to save."

1๏ธโƒฃ Boarding Screen

  • Connect MetaMask Flask (required for ERC-7715)
  • Create session account (Hybrid Smart Account)
  • Grant permissions once (native token periodic limits)
  • Beautiful ocean-themed UI with animated water & sinking coins

2๏ธโƒฃ Intro Scene

  • Cinematic intro with animated ship silhouette
  • Story: "The year is 2026... The great crypto ship is sinking..."
  • Skip button available

3๏ธโƒฃ Rescue Mission

  • Drag tokens onto the lifeboat (capacity: 100 weight)
  • Select from: BTC, ETH, SOL, LINK, DOGE, PEPE, LINEA, MON
  • Click "SAVE COIN" โ†’ automatic on-chain recording
  • Watch the ship sink with trollface easter egg ๐Ÿ˜ˆ

4๏ธโƒฃ Success Screen

  • Gasless transaction recorded in background
  • Link to Pimlico Explorer
  • Options: View Leaderboard ๐Ÿ† or Try Agent Strategies ๐Ÿค–

5๏ธโƒฃ Leaderboard

  • TOP 3 podium with medals (๐Ÿฅ‡๐Ÿฅˆ๐Ÿฅ‰)
  • Full rankings with human/agent breakdown
  • Live stats from smart contract

6๏ธโƒฃ Agent Strategies (ERC-7715!)

  • Activate automated rescue bots
  • 5 different strategies available
  • Runs every hour, fully autonomous
  • All rescues marked as "by agent"

๐Ÿค– AI Agent Strategies

Choose from 5 automated rescue strategies powered by ERC-7715:

๐ŸŽฒ Random Picker

Randomly selects 2 tokens every hour โ€” pure chaos theory

โš–๏ธ Balanced Portfolio

Diversified picks: 1 heavy cap (BTC/ETH), 1 mid cap (SOL/LINK), 1 small cap (PEPE/MON)

๐Ÿ“ˆ Max Market Cap

Always rescues BTC and ETH โ€” plays it safe with blue chips

๐ŸŽ—๏ธ Underdog Supporter

Champions the forgotten โ€” rescues tokens with the fewest votes

๐Ÿ“Š Momentum Trader

Follows AI agent trends โ€” picks what other bots are rescuing

All agents run autonomously after one-time permission grant!


๐Ÿงฐ Tech Stack

  • Frontend: React + Vite + Tailwind CSS + Framer Motion
  • Blockchain: Viem + Wagmi
  • Smart Accounts: MetaMask Smart Accounts Kit (Hybrid Implementation)
  • Permissions: ERC-7715 Advanced Permissions
  • AA Infrastructure: ERC-4337 (EntryPoint v0.7)
  • Bundler/Paymaster: Pimlico
  • Network: Ethereum Sepolia

๐Ÿš€ Getting Started

Prerequisites

  • MetaMask Flask (required for ERC-7715)
  • Node.js v18+
  • Sepolia ETH for testing

Installation

git clone https://github.com/viktorcrypt/crypto_titatic.git
cd crypto-titanic

npm install

cp .env.example .env
# Add your Pimlico API key

npm run dev

Environment Variables

VITE_RPC_URL=https://ethereum-sepolia-rpc.publicnode.com
VITE_PIMLICO_API_KEY=pim_xxxxx
VITE_RESCUELOG_ADDRESS=0x...

๐Ÿ† MetaMask Hackathon - Integration Track

This project demonstrates:

โœ… ERC-7715 Advanced Permissions - one-time grant, autonomous agent operations
โœ… MetaMask Smart Accounts Kit - Hybrid implementation
โœ… Account Abstraction - ERC-4337 UserOperations
โœ… Gasless Transactions - Pimlico Paymaster
โœ… AI Agent Automation - 5 strategies with on-chain verification
โœ… Session Accounts - local key management
โœ… Beautiful UX - ocean-themed UI with smooth animations


๐ŸŒ Live Demo

Frontend: https://crypto-titatic.vercel.app
Network: Sepolia Testnet
Wallet: MetaMask Flask required


๐Ÿ“ License

MIT License


๐Ÿ™ Acknowledgments

  • MetaMask for ERC-7715 Advanced Permissions and Smart Accounts Kit
  • Pimlico for gasless transaction infrastructure
  • Viem and Wagmi for excellent developer tools
  • Framer Motion for smooth animations

๐Ÿ“ž Contact


๐Ÿšข The ship is sinking. Who will you save? ๐Ÿšข

Built with ERC-7715 Advanced Permissions

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages