A full-stack Next.js application built on the Intuition Protocol demonstrating Delegated Execution (ERC-7710) and Hybrid Smart Accounts (ERC-7702).
This repository serves as the official open-source demo application and educational resource for Mission 09: Delegation Framework Tutorial for Intuition (ERC-7710).
👉 Read the Full Tutorial (TUTORIAL.md): Includes high-level concepts, system architecture, delegation flow diagrams, and a step-by-step developer code walkthrough for building this DApp from scratch.
Through this project, developers learn how to:
- Upgrade to ERC-7702: Upgrade a standard EOA to a Hybrid Smart Account (HSA) on Intuition Mainnet without changing wallet addresses.
- Attach Caveat Enforcers: Scope delegation permissions using
AllowedTargets,AllowedMethods(4-byte selector), andNativeTokenTransferAmount. - Execute Delegated Actions (ERC-7710): Use a backend Relayer API (
/api/stake) to redeem delegations on theDelegationManagerand execute MultiVault deposits gaslessly for the user. - Visualize HSA Budget: Display a live progress bar tracking remaining native TRUST budget on the HSA.
- Revoke Delegations: Safely disable delegations on-chain.
- Intuition Claim Feed: Paginated, infinite scroll feed of claims (triples) powered by
@0xintuition/graphql. - Claim Creation: Form to publish Subjects, Predicates, and Objects (Atoms) and link them into Triples using
@0xintuition/sdk. - 1-Click Staking: Support or Oppose claims instantly without transaction popups via backend delegated execution.
- HSA Budget Dashboard: Live balance indicator for the user's Hybrid Smart Account.
- Framework: Next.js 14 / 16 (App Router)
- Web3 Libraries:
viem,@metamask/smart-accounts-kit,@0xintuition/protocol,@0xintuition/sdk,@0xintuition/graphql - Network: Intuition Mainnet (Chain ID:
1155)
git clone https://github.com/Intellihackz/intuition-delegation-tutorial-claimstream.git
cd intuition-delegation-tutorial-claimstream
npm installCreate .env.local:
# Admin wallet private key (used to pay gas for 1-click staking relay)
ADMIN_PRIVATE_KEY=0xYourPrivateKeyHerenpm run devOpen http://localhost:3000 in your browser.
Built for the Intuition Ecosystem.