Interactive demo showcasing ERC-8010: verifying signatures for EIP-7702 delegated accounts, before the delegation transaction is even mined.
ERC-8010 defines a standardized signature wrapper format and off-chain verification procedure for pre-delegation signatures. It solves the problem: "How do I verify a signature signed by an EOA, meant to be validated by a contract the EOA hasn't delegated to yet?"
The key insight: wrap the inner signature with the EIP-7702 authorization tuple and a 32-byte MAGIC marker. Verifiers detect the MAGIC, simulate delegation via eth_call, and validate the signature atomically — all before any on-chain transaction.
erc8010/
├── contracts/ # Foundry project (Solidity)
│ ├── src/ # Smart contracts
│ ├── test/ # Unit + integration tests
│ └── script/ # Deploy scripts
├── app/ # Next.js 16 App Router
│ ├── page.tsx # Landing page
│ ├── demo/page.tsx # 5-step interactive demo
│ └── explain/page.tsx # Technical deep-dive
├── components/ # shadcn/ui components
├── lib/ # Utilities (wagmi config, ERC-8010 utils)
└── doc/PLAN.md # Detailed implementation plan
| Layer | Technology |
|---|---|
| Smart Contracts | Solidity 0.8.28 + Foundry (Prague EVM) |
| Chain Interaction | viem, wagmi v3 |
| Frontend | Next.js 16, React 19, Tailwind CSS v4 |
| UI Components | shadcn/ui (Base UI) |
- Node.js 20+
- Foundry
npm installcd contracts
forge test -vvvanvil --hardfork praguecd contracts
PRIVATE_KEY=<anvil_private_key> forge script script/Deploy.s.sol --broadcast --rpc-url http://127.0.0.1:8545npm run devOpen http://localhost:3000.
- Connect your wallet
- Navigate to /demo
- Follow the 5-step flow:
- Step 1: Sign a message with your EOA
- Step 2: Sign an EIP-7702 authorization and build the ERC-8010 wrapper
- Step 3: Verify the wrapped signature off-chain (viem simulates delegation)
- Step 4: Execute the delegation transaction on-chain
- Step 5: Verify the same signature again (now via direct ERC-1271)
wrapped = inner_signature || context || context_length || MAGIC
MAGIC = 0x8010801080108010801080108010801080108010801080108010801080108010
MIT