ClearSignKit

Tools to make clear signing easier. Auto generate ERC 7730 files with tx intents.

ClearSignKit

Created At

ETHGlobal Cannes

Winner of

Hardhat

Hardhat - Best projects built using Hardhat 3

Ledger

Ledger - CLEAR SIGNING (ERC-7730) 1st place

Project Description

Problem: The $1.4 Billion Blind Signing Crisis

On 21 February 2025, hackers drained $1.4 billion—including 401,347 ETH—from Bybit's cold wallet by tampering with the on-screen data shown to signers. This catastrophic event highlights the critical security vulnerability of blind signing, where users approve transactions without understanding what they're actually signing.

Blind signing exposes users to:

  • Malicious smart contracts that drain funds
  • Phishing attacks disguised as legitimate transactions
  • Social engineering scams exploiting transaction complexity
  • Approval farming where users unknowingly grant unlimited token access

Solution: ClearSignKit - AI-Powered Transaction Transparency

ClearSignKit is a comprehensive toolkit that automates the generation of human-readable transaction schemas using Ledger's ERC-7730 Clear Signing standard. Our solution addresses the adoption barrier by eliminating most of the manual work required to create these schemas.

Core Innovation

  1. AI-Powered Schema Generation: Using LLM models, we automatically analyze smart contract ABIs and generate compliant ERC-7730 JSONs that translate complex transaction data into human-readable formats.

  2. Developer-First Tooling: Our Hardhat 3 plugin integrates seamlessly into existing development workflows, automatically generating clear signing schemas during deployment. Alternative the website builder can be used to generate and review the JSON. Both options allow to directly publish to The Graph's GRC-20 Knowledge Graph.

  3. Decentralized Schema Repository: Using The Graph's GRC-20 Knowledge Graph, we create an open, queryable repository of verified schemas that any wallet or dApp can access.

User Journey

For Developers:

  • Install our Hardhat plugin → Deploy contracts → Run generate command → Schemas automatically generated and published
  • Or use our web interface to generate schemas for existing contracts

For End Users:

  • Wallet fetches schema from our knowledge graph → Displays human-readable transaction details → User signs with confidence

For Wallet Developers:

  • Query our knowledge graph for any contract → Get structured transaction display data → Implement clear signing without building schemas from scratch

How it's Made

Architecture Overview

ClearSignKit consists of three interconnected repositories that work together to provide a complete clear signing automation solution:

1. p (Python Library)

This repository serves as the core AI-powered engine that analyzes smart contracts and generates ERC-7730 clear signing schemas automatically. It extends Ledger's official python-erc7730 library.

Key Enhancements:

  • AI Integration: Added OpenAI SDK support with custom base URLs (OpenRouter compatibility)
  • Sourcify Integration: Replaced Etherscan with Sourcify API for access to large database of verified contracts with already parsed documentation and without requiring an API key
  • Proxy resolution: Automatically detects proxies and resolves their functions as well
  • Local Mode: Added support for local artifact processing from Hardhat deployments
  • Enhanced Prompting: Implemented sophisticated prompt engineering with source code analysis, providing the AI with the functions source code and documentation for better understanding

2. c (Web Interface)

This repository provides a user-friendly web interface that allows developers to generate, review, and publish ERC-7730 schemas through a visual builder tool. It integrates our AI engine with Ledger's existing builder interface and adds The Graph's GRC-20 Knowledge Graph publishing capabilities for decentralized schema storage.

Key Enhancements:

  • AI Toggle: Added automatic schema generation mode using our Python backend
  • Knowledge Graph Publishing: Integrated The Graph's GRC-20 library for decentralized schema storage
  • Chain Support: Added multi-chain dropdown with popular networks
  • Real-time Validation: Automatic validation of AI-generated schemas

Technical Stack:

  • Frontend: Next.js 15 with TypeScript and Tailwind CSS
  • Backend: FastAPI Python server with tRPC for type-safe API calls
  • State Management: Zustand for client-side state
  • Knowledge Graph: The Graph's GRC-20-ts library for entity publishing

3. h (Hardhat Plugin)

This repository contains a Hardhat 3 plugin that seamlessly integrates clear signing schema generation and publishing into existing development workflows.

Key Features:

  • Hardhat 3 Compatibility: Built specifically for Hardhat 3s new plugin system
  • Ignition Integration: Seamlessly works with Hardhat Ignition deployment IDs to fetch relevant deployment data
  • Automatic Generation: Post-compilation hooks for schema generation
  • Knowledge Graph Publishing: Direct integration with The Graph's GRC-20 library for publishing

Technical Stack:

  • Plugin System: Hardhat 3 native plugin architecture
  • Task System: Custom tasks for generate-7730, publish-kg, and fetch-kg
  • TypeScript: Full TypeScript support with modern ES modules

Technical Innovation

AI-Powered Schema Generation

Our LLM inference system analyzes:

  • Function Signatures: Parameter types and names
  • Source Code: Actual implementation for context
  • NatSpec Documentation: Developer comments and specifications
  • Constants & Enums: Contract constants for better labeling

Knowledge Graph Architecture

Using The Graph's GRC-20 standard, we created a "Contract Metadata" Space with structured entities for individual contracts:

  • Contract Entities: Basic contract information like chain id, address, name
  • Schema Entities: ERC-7730 JSON schemas
  • Relation Entities: Linking contracts to their schemas

Notable Technical Achievements

  1. Prompt Engineering: Developed sophisticated prompts providing AI with relevant context dynamically
  2. Multi-Chain Support: Support all EVM compatible chains
  3. Type Safety: Full TypeScript integration across all components
  4. Hardhat 3 Plugin: One of the first plugins built for Hardhat 3 alpha architecture
  5. Decentralized Storage: No centralized databases - everything stored on The Graph
background image mobile

Join the mailing list

Get the latest news and updates